FLASH MEMORY VERSION
19.2 Flash memory CPU reprogramming mode
19.2 Flash memory CPU reprogramming mode
In this mode, the user ROM area can be reprogrammed by the central processing unit (CPU) executing
software commands. Therefore, this mode allows the user to reprogram the contents of the user ROM area
with the microcomputer mounted on the final printed circuit board, without using any ROM programmer.
Be sure to store the reprogramming control software into the user ROM area or the boot ROM area in
advance. In the flash memory CPU reprogramming mode, however, an opcode cannot be fetched for the
internal flash memory. Accordingly, be sure to transfer the reprogramming control software to an area other
than the internal flash memory area (e.g. the internal RAM area), and then execute the software in this area.
The flash memory CPU reprogramming mode is available in any of the single-chip and boot modes.
The software commands listed in Table 19.2.1 can be used in the flash memory CPU reprogramming mode.
For details of each command, refer to section “19.2.4 Software commands.”
Note that commands and data must be read from and written into even-numbered addresses within the user
ROM area, 16 bits at a time. At writing of software command codes, the high-order 8 bits (D to D15) are
8
ignored. (Except for the write data at the 2nd bus cycle of the programming command code.)
Table 19.2.1 Software commands
1st bus cycle
Address
2nd bus cycle
Address
Data
(D0 to D7)
Software commands
Read Array
Mode
Mode
Data
—
—
✕
—
SRD
—
FF16
7016
5016
4016
2016
2016
Write
Write
Write
Write
Write
Write
✕
✕
✕
✕
✕
✕
Read
—
Read Status Register
Clear Status Register
Programming
—
Write
Write
Write
WA
BA
✕
WD
D016
2016
Block Erase
Erase All Blocks
SRD : Status register data (D
0
to D
7)
WA : Write address (A
WD : Write data (16 bits)
BA : The highest address of a block (Note that A
: Arbitrary even-numbered address in user ROM area (A = 0)
7
to A
0
to be incremented by 2 from “0016” to “FE16”)
0
= 0.)
✕
0
7906 Group User’s Manual Rev.2.0
19-9