19. Memory programming
A96G140/A96G148/A96A148 User’s manual
244
⑨
Insert one NOP operation
⑩
Read FESR until PEVBSY is 1.
⑪
Repeat
②
to
⑧
until all pages are erased
Flash bulk erase mode
①
Enable program mode.
②
Reset page buffer. FEMR: 1000_0001 FECR:0000_0010
③
Select page buffer. FEMR:1000_1001
④
Write ‘h00 to page buffer.
(Data value is not important.)
⑤
Set erase mode. FEMR:1001_0001.
Only main cell area is erased.
For bulk erase including OTP area, select OTP area (set FEMR to 1000_1101).
⑥
Set FETCR
⑦
Start bulk erase. FECR:1000_1011
⑧
Insert one NOP operation
⑨
Read FESR until PEVBSY is 1.
Flash OTP area read mode
①
Enter OCD (=ISP) mode.
②
Set ENBDM bit of BCR.
③
Enable debug and Request debug mode.
④
Select OTP area. FEMR:1000_0101
⑤
Read data from Flash.
Flash OTP area write mode
①
Enable program mode.
②
Reset page buffer. FEMR: 1000_0001 FECR:0000_0010
③
Select page buffer. FEMR:1000_1001
④
Write data to page buffer (Address automatically increases by twin).
⑤
Set write mode and select OTP area. FEMR:1010_0101