Back to Know-How on Development for F2MC-16LX Family
8. Possible to write in the flash by unit of Word
FLASH MCU for F2
MC-16LX family is possible to program with word unit by issuing command as following on RAM.
Erase is sector unit.
FLASH Memory Writing Command
| Command Sequence |
1st bus Write cycle |
2nd bus Write cycle |
3rd bus Write cycle |
4th bus Write cycle |
||||
|---|---|---|---|---|---|---|---|---|
| Address | Data | Address | Data | Address | Data | Address | Data | |
| Write/ program |
FxAAAA | xxAA | Fx5554 | xx55 | FxAAAA | xxA0 |
Write Address |
Write Data |
Command Program sample (execute on RAM)
| MOV | A,#0FFh | |
| MOV | ADB,A | ; Bank Setting |
| MOVW | ADB:0AAAAh,#00AAH | ; FLASH Write Command 1st cycle |
| MOVW | ADB:5554h,#0055H | ; FLASH Write Command 2nd cycle |
| MOVW | ADB:0AAAAh,#00A0H | ; FLASH Write Command 3rd cycle |
| MOVW | ADB:0000h,#0AA55h | ; FF0000h ← ”55h”, FF001h ← ”AAh” |
|
. . . Sequence check . . . |
