
FLASH MEMORY VERSION
7902 Group User’s Manual
20-13
20.2 Flash memory CPU reprogramming mode
WD
20.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, opcodes 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, memory expansion, and
boot modes.
The software commands listed in Table 20.2.1 can be used in the flash memory CPU reprogramming mode.
For details of each command, refer to section “20.2.5 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 command codes, the high-order 8 bits (D8 to D15) are ignored.
Table 20.2.1 Software commands
Write
!
FF16
7016
5016
4116
2016
A716
7716
7116
Read
Write
Read
SRD
WD
D016
D6
Read Array
Read Status Register
Clear Status Register
Page Programming
Block Erase
Erase All Unlocked Block
Lock Bit Programming
Read Lock Bit Status
!
WA
BA
!
BA
Write
WA + 2
Mode Address
Data
(D0 to D7)
Mode
Address
Mode
Address
1st cycle
2nd cycle
3rd cycle
SRD : Status register data (D0 to D7)
WA : Write address (A7 to A0 to be incremented by 2 from “0016” to “FE16”)
WD : Write data (16 bits)
BA
: The highest address of a block (Note that A0 = 0.)
D6
: Indicates the lock bit status. (Unlocked state when D6 = 1; Locked state when D6 = 0.)
!
: Arbitrary even-numbered address in user ROM area (A0 = 0)
Data
Commands