Renesas FSL-T06 User Manual page 35

Flash self-programming library
Table of Contents

Advertisement

Flash Self-Programming Library
5.3.2.3 FSL_Read
R01US0046ED Rev. 1.01
User Manual
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 call FSL_StatusCheck till function return value is different
from FSL_BUSY.
Example
/* Write 64 words of data to address 0x00000000 onwards */
fsl_status_t
status_enu;
fsl_u32
buf_u32[64];
/* fill buffer */
...
status_enu = FSL_Write( &buf_u32[0], 0x00000000, 64 );
#if FSL_STATUS_CHECK == FSL_STATUS_CHECK_USER
while( status_enu == FSL_BUSY )
{
status_enu = FSL_StatusCheck( );
}
#endif
/* Error treatment */
...
Description
Function reads the specified number of words from consecutive Flash addresses
starting at the specified address and writes it into a buffer.
Interface
fsl_status_t FSL_Read( fsl_u32 addSrc_u32,
Arguments
Type
fsl_u32
addSrc_u32
fsl_u32
pDest_pu32
fsl_u32
length_u32
Return types / values
Type
fsl_status_t
fsl_u32 *pDest_pu32,
fsl_u32 length_u32 )
Argument
Word aligned source address of data to
be read
Pointer to buffer of read data
Word aligned length of data in words
Argument
Operation status when returned from
function call:
Description
Description
1
FSL_OK
2
FSL_BUSY
User Interface (API)
35

Advertisement

Table of Contents
loading

Table of Contents