Defines | Functions
Enhanced Embedded Flash Controller (EEFC)

Defines

#define EEFC_ERROR_FLAGS   (EEFC_FSR_FLOCKE | EEFC_FSR_FCMDE)
#define FWP_KEY   0x5Au
#define READ_BUFF_ADDR0   IFLASH0_ADDR
#define READ_BUFF_ADDR1   IFLASH1_ADDR

Functions

void efc_disable_frdy_interrupt (Efc *p_efc)
 Disable the flash ready interrupt.
void efc_enable_frdy_interrupt (Efc *p_efc)
 Enable the flash ready interrupt.
uint32_t efc_get_flash_access_mode (Efc *p_efc)
 Get flash access mode.
uint32_t efc_get_result (Efc *p_efc)
 Get the result of the last executed command.
uint32_t efc_get_status (Efc *p_efc)
 Get the current status of the EEFC.
uint32_t efc_get_wait_state (Efc *p_efc)
 Get flash wait state.
uint32_t efc_init (Efc *p_efc, uint32_t ul_access_mode, uint32_t ul_fws)
 Initialize the EFC controller.
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).
uint32_t efc_perform_fcr (Efc *p_efc, uint32_t ul_fcr)
 Perform command.
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.
void efc_set_flash_access_mode (Efc *p_efc, uint32_t ul_mode)
 Set flash access mode.
void efc_set_wait_state (Efc *p_efc, uint32_t ul_fws)
 Set flash wait state.
void efc_write_fmr (Efc *p_efc, uint32_t ul_fmr)
 Set mode register.

Detailed Description

The Enhanced Embedded Flash Controller ensures the interface of the Flash block with the 32-bit internal bus.


Define Documentation

#define EEFC_ERROR_FLAGS   (EEFC_FSR_FLOCKE | EEFC_FSR_FCMDE)

Definition at line 75 of file efc.cpp.

#define FWP_KEY   0x5Au

Definition at line 68 of file efc.cpp.

#define READ_BUFF_ADDR0   IFLASH0_ADDR

Definition at line 64 of file efc.cpp.

#define READ_BUFF_ADDR1   IFLASH1_ADDR

Definition at line 65 of file efc.cpp.


Function Documentation

void efc_disable_frdy_interrupt ( Efc *  p_efc)

Disable the flash ready interrupt.

Parameters:
p_efcPointer to an EFC instance.

Definition at line 118 of file efc.cpp.

void efc_enable_frdy_interrupt ( Efc *  p_efc)

Enable the flash ready interrupt.

Parameters:
p_efcPointer to an EFC instance.

Definition at line 106 of file efc.cpp.

uint32_t efc_get_flash_access_mode ( Efc *  p_efc)

Get flash access mode.

Parameters:
p_efcPointer to an EFC instance.
Returns:
0 for 128-bit or EEFC_FMR_FAM for 64-bit.

Definition at line 145 of file efc.cpp.

uint32_t efc_get_result ( Efc *  p_efc)

Get the result of the last executed command.

Parameters:
p_efcPointer to an EFC instance.
Returns:
The result of the last executed command.

Definition at line 230 of file efc.cpp.

uint32_t efc_get_status ( Efc *  p_efc)

Get the current status of the EEFC.

Note:
This function clears the value of some status bits (FLOCKE, FCMDE).
Parameters:
p_efcPointer to an EFC instance.
Returns:
The current status.

Definition at line 218 of file efc.cpp.

uint32_t efc_get_wait_state ( Efc *  p_efc)

Get flash wait state.

Parameters:
p_efcPointer to an EFC instance.
Returns:
The number of wait states in cycle (no shift).

Definition at line 170 of file efc.cpp.

uint32_t efc_init ( Efc *  p_efc,
uint32_t  ul_access_mode,
uint32_t  ul_fws 
)

Initialize the EFC controller.

Parameters:
ul_access_mode0 for 128-bit, EEFC_FMR_FAM for 64-bit.
ul_fwsThe number of wait states in cycle (no shift).
Returns:
0 if successful.

Definition at line 95 of file efc.cpp.

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).

Note:
Unique ID commands are not supported, use efc_read_unique_id.
Parameters:
p_efcPointer to an EFC instance.
ul_commandCommand to perform.
ul_argumentOptional command argument.
Note:
This function will automatically choose to use IAP function.
Returns:
0 if successful, otherwise returns an error code.

Definition at line 188 of file efc.cpp.

RAMFUNC uint32_t efc_perform_fcr ( Efc *  p_efc,
uint32_t  ul_fcr 
)

Perform command.

Parameters:
p_efcPointer to an EFC instance.
ul_fcrFlash command.
Returns:
The current status.

Definition at line 320 of file efc.cpp.

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.

Parameters:
p_efcPointer to an EFC instance.
ul_cmd_stStart command to perform.
ul_cmd_spStop command to perform.
p_ul_bufPointer to an data buffer.
ul_sizeBuffer size.
Returns:
0 if successful, otherwise returns an error code.

Definition at line 248 of file efc.cpp.

void efc_set_flash_access_mode ( Efc *  p_efc,
uint32_t  ul_mode 
)

Set flash access mode.

Parameters:
p_efcPointer to an EFC instance.
ul_mode0 for 128-bit, EEFC_FMR_FAM for 64-bit.

Definition at line 131 of file efc.cpp.

void efc_set_wait_state ( Efc *  p_efc,
uint32_t  ul_fws 
)

Set flash wait state.

Parameters:
p_efcPointer to an EFC instance.
ul_fwsThe number of wait states in cycle (no shift).

Definition at line 156 of file efc.cpp.

RAMFUNC void efc_write_fmr ( Efc *  p_efc,
uint32_t  ul_fmr 
)

Set mode register.

Parameters:
p_efcPointer to an EFC instance.
ul_fmrValue of mode register

Definition at line 306 of file efc.cpp.



lizi_arduino
Author(s): RoboTiCan
autogenerated on Wed Aug 26 2015 12:24:23