add support for Atmel SAM4L NOR Flash

This adds a new NOR Flash driver, "at91sam4l", which supports the
built-in Flash on Atmel's low-power SAM4L family of Cortex M4 MCUs.
Parts and their geometry are detected automatically using the Chip ID
and lookup schemes described in document 42023E–SAM–07/2013.

Tested on AT91SAM4LC4CA via the SAM4L XPlained Pro development kit.

Change-Id: If73499dee92cc8ce231845244ea25c6984f6cecd
Signed-off-by: Andrey Yurovsky <yurovsky@gmail.com>
Reviewed-on: http://openocd.zylin.com/1639
Tested-by: jenkins
Reviewed-by: Spencer Oliver <spen@spen-soft.co.uk>
This commit is contained in:
Andrey Yurovsky
2013-09-19 13:59:09 -07:00
committed by Spencer Oliver
parent 67f664a068
commit 9cabe333e1
4 changed files with 674 additions and 1 deletions

View File

@@ -10,6 +10,7 @@ libocdflashnor_la_SOURCES = \
NOR_DRIVERS = \
aduc702x.c \
at91sam4.c \
at91sam4l.c \
at91sam3.c \
at91sam7.c \
avrf.c \

668
src/flash/nor/at91sam4l.c Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -29,6 +29,7 @@ extern struct flash_driver lpcspifi_flash;
extern struct flash_driver cfi_flash;
extern struct flash_driver at91sam3_flash;
extern struct flash_driver at91sam4_flash;
extern struct flash_driver at91sam4l_flash;
extern struct flash_driver at91sam7_flash;
extern struct flash_driver str7x_flash;
extern struct flash_driver str9x_flash;
@@ -67,6 +68,7 @@ static struct flash_driver *flash_drivers[] = {
&at91sam7_flash,
&at91sam3_flash,
&at91sam4_flash,
&at91sam4l_flash,
&str7x_flash,
&str9x_flash,
&aduc702x_flash,

View File

@@ -3,4 +3,6 @@
source [find target/at91sam4XXX.cfg]
# no flash defined yet
set _FLASHNAME $_CHIPNAME.flash
flash bank $_FLASHNAME at91sam4l 0x00000000 0 1 1 $_TARGETNAME