![NXP Semiconductors MKL27Z128VFM4 Reference Manual Download Page 201](http://html1.mh-extra.com/html/nxp-semiconductors/mkl27z128vfm4/mkl27z128vfm4_reference-manual_1721847201.webp)
Table 13-28. FlashEraseRegion Command Packet Format (Example)
FlashEraseRegion
Parameter
Value
Framing packet
start byte
0x5A
packetType
0xA4, kFramingPacketType_Command
length
0x0C 0x00
crc16
0xF9 0x A6
Command packet
commandTag
0x02, kCommandTag_FlashEraseRegion
flags
0x00
reserved
0x00
parameterCount
0x02
startAddress
0x00 0x00 0x00 0x00 (0x0000_0000)
byte count
0x00 0x04 0x00 0x00 (0x400)
The FlashEraseRegion command has no data phase.
Response: The target (Kinetis Bootloader ) will return a GenericResponse packet with
one of following error status codes.
Table 13-29. FlashEraseRegion Response Status Codes
Status Code
kStatus_Success (0x0)
kStatus_MemoryRangeInvalid (0x10200)
kStatus_FlashAlignmentError (0x101)
kStatus_FlashAddressError (0x102)
kStatus_FlashAccessError (0x103)
kStatus_FlashProtectionViolation (0x104)
kStatus_FlashCommandFailure (0x105)
13.3.8.7 FlashEraseAllUnsecure command
The FlashEraseAllUnsecure command performs a mass erase of the flash memory,
including protected sectors. Flash security is immediately disabled if it (flash security)
was enabled, and the FSEC byte in the flash configuration field at address 0x40C is
programmed to 0xFE. However, if the mass erase enable option in the FSEC field is
disabled, then the FlashEraseAllUnsecure command will fail.
The FlashEraseAllUnsecure command requires no parameters.
Chapter 13 Kinetis ROM Bootloader
KL27 Sub-Family Reference Manual , Rev. 5, 01/2016
Freescale Semiconductor, Inc.
201