
Chapter 25 2 Kbyte EEPROM Module (S12XEETX2KV1)
MC9S12XDP512 Data Sheet, Rev. 2.21
1066
Freescale Semiconductor
25.4.2.6
Sector Modify Command
The sector modify operation will erase both words in a sector of EEPROM memory followed by a
reprogram of the addressed word using an embedded algorithm.
An example ow to execute the sector modify operation is shown in
Figure 25-23. The sector modify
command write sequence is as follows:
1. Write to an EEPROM memory address to start the command write sequence for the sector modify
command. The EEPROM address written determines the sector to be erased and word to be
reprogrammed while byte address bit 0 is ignored.
2. Write the sector modify command, 0x60, to the ECMD register.
3. Clear the CBEIF ag in the ESTAT register by writing a 1 to CBEIF to launch the sector erase
command.
If an EEPROM sector to be modied is in a protected area of the EEPROM memory, the PVIOL ag in
the ESTAT register will set and the sector modify command will not launch. Once the sector modify
command has successfully launched, the CCIF ag in the ESTAT register will set after the sector modify
operation has completed unless a new command write sequence has been buffered.