aboutsummaryrefslogtreecommitdiff
path: root/src/flash/nor/drivers.c
diff options
context:
space:
mode:
authorOlivier Schonken <olivier.schonken@gmail.com>2012-03-18 15:36:54 +0200
committerSpencer Oliver <spen@spen-soft.co.uk>2012-04-26 10:58:14 +0000
commitd1cd97777b9f271698cc0efdaec16aca9ce42449 (patch)
tree5a1f7578046cfcb306dfe1f5dec3b37cf8247ab0 /src/flash/nor/drivers.c
parentf28a5d9217fad9b5baf65eb6fa0deda4b9c89203 (diff)
topic: Added support for the SAM4S variants
Atmel introduced 6 new Cortex-M4 processors on 2011-10-26 SAM4S16C - 1024KB flash LQFP100/BGA100 SAM4S16B - 1024KB flash LQFP64/QFN64 SAM4S16A - 1024KB flash LQFP48/QFN48 SAM4S8C - 512KB flash LQFP100/BGA100 SAM4S8B - 512KB flash LQFP64/QFN64 SAM4S8A - 512KB flash LQFP48/QFN48 The SAM4S processors still suffer from the "6 waitstates needed to program device" errata. Other relevant changes are: 1. Address of flash memory starts at 0x400000. 2. EWP (Erase page and write page) only works for the first two 8KB "sectors" 3. Because of the EWP not working for all the sectors, normal page writes have to be used. The default_flash_blank_check is used to check if lockregions should be erased. 4. The EA (Erase All) command takes 7.3s to complete. (Previous timeout was 500 ms) 5. There are 128 lockable regions of 8KB each. Implemented default blank checking, and page erase for load_image scenarios. This is to compensate for the EWP flash commands only working on the first 2 8KB sectors. Change-Id: I7c5a52b177f7849a107611fd0f635fc416cfb724 Signed-off-by: Olivier Schonken <olivier.schonken@gmail.com> Reviewed-on: http://openocd.zylin.com/528 Tested-by: jenkins Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
Diffstat (limited to 'src/flash/nor/drivers.c')
-rw-r--r--src/flash/nor/drivers.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/flash/nor/drivers.c b/src/flash/nor/drivers.c
index 746b55b8..69c3387e 100644
--- a/src/flash/nor/drivers.c
+++ b/src/flash/nor/drivers.c
@@ -27,6 +27,7 @@ extern struct flash_driver lpc288x_flash;
extern struct flash_driver lpc2900_flash;
extern struct flash_driver cfi_flash;
extern struct flash_driver at91sam3_flash;
+extern struct flash_driver at91sam4_flash;
extern struct flash_driver at91sam7_flash;
extern struct flash_driver str7x_flash;
extern struct flash_driver str9x_flash;
@@ -59,6 +60,7 @@ static struct flash_driver *flash_drivers[] = {
&cfi_flash,
&at91sam7_flash,
&at91sam3_flash,
+ &at91sam4_flash,
&str7x_flash,
&str9x_flash,
&aduc702x_flash,