Fujitsu mb91192 Manuale Utente

Pagina di 348
286
CHAPTER 21  Flash Memory
21.3
Operation of Flash Memory
When accessed by the FR-CPU, the following two types of access mode exist.
• ROM mode: Word (32-bit) length data can be read in blocks, but not written.
• Programming mode: Word (32-bit) length access is disabled, but writing in half-word 
(16-bit) lengths is enabled.
FR-CPU ROM Mode (32-bit, Read Only)
This mode functions as the internal ROM of FR-CPU. Enables word (32-bit) length data to be read in
blocks, but cannot write to the flash memory or initiate auto algorithm.
Mode specification method
This mode is on when the "WE" bit of the flash memory status register is "0".
When the CPU is in operation, it always enters this mode after the reset has been released. 
When the CPU is not in operation, it cannot enter this mode. 
Operation content
When reading the flash memory area, word (32-bit) length data is read from the memory in blocks. 
The number of cycles required to read data is 2 cycles per word (1 wait). Using this enables commands
to be supplied to the FR-CPU without waiting.
Restrictions
The address allocation method and endian type differ from writing the ROM writer.
Under this mode, neither command nor data can be written to the flash memory. 
When setting the gear cycle of the CPU system to source oscillation x1, 1 Wait must be specified by the
Wait control section before setting.
FR-CPU Programming Mode (16-bit, Read/Write)
This mode is enabled erasing/writing data. Access of word (32-bit) length data in blocks is impossible, so
while operation is carried out under this mode, program execution on the flash memory is impossible.
Mode specification method
This mode is on when the "WE" bit of the flash memory status register is "1".
When the CPU is in operation, the "WE" bit becomes "0" after the reset has been released. Write "1" to
use this mode. Returns to ROM mode when the "WE" bit becomes "0" by rewriting "0" or generating a
reset.
The "WE" bit cannot be rewritten while the "RDY" bit of the flash memory status register is "0".
Rewrite the "WE" bit after confirming that the "RDY" bit has changed to "1".
Operation content
When reading the flash memory area, half-word (16-bit) length data is read from the memory in blocks.