Renesas FSL-T06 User Manual page 32

Flash self-programming library
Table of Contents

Advertisement

Flash Self-Programming Library
Caution:
R01US0046ED Rev. 1.01
User Manual
E.g.: Fx4-L, Px4-L:
f
= f
/ 2
Flash hardware
Cpu
16MHz <= f
<= mimimum of <100MHz> or <maximum device frequency>
Cpu
The CPU frequency must be set correctly. If not, malfunction may occur such as
unstable Flash data without data retention, programming failure, operation
blocking.
Interface
fsl_status_t FSL_SetFrequency( fsl_u32 FreqData_u32 )
Arguments
Type
fsl_u32
FreqData_u32
Return types / values
Type
fsl_status_t
1
Status check is performed internally by the firmware
2
Status check is performed by the user
Pre-conditions
Library must be initialized (call function FSL_Init), copied (call function
FSL_CopySections) and active (call function FSL_FlashEnv_Activate).
Post-conditions
In case of user mode and activated polling, call FSL_StatusCheck till function
return value is different from FSL_BUSY.
Example
/* Set clock to 32MHz */
fsl_status_t
status_enu;
status_enu = FSL_SetFrequency( 32 );
#if FSL_STATUS_CHECK == FSL_STATUS_CHECK_USER
while( status_enu == FSL_BUSY )
{
status_enu = FSL_StatusCheck( );
}
#endif
/* Error treatment */
...
Argument
Rounded up CPU clock in MHz
(boundaries see above)
Example: clock is 25.7MHz
Argument
Operation status when returned from
function call:
Description
→ FreqData_u32 = 26
Description
1
FSL_OK
2
FSL_BUSY
FSL_ERR_FLOW
FSL_ERR_PARAMETER
FSL_ERR_INTERNAL
User Interface (API)
1
32

Advertisement

Table of Contents
loading

Table of Contents