Nut/OS  4.10.3
API Reference
at91_efc.c File Reference
#include <cfg/memory.h>
#include <sys/atom.h>
#include <dev/nvmem.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <arch/arm/atmel/at91_efc.h>
Include dependency graph for at91_efc.c:

Go to the source code of this file.

Defines

#define EFC_CHIP_BASE   0x00100000
 Base address of the flash memory chip.
#define EFC_CHIP_SIZE   0x00040000
 Size handled by each controller.
#define FLASH_CONF_SECTOR   0x0003FF00
 Address offset of the configuration sector.
#define FLASH_CONF_SIZE   256
 Size of the configuration area.
#define EFC_WRITE_WAIT   60000
#define EFC_ERASE_WAIT   60000
#define EFC_CHIP_ERASE_WAIT   600000

Typedefs

typedef uint32_t flashdat_t
typedef unsigned long flashadr_t
typedef volatile flashdat_tflashptr_t

Functions

RAMFUNC int At91EfcCmdEx (int fci, unsigned int cmd, uint32_t tmo)
 Execute flash controller command.
RAMFUNC int At91EfcCmd (unsigned int cmd, uint32_t tmo)
 Execute flash controller command.
int At91EfcSectorRead (unsigned int off, void *data, unsigned int len)
 Read data from flash memory.
int At91EfcSectorWrite (unsigned int off, CONST void *data, unsigned int len)
 Write data into flash memory.
int At91EfcSectorErase (unsigned int off)
 Erase sector at the specified offset.
int At91EfcRegionLock (unsigned int off)
 Lock specified region.
int At91EfcRegionUnlock (unsigned int off)
 Unlock specified region.
int At91EfcParamRead (unsigned int pos, void *data, unsigned int len)
 Load configuration parameters from embedded flash memory.
int At91EfcParamWrite (unsigned int pos, CONST void *data, unsigned int len)
 Store configuration parameters in embedded flash memory.