Functional Description and Application Information
32 kbyte Flash Module (S12SFTSR32KV1)
MM912F634
Freescale Semiconductor
297
9.
Writing a 0 to the CBEIF flag in the FSTAT register to abort a command write sequence.
The ACCERR flag will also be set if the MCU enters stop mode while any command is active (CCIF=0). The
operation is aborted immediately and, if burst programming, any pending burst program command is purged (see
The ACCERR flag will not be set if any Flash register is read during a valid command write sequence.
If the Flash memory is read during execution of an algorithm (CCIF = 0), the read operation will return invalid data and the
ACCERR flag will not be set.
If the ACCERR flag is set in the FSTAT register, the user must clear the ACCERR flag before starting another command write
4.36.4.3.2
Flash Protection Violations
The PVIOL flag will be set after the command is written to the FCMD register during a command write sequence, if
any of the following illegal operations are attempted, causing the command write sequence to immediately abort:
1.
Writing the program command if the address written in the command write sequence was in a protected area of the
Flash array.
2.
Writing the sector erase command if the address written in the command write sequence was in a protected area of the
Flash array.
3.
Writing the mass erase command while any Flash protection is enabled.
4.
Writing an invalid command if the address written in the command write sequence was in a protected area of the Flash
array.
If the PVIOL flag is set in the FSTAT register, the user must clear the PVIOL flag before starting another command write sequence
4.36.5
Operating Modes
4.36.5.1
Wait Mode
If a command is active (CCIF = 0) when the MCU enters wait mode, the active command and any buffered command will be
completed.
The Flash module can recover the MCU from wait mode if the CBEIF and CCIF interrupts are enabled (see
Section 4.36.8,4.36.5.2
Stop Mode
NOTE
As active commands are immediately aborted when the MCU enters stop mode, it is strongly
recommended that the user does not use the STOP instruction during program or erase
operations.
If a command is active (CCIF = 0) when the MCU enters stop mode, the operation will be aborted and, if the operation is program
or erase, the Flash array data being programmed or erased may be corrupted and the CCIF and ACCERR flags will be set. If
active, the high voltage circuitry to the Flash array will immediately be switched off when entering stop mode. Upon exit from stop
mode, the CBEIF flag is set and any buffered command will not be launched. The ACCERR flag must be cleared before starting