![](http://datasheet.mmic.net.cn/370000/-PD30101_datasheet_16680756/-PD30101_220.png)
CHPAPTER 10 BCU (BUS CONTROL UNIT)
187
10.5.4 Flash Memory Interface
(1) Restrictions on each mode
Flash memory interface has two mode as follows:
Ordinary ROM mode (exclusively for memory read)
Flash Memory mode (for write and register read)
Restrictions in each mode are as described below.
(a) Restrictions in the Ordinary ROM mode
Write is prohibited.
Even if write is performed, the LCDCS* (ROMWE*) terminal is not asserted.
Flash memory register read is prohibited.
The Ordinary ROM mode is the mode to issue the bus cycle suitable for memory read. Because
the Flash memory uses different AC characteristics for register mode and memory mode, correct
data cannot be obtained if read of Flash memory register is performed in this mode.
(b) Restrictions in the Flash memory mode
When performing write to the Flash memory, be sure to access with two bytes.
(2) Example of write sequence to Flash memory
Example of write sequence to Flash memory is shown below.
Caution
performed.
Confirmation of the operation of this example on the actual system is not yet
1.
Using GPIO as the output port, apply write voltage (V
PP
) to Flash memory.
If the built-in GPIO of the V
R
4101 is not available, install an output port on the outside and
control the write voltage.
Set the V
R
4101 to the Flash memory mode (Set the ROMWEN bit of BCUCNTREG to 1).
Wait until the write voltage to Flash memory becomes stable.
Issue the write command to Flash memory from the V
R
4101.
Write data to Flash memory from the V
R
4101.
Wait until the write completion signal of Flash memory (ry/by) becomes stable.
Wait until the write completion signal of Flash memory notice the completion of write.
Completion of the write to Flash memory can be known by the interruption with the Flash
memory write completion signal (ry/by) or palling the Flash memory register.
Read the Flash memory register.
If the write has succeeded, perform processing from "9."
If the write has failed, perform processing from "12."
When writing new data to Flash memory, perform processing from "4."
3.
4.
5.
6.
7.
8.
9.