From: olivier Schonken Date: Sat, 20 Aug 2011 14:31:35 +0000 (+0200) Subject: Fix Sam3u flash bank 1 issue X-Git-Tag: v0.6.0-rc1~606 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=8292b1b5cd537945a631570f9270ed6337d9cadd;p=openocd Fix Sam3u flash bank 1 issue --- diff --git a/src/flash/nor/at91sam3.c b/src/flash/nor/at91sam3.c index 40ff3aa0..1fe5f620 100644 --- a/src/flash/nor/at91sam3.c +++ b/src/flash/nor/at91sam3.c @@ -1974,6 +1974,7 @@ FLASH_BANK_COMMAND_HANDLER(sam3_flash_bank_command) bank->bank_number = 1; pChip->details.bank[1].pChip = pChip; pChip->details.bank[1].pBank = bank; + break; // at91sam3s series case FLASH_BANK_BASE_S: @@ -2091,8 +2092,8 @@ _sam3_probe(struct flash_bank *bank, int noise) // update the flash bank size for (x = 0 ; x < SAM3_MAX_FLASH_BANKS ; x++) { - if (bank->base == pPrivate->pChip->details.bank[0].base_address) { - bank->size = pPrivate->pChip->details.bank[0].size_bytes; + if (bank->base == pPrivate->pChip->details.bank[x].base_address) { + bank->size = pPrivate->pChip->details.bank[x].size_bytes; break; } }