CHAPTER 10 BCU (BUS CONTROL UNIT)
249
10.4.4 Flash Memory Interface
(1) Notes for Specific Modes
The following two modes are available for flash memory.
Ordinary ROM mode (memory read only)
Flash Memory mode (supports memory write and register read)
The following notes apply to these modes.
(a) Notes for Ordinary ROM mode
Write is prohibited
The WR# pin is not asserted even when a write operation is attempted.
Flash memory register read is prohibited
The Ordinary ROM mode is the mode in which bus cycles suite for memory read operations are issued.
Since the AC characteristics of flash memory are different for register read and memory read operations,
accurate data cannot be obtained by reading the flash memory register while in this mode.
(b) Notes for Flash Memory mode
Be sure to access in double-byte units when writing to flash memory.
(2) Example of write sequence for flash memory
An example of a write sequence for flash memory is shown below.
Caution This example’s operations have not been confirmed using an actual system.
1
Using GPIO as an output port, apply the flash memory write voltage (V
PP
).
If the V
R
4102’s on-chip GPIOs cannot be used, set up an external output port and then control the write
voltage.
Set the V
R
4102 to flash memory mode (Set “1” to the BCUCNTREG’s ROMWEN bit).
Wait until the flash memory write voltage become stable.
Issue the flash memory write command from the V
R
4102.
Write data from the V
R
4102 to flash memory.
Wait until the flash memory write completion signal (ry/by) becomes stable.
Wait until the flash memory write completion signal gives notification of write completion.
After write to flash memory is completed, notification can be obtained by receiving an interrupt from the flash
memory write completion signal (ry/by) or by polling the flash memory register.
Read the flash memory register.
If write succeeded, start processing from “9”.
If write failed, start processing from “12”.
If writing new data to flash memory, start processing from “4”.
If write to flash memory is completed, start processing from “10”.
2
3
4
5
6
7
8
9