INTERNAL MEMORY
6.4 Registers Associated with the Internal Flash Memory
6
6.4.2 Flash Status Registers
There are two registers to indicate the status of the internal flash memory: Flash Status Register 1 (FSTAT1)
located in the SFR area (H’0080 01E1) and Flash Status Register 2 (FSTAT2) included in the internal flash
memory. Use these two status registers (FSTAT1 and FSTAT2) to control the programming or erase operation
performed on the internal flash memory.
Flash Status Register 1 (FSTAT1)
<Address: H’0080 01E1>
b8
9
10
11
12
13
14
b15
FSTAT
1
0
0
0
0
0
0
0
<After reset: H’01>
b
Bit Name
Function
R
0
W
0
8–14
15
No function assigned. Fix to "0".
FSTAT
0: Busy
R
–
Ready/busy status bit
1: Ready
Flash Status Register 1 (FSTAT1) is a read-only status register used to know the status of the programming or
erase operation performed on the internal flash memory. When FSTAT = "0" (busy), the internal flash memory is
being programmed or erased, during which time do not start a new programming or erase operation on it. When
FSTAT = "1" (ready), a new programming or erase operation can be started on it.
Furthermore, while FSTAT = "0" (busy), do not operate on the FCNT4 register FRESET bit described later.
6.4.3 Flash Status Register 2 (FSTAT2)
Flash Status Register 2 (FSTAT2)
b8
FBUSY
1
9
10
11
12
13
14
b15
ERASE WRERR1WRERR2
0
0
0
0
0
0
0
<After reset: H’80>
b
Bit Name
Function
R
R
W
–
8
FBUSY
0: Being programmed or erased
1: Ready state
Flash busy bit
9
No function assigned. Fix to "0".
0
0
–
10
ERASE
0: Erase normally operating or terminated
1: Erase error occurred
R
Erase status confirmation bit
11
WRERR1
0: Programming normally operating or terminated
1: Programming error occurred
R
R
0
–
–
0
Write status confirmation bit 1
12
WRERR2
0: Programming normally operating or terminated
1: Over-programming occurred
Write status confirmation bit 2
13–15
No function assigned. Fix to "0".
32180 Group User’s Manual (Rev.1.0)
6-5