AN2400 Freescale Semiconductor / Motorola, AN2400 Datasheet - Page 46

no-image

AN2400

Manufacturer Part Number
AN2400
Description
HCS12 NVM Guidelines
Manufacturer
Freescale Semiconductor / Motorola
Datasheet
AN2400/D
46
10. Write $00 to the FCNFG register to select Flash block 0.
11. Write $10 to the FTSTMOD register ($0102) to set the WRALL bit, so the
12. Write $FF to the FPROT register to disable protection.
13. Write $30 to the FSTAT register to clear the PVIOL and ACCERR bits.
14. Write $0000 to the FDATA register ($010A–$010B)
15. Write $0000 to the FADDR register ($0108–$0109)
16. Write $41 (Mass Erase) to the FCMD register.
17. Write $80 to the FSTAT register to clear CBEIF.
18. Wait until all CCIF flags are set.
19. Reset back into Special Single Chip mode
20. Write an appropriate value to the FCLKDIV register for correct timing.
21. Write $00 to the FCNFG register to select Flash block 0.
22. Write $FF to the FPROT register to disable protection.
23. Write $FFBE to Flash address $FF0E
24. Write $20 (Program) to the FCMD register.
25. Write $80 to the FSTAT register to clear CBEIF.
26. Wait until the CCIF flag in FSTAT is are set.
27. Reset into any mode.
7. Write $41 (Mass Erase) to the ECMD register.
8. Write $80 to the ESTAT register to clear CBEIF.
9. Write an appropriate value to the FCLKDIV register for correct timing.
Freescale Semiconductor, Inc.
For More Information On This Product,
following writes affect all flash blocks.
Go to: www.freescale.com
HCS12 NVM Guidelines
MOTOROLA

Related parts for AN2400