RX610 Group
27. Data Flash (Flash Memory for Data Storage)
R01UH0032EJ0120 Rev.1.20
Page 927 of 1006
Feb 20, 2013
27.6.4
FCU Command Usage
This section shows how to program and erase the data flash memory by using programming and block erasure commands,
respectively, and how to check the state of erasure of the data flash by using the blank check command. For the method
for transferring the firmware to the FCU RAM and the ways to use other FCU commands, see section 26.6.4, FCU
Command Usage.
(1)
Using the Peripheral Clock Notification Command
This command handles notification of the frequency of the peripheral clock. For details, see section 26.6.4, FCU
Command Usage. Set the FENTRYD bit in FENTRYR to 1 and make settings to indicate an address within the data flash
area.
(2)
Programming
To program the data flash, use one of the programming commands.
Use byte access to write E8h to an address within the data flash area in the first cycle of the programming command, and
the number of words (N)
*
to be programmed in the second cycle. Access the peripheral bus in words from the third cycle
to cycle N + 2 of the command. In the third cycle, write the first word of data for programming to the address where the
target area for programming starts. This address must be on an 8-byte boundary for 8-byte programming or on a 128-byte
boundary address for 128-byte programming. After writing words to addresses in the data flash area N times, write byte
D0h to an address within the data flash area in cycle N + 3; the FCU will then start actual programming of the data flash.
Read the FRDY bit in FSTATR0 to confirm the completion of data flash programming.
If the area accessed in the third cycle to cycle N + 2 includes addresses that do not require programming, write FFFFh as
the programming data for those addresses. To ignore the programming and erasure protection provided by the DFLWE
settings, set the program/erase enable bit for the target block to 1 before programming starts.
Figure 27.5 shows the procedure for data flash programming.
Note: * N = 04h for 8-byte programming or N = 40h for 128-byte programming.