diff options
author | Ulf Wetzker <ulf.wetzker@eas.iis.fraunhofer.de> | 2013-05-27 12:58:46 +0200 |
---|---|---|
committer | Spencer Oliver <spen@spen-soft.co.uk> | 2013-07-01 08:40:12 +0000 |
commit | 8d70c862002bafc1c2f7d1bb4095de68d399294e (patch) | |
tree | 2c91f504bd246de790f68b0d1c2c78df4f4d86e2 /src/flash/nor/at91sam3.c | |
parent | 34e8d1a50d9ee965e2efa4aae6e2e97caef37c23 (diff) | |
download | riscv-openocd-8d70c862002bafc1c2f7d1bb4095de68d399294e.zip riscv-openocd-8d70c862002bafc1c2f7d1bb4095de68d399294e.tar.gz riscv-openocd-8d70c862002bafc1c2f7d1bb4095de68d399294e.tar.bz2 |
flash/nor/at91sam3: fixed lock region size
According to the "AT91SAM ARM-based Flash MCU SAM3S Series datasheet"
(http://www.atmel.com/Images/doc11090s.pdf) p. 30 the lock region
size for the at91sam3sd9 family is 32 kbyte.
This fix is only based on the datasheet due to missing hardware.
Change-Id: Ic47b0642e4f11a60de477eaa0167038103b8ff15
Signed-off-by: Ulf Wetzker <ulf.wetzker@eas.iis.fraunhofer.de>
Reviewed-on: http://openocd.zylin.com/1422
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/flash/nor/at91sam3.c')
-rw-r--r-- | src/flash/nor/at91sam3.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/flash/nor/at91sam3.c b/src/flash/nor/at91sam3.c index f8024b9..1395990 100644 --- a/src/flash/nor/at91sam3.c +++ b/src/flash/nor/at91sam3.c @@ -73,6 +73,11 @@ /* at91sam3s series (has always one flash bank) */ #define FLASH_BANK_BASE_S 0x00400000 +/* at91sam3sd series (has always two flash banks) */ +#define FLASH_BANK0_BASE_SD FLASH_BANK_BASE_S +#define FLASH_BANK1_BASE_512K_SD (FLASH_BANK0_BASE_SD+(512*1024/2)) + + /* at91sam3n series (has always one flash bank) */ #define FLASH_BANK_BASE_N 0x00400000 @@ -82,9 +87,6 @@ #define FLASH_BANK1_BASE_256K_AX 0x000A0000 #define FLASH_BANK1_BASE_512K_AX 0x000C0000 -#define FLASH_BANK0_BASE_SD FLASH_BANK_BASE_S -#define FLASH_BANK1_BASE_512K_SD (FLASH_BANK0_BASE_SD+(512*1024/2)) - #define AT91C_EFC_FCMD_GETD (0x0) /* (EFC) Get Flash Descriptor */ #define AT91C_EFC_FCMD_WP (0x1) /* (EFC) Write Page */ #define AT91C_EFC_FCMD_WPL (0x2) /* (EFC) Write Page and Lock */ @@ -749,7 +751,7 @@ static const struct sam3_chip_details all_sam3_details[] = { .present = 1, .size_bytes = 256 * 1024, .nsectors = 16, - .sector_size = 16384, + .sector_size = 32768, .page_size = 256, }, /* .bank[1] = { */ @@ -764,7 +766,7 @@ static const struct sam3_chip_details all_sam3_details[] = { .present = 1, .size_bytes = 256 * 1024, .nsectors = 16, - .sector_size = 16384, + .sector_size = 32768, .page_size = 256, }, }, |