User`s manual
RX600 & RX200 Series Simple Flash API for RX
R01AN0544EU0250 Rev.2.50 Page 31 of 33
March 4, 2014
4.11 R_FlashCodeCopy
Copies Flash API code from ROM to RAM.
Format
void R_FlashCodeCopy(void);
Parameters
None.
Return Values
None.
Properties
Prototyped in file “r_flash_api_rx_if.h”
Implemented in file “r_flash_api_rx.c”
Description
When programming or erasing ROM the Flash API code cannot reside in ROM. This function will transfer the
code from ROM to RAM.
Reentrant
Yes.
Example
/* Transfer Flash API code to RAM so that we can program/erase ROM. */
R_FlashCodeCopy();
/* Flash API can now program/erase ROM. */
Special Notes:
• If you are only programming/erasing data flash (not ROM) then all Flash API code will reside in ROM
and this function will not need to be called.
• If using the dbsct.c method described in Section 2.13 then this function does not need to be run.
• If you are programming/erasing ROM and not using the dbsct.c method then this function must be
run before any other Flash API functions are called. If this function is not called first then other Flash
API functions will jump to uninitialized RAM.