Datasheet
Section 22 Flash Memory
Page 1154 of 1408 R01UH0309EJ0500 Rev. 5.00
Sep 24, 2012
H8S/2456, H8S/2456R, H8S/2454 Group
22.3.2 EW0 Mode
Setting the FMCMDEN bit in FLMCR1 to 1 shifts the flash memory into the user programming
mode, in which commands can be accepted. Figure 22.2 shows how to set and clear the EW0
mode.
Programming and erasure are controlled through software commands. The flash memory state
after programming or erasure can be checked through FLMSTR or the status register.
EW0 mode processing procedures
Single-chip mode or
on-chip ROM enabled expanded mode
Transfer the programming control program
to an area outside the flash memory. *
3
Set the FLSHE in SYSCR.
Write 0 to the FMCMDEN bit and then write 1
to it (user program mode enabled).*
1
Clear CBIDB to 0.
Execute software commands.
Execute a read array command.*
2
Write 1 to the CBIDB bit (user program mode
disabled).
Jump to a desired address in the flash memory.
Jump to the programming control program transferred
to an area outside the flash memory.
(The subsequent processing should be done by
the transferred programming control program.)
1.
2.
3.
To set the FMCMDEN bit to 1, write 0 to the bit and then write 1 to it in a row.
Write to the FMCMDEN bit from an area outside the on-chip flash memory.
After a read array command, disable user programming mode.
In user program mode, execute the programming control program in
the on-chip RAM or external area.
Notes:
Programming control program*
3
Figure 22.2 Setting and Clearing EW0 Mode