Renesas FSL-T06 User Manual page 31

Flash self-programming library
Table of Contents

Advertisement

Flash Self-Programming Library
5.3.1.6 FSL_SetFrequency
R01US0046ED Rev. 1.01
User Manual
Interface
fsl_status_t FSL_FlashEnv_Deactivate( void )
Arguments
None
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).
Additionally the library must be informed about FBUS clock by using function
FSL_SetFrequency.
Post-conditions
In case of user mode and activated polling, call FSL_StatusCheck till function
return value is different from FSL_BUSY.
Example
/* Deactivate Flash environment */
fsl_status_t
status_enu;
status_enu = FSL_FlashEnv_Deactivate( );
#ifdef FSL_ACTIVATION_POLLING
while( status_enu == FSL_BUSY )
{
status_enu = FSL_StatusCheck( );
}
#endif
/* Error treatment */
...
Description
The function informs the Self-Programming routines about the configured CPU
frequency. A frequency fractional part need to be rounded up, e.g.: 25.3MHz
need to be rounded up to 26MHz.
CPU frequency setting condition:
The Flash programming hardware is provided with a clock, derived from the CPU
frequency. The frequency divider of this derived clock is device family dependent.
The resulting f
Flash hardware
Argument
Operation status when returned from
function call:
must be in the range of 8 to 50MHz.
Description
1
FSL_OK
2
FSL_BUSY
FSL_ERR_FLOW
FSL_ERR_FLMD0
FSL_ERR_INTERNAL
User Interface (API)
1
31

Advertisement

Table of Contents
loading

Table of Contents