A96G140/A96G148/A96A148 User’s manual
19. Memory programming
243
④
Enter program/erase mode sequence.
NOTE2
A.
Write 0xAA to 0xF555.
B.
Write 0x55 to 0xFAAA.
C.
Write 0xA5 to 0xF555.
NOTES
:
1.
Refer to how to enter ISP mode.
2.
Command sequence to activate Flash write/erase mode. It is composed of sequentially writing data of
Flash memory.
Flash 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. FEMR:1010_0001
⑥
Set page address. FEARH:FEARM:FEARL=20’hx_xxxx
⑦
Set FETCR.
⑧
Start program. FECR:0000_1011
⑨
Insert one NOP operation
⑩
Read FESR until PEVBSY is 1.
⑪
Repeat
②
to
⑧
until all pages are written.
Flash page 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
⑥
Set page address. FEARH:FEARM:FEARL=20’hx_xxxx
⑦
Set FETCR.
⑧
Start erase. FECR:0000_1011