* * $Log: at91_efc.c,v $ * Revision 1.1 2006/07/26 11:20:57 haraldkipp * Added non-volatile configuration memory support for SAM7X, using upper * 16k region of on-chip flash. * * *
Defines | |
#define | FLASH_CHIP_BASE |
Base address of the flash memory chip. | |
#define | FLASH_CONF_SECTOR |
Address offset of the configuration sector. | |
#define | FLASH_CONF_SIZE |
Size of the configuration area. | |
#define | FLASH_WRITE_WAIT |
#define | FLASH_ERASE_WAIT |
#define | FLASH_CHIP_ERASE_WAIT |
Typedefs | |
typedef u_long | flashdat_t |
typedef unsigned long | flashadr_t |
typedef volatile flashdat_t * | flashptr_t |
Functions | |
RAMFUNC int | At91EfcCmd (u_int cmd, u_long tmo) |
Execute flash controller command. | |
int | At91EfcSectorRead (u_int off, void *data, u_int len) |
Read data from flash memory. | |
int | At91EfcSectorWrite (u_int off, CONST void *data, u_int len) |
Write data into flash memory. | |
int | At91EfcSectorErase (u_int off) |
Erase sector at the specified offset. | |
int | At91EfcRegionLock (u_int off) |
Lock specified region. | |
int | At91EfcRegionUnlock (u_int off) |
Unlock specified region. | |
int | At91EfcParamRead (u_int pos, void *data, u_int len) |
Load configuration parameters from embedded flash memory. | |
int | At91EfcParamWrite (u_int pos, CONST void *data, u_int len) |
Store configuration parameters in embedded flash memory. |
|
Size of the configuration area. During write operations a buffer with this size is allocated from heap and may cause memory problems with large sectors. Thus, this value may be less than the size of the configuration sector, in which case the rest of the sector is unused. Currently only 1 sector can be used for system configurations. |
|
Execute flash controller command. This routine must not be located in internal flash memory. |
|
Load configuration parameters from embedded flash memory. Applications should call NutNvMemLoad().
|
|
Store configuration parameters in embedded flash memory. Applications should call NutNvMemSave(). The region that contains the configuration sector will be automatically locked.
|
|
Lock specified region.
|
|
Unlock specified region.
|
|
Read data from flash memory.
|
|
Write data into flash memory. The related sector will be automatically erased before writing.
|