44 #ifndef EFC_H_INCLUDED 45 #define EFC_H_INCLUDED 70 #define EFC_FCMD_GETD 0x00 72 #define EFC_FCMD_WP 0x01 73 #define EFC_FCMD_WPL 0x02 74 #define EFC_FCMD_EWP 0x03 75 #define EFC_FCMD_EWPL 0x04 76 #define EFC_FCMD_EA 0x05 78 #define EFC_FCMD_EPL 0x06 81 #define EFC_FCMD_EPA 0x07 83 #define EFC_FCMD_SLB 0x08 84 #define EFC_FCMD_CLB 0x09 85 #define EFC_FCMD_GLB 0x0A 86 #define EFC_FCMD_SGPB 0x0B 87 #define EFC_FCMD_CGPB 0x0C 88 #define EFC_FCMD_GGPB 0x0D 89 #define EFC_FCMD_STUI 0x0E 90 #define EFC_FCMD_SPUI 0x0F 91 #if (SAM3S_SERIES || SAM3N_SERIES || SAM3XA_SERIES || SAM4S_SERIES) 92 #define EFC_FCMD_GCALB 0x10 95 #define EFC_FCMD_ES 0x11 96 #define EFC_FCMD_WUS 0x12 97 #define EFC_FCMD_EUS 0x13 98 #define EFC_FCMD_STUS 0x14 99 #define EFC_FCMD_SPUS 0x15 104 #define CHIP_FLASH_IAP_ADDRESS (IROM_ADDR + 8) 107 #define EFC_ACCESS_MODE_128 0 109 #define EFC_ACCESS_MODE_64 EEFC_FMR_FAM 112 uint32_t
efc_init(
Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws);
122 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);
efc_rc
Definition: efc.h:59
uint32_t efc_get_flash_access_mode(Efc *p_efc)
Get flash access mode.
Definition: efc.c:154
void efc_set_wait_state(Efc *p_efc, uint32_t ul_fws)
Set flash wait state.
Definition: efc.c:165
Yes.
Definition: efc.h:61
void efc_enable_frdy_interrupt(Efc *p_efc)
Enable the flash ready interrupt.
Definition: efc.c:115
void efc_set_flash_access_mode(Efc *p_efc, uint32_t ul_mode)
Set flash access mode.
Definition: efc.c:140
uint32_t efc_init(Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws)
Initialize the EFC controller.
Definition: efc.c:104
General error.
Definition: efc.h:63
Operation is not supported.
Definition: efc.h:65
uint32_t efc_get_result(Efc *p_efc)
Get the result of the last executed command.
Definition: efc.c:265
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).
Definition: efc.c:197
uint32_t efc_get_wait_state(Efc *p_efc)
Get flash wait state.
Definition: efc.c:179
Operation OK.
Definition: efc.h:60
void efc_disable_frdy_interrupt(Efc *p_efc)
Disable the flash ready interrupt.
Definition: efc.c:127
Invalid argument input.
Definition: efc.h:64
uint32_t efc_get_status(Efc *p_efc)
Get the current status of the EEFC.
Definition: efc.c:253
Efc hardware registers.
Definition: component_efc.h:41