English
Language : 

R01US0079ED0103 Datasheet, PDF (34/66 Pages) Renesas Technology Corp – RENESAS 32-Bit MCU
Data Flash Access Library - Type T01, European Release
User Interface (API)
Return value
none
Type
Description
Pre- R_FDL_Init must have been executed successfully.
conditions:
Post- Call R_FDL_Handler until the Flash operation is finished. This is reported by the request
conditions: structure status return value (value changes from R_FDL_BUSY to a different value).
The user application must not modify members of the request structure while the
command is in operation.
Description: The execute function initiates all Flash modification operations. The operation type and
operation parameters are passed to the FDL by a request structure, the status and the
result of the operation are returned to the user application also by the same structure.
The required parameters as well as the possible return values depend on the operation to
be started.
This function only starts a hardware operation according to the command to be executed.
The command processing must be controlled and stepped forward by the handler
function R_FDL_Handler.
Possible commands, parameters and return values are described into chapter 4.5
“Commands“.
Example: Erase blocks 0 to 3.
r_fdl_request_t myRequest;
myRequest.command_enu
myRequest.idx_u32
myRequest.cnt_u16
myRequest.accessType_enu
= R_FDL_CMD_ERASE;
= 0;
= 4;
= R_FDL_ACCESS_USER;
R_FDL_Execute (&myRequest);
while (myRequest.status_enu == R_FDL_BUSY)
{
R_FDL_Handler ();
}
if (myRequest.status_enu != R_FDL_OK)
{
/* Error handler */
}
Example: Write 8 bytes starting from addresses 0x10.
r_fdl_request_t myRequest;
uint32_t data[]
= { 0x11223344, 0x55667788 };
myRequest.command_enu
myRequest.idx_u32
myRequest.cnt_u16
myRequest.bufAddr_u32
myRequest.accessType_enu
= R_FDL_CMD_WRITE;
= 0x10;
= 2;
= (uint32_t)&data[0];
= R_FDL_ACCESS_USER;
R_FDL_Execute (&myRequest);
while (myRequest.status_enu == R_FDL_BUSY)
R01US0079ED0103
34
User Manual