ROHS MC9S08QE128 Reference Manual page 84

Table of Contents

Advertisement

Chapter 4 Memory
An example flow to execute the sector erase operation is shown in
write sequence is as follows:
1. Write to a flash block address to start the command write sequence for the sector erase command.
The flash address written determines the sector to be erased while global address bits [8:0] and the
data written are ignored.
2. Write the sector erase command, 0x40, to the FCMD register.
3. Clear the FCBEF flag in the FSTAT register by writing a 1 to FCBEF to launch the sector erase
command.
If a flash sector to be erased is in a protected area of the flash block, the FPVIOL flag in the FSTAT register
will set and the sector erase command will not launch. Once the sector erase command has successfully
launched, the FCCF flag in the FSTAT register will set after the sector erase operation has completed.
Clock Register
Written
Check
Command
Buffer Empty Check
Access Error and
Protection Violation
Check
Bit Polling for
Command Completion
Check
84
START
Read: FCDIV register
no
FDIVLD
Set?
yes
Write: FCDIV register
Read: FSTAT register
FCBEF
Set?
yes
FACCERR/FPVIOL
Set?
no
Write: Flash Sector Address
1.
and Dummy Data
Write: FCMD register
2.
Sector Erase Command 0x40
Write: FSTAT register
3.
Clear FCBEF 0x80
Read: FSTAT register
FCCF
Set?
yes
EXIT
Figure 4-19. Example Sector Erase Command Flow
MC9S08QE128 MCU Series Reference Manual, Rev. 2
Figure
4-19. The sector erase command
NOTE: FCDIV needs to
be set after each reset
no
yes
Write: FSTAT register
Clear FACCERR/FPVIOL 0x30
no
Freescale Semiconductor

Hide quick links:

Advertisement

Table of Contents
loading

Related Products for ROHS MC9S08QE128

This manual is also suitable for:

Mc9s08qe96Mc9s08qe64

Table of Contents