438
#define EEFC_WPMR_WPEN
(EEFC_WPMR) Write Protection Enable
uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws)
Initialize the EFC controller.
uint32_t efc_get_wait_state(Efc *p_efc)
Get flash wait state.
#define EFC_FCMD_STUI
Start unique ID.
__O uint32_t EEFC_FCR
(Efc Offset: 0x04) EEFC Flash Command Register
void efc_write_fmr(Efc *p_efc, uint32_t ul_fmr)
Set mode register.
static irqflags_t cpu_irq_save(void)
Get and clear the global interrupt flags.
Embedded Flash Controller (EFC) driver for SAM.
uint32_t efc_perform_command(Efc *p_efc, uint32_t ul_command, uint32_t ul_argument)
Perform the given command and wait until its completion (or an error).
#define EEFC_FCR_FCMD(value)
uint32_t efc_get_status(Efc *p_efc)
Get the current status of the EEFC.
void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode)
Set flash access mode.
#define EEFC_FCR_FARG(value)
void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws)
Set flash wait state.
void efc_disable_frdy_interrupt(Efc *p_efc)
Disable the flash ready interrupt.
__no_inline RAMFUNC uint32_t efc_perform_read_sequence(Efc *p_efc, uint32_t ul_cmd_st, uint32_t ul_cmd_sp, uint32_t *p_ul_buf, uint32_t ul_size)
Perform read sequence. Supported sequences are read Unique ID and read User Signature.
static void cpu_irq_restore(irqflags_t flags)
Restore global interrupt flags.
uint32_t efc_get_flash_access_mode(Efc *p_efc)
Get flash access mode.
#define EEFC_FCR_FKEY_PASSWD
uint32_t efc_get_result(Efc *p_efc)
Get the result of the last executed command.
#define EEFC_FMR_FWS(value)
#define EFC_FCMD_SPUI
Stop unique ID.
#define EEFC_FMR_FRDY
(EEFC_FMR) Flash Ready Interrupt Enable
Operation is not supported.
uint32_t efc_perform_fcr(Efc *p_efc, uint32_t ul_fcr)
Perform command.
__IO uint32_t EEFC_WPMR
(Efc Offset: 0xE4) Write Protection Mode Register
__I uint32_t EEFC_FRR
(Efc Offset: 0x0C) EEFC Flash Result Register
uint32_t irqflags_t
Type used for holding state of interrupt flag.
#define EEFC_FCR_FKEY(value)
#define EEFC_FMR_FWS_Msk
(EEFC_FMR) Flash Wait State
void efc_enable_frdy_interrupt(Efc *p_efc)
Enable the flash ready interrupt.
#define EEFC_FSR_FRDY
(EEFC_FSR) Flash Ready Status (cleared when Flash is busy)
__I uint32_t EEFC_FSR
(Efc Offset: 0x08) EEFC Flash Status Register
#define EEFC_WPMR_WPKEY_PASSWD
(EEFC_WPMR) Writing any other value in this field aborts the write operation.Always reads as 0...
__IO uint32_t EEFC_FMR
(Efc Offset: 0x00) EEFC Flash Mode Register
#define EEFC_FMR_CLOE
(EEFC_FMR) Code Loop Optimization Enable