R8C/36T-A Group
26. Flash Memory
Under development Preliminary document
Specifications in this document are tentative and subject to change.
R01UH0240EJ0010 Rev.0.10
Page 625 of 728
Aug 05, 2011
26.3
Registers
Note:
1. The OFS register is allocated in the flash memory, not in the SFRs. Set appropriate values as ROM data by a
program.
Do not perform any additional writes to the OFS register. Erasing the block that includes the OFS register sets
the OFS register to FFh.
26.3.1
Flash Memory Status Register (FST)
Notes:
1. The RDYSTI bit cannot be set to 1 (flash ready status interrupt requested) by a program.
When writing 0 (no flash ready status interrupt requested) to the RDYSTI bit, read this bit (dummy read) before
writing to it. Make sure the DTC is not activated by the flash ready status source between reading and writing.
To check this bit, set the RDYSTIE bit in the FMR0 register to 1 (flash ready status interrupt enabled).
2. The BSYAEI bit cannot be set to 1 (flash access error interrupt requested) by a program.
When writing 0 (no flash access error interrupt requested) to the BSYAEI bit, read this bit (dummy read) before
writing to it.
To check this bit, set the BSYAEIE bit in the FMR0 register to 1 (flash access error interrupt enabled) or set the
CMDERIE bit in the FMR0 register to 1 (erase/write error interrupt enabled).
3. This bit is also set to 1 (error) when a command error occurs.
4. When this bit is 1, do not set the FMR01 bit in the FMR0 register to 0 (CPU rewrite mode disabled).
5. To set this bit to 0, first read 1, then write 0.
Table 26.3
Flash Memory Register Configuration
Register Name
Symbol
After Reset
Address
Access Size
Flash Memory Status Register
FST
10000X00b
00252h
8
Flash Memory Control Register 0
FMR0
00h
00254h
8
Flash Memory Control Register 1
FMR1
00h
00255h
8
Flash Memory Control Register 2
FMR2
00h
00256h
8
Option Function Select Register
OFS
0FFFFh
8
Address 00252h
Bit
b7b6
b5b4b3
b2b1b0
Symbol
After Reset
1
000
0
X
00
Bit
Symbol
Bit Name
Function
R/W
b0
RDYSTI Flash ready status interrupt request flag
0: No flash ready status interrupt requested
1: Flash ready status interrupt requested
R/W
b1
BSYAEI
Flash access error interrupt request flag
0: No flash access error interrupt requested
1: Flash access error interrupt requested
R/W
b2
LBDATA LBDATA monitor flag
0: Locked
1: Not locked
R
b3
—
Nothing is assigned. The write value must be 0. The read value is 0.
—
b4
FST4
Program error flag
0: No program error
1: Program error
R
b5
FST5
Erase error/blank check error flag
0: No erase error/blank check error
1: Erase error/blank check error
R
b6
FST6
Erase-suspend status flag
0: Other than erase-suspend
1: During erase-suspend
R
b7
FST7
Ready/busy status flag
0: Busy
1: Ready
R