Table 13-37. FlashReadResource Response Format (Example)
FlashReadResource
Response
Parameter Value
Framing packet start byte 0x5A
packetType 0xA4
length 0x0C 0x00
crc 0xD2 0xB0
Command packet commandTag 0xB0
flags 0x01
reserved 0x00
parameterCount 0x02
status 0x0000_0000
byteCount 0x0000_0008
Data phase: The FlashReadResource command has a data phase. Because the target
(Kinetis Flashloader ) works in slave mode, the host must pull data packets until the
number of bytes of data specified in the byteCount parameter of FlashReadResource
command are received by the host.
13.3.6.10
WriteMemory command
The WriteMemory command writes data provided in the data phase to a specified range
of bytes in memory (flash or RAM). However, if flash protection is enabled, then writes
to protected sectors will fail.
Special care must be taken when writing to flash.
• First, any flash sector written to must have been previously erased with a
FlashEraseAll or FlashEraseRegion command.
• Writing to flash requires the start address to be .
• If the VerifyWrites property is set to true, then writes to flash will also perform a
flash verify program operation.
When writing to RAM, the start address need not be aligned, and the data will not be
padded.
The start address and number of bytes are the 2 parameters required for WriteMemory
command.
Table 13-38. Parameters for WriteMemory Command
Byte # Command
0 - 3 Start address
4 - 7 Byte count
Functional Description
K22F Sub-Family Reference Manual, Rev. 4, 08/2016
322 NXP Semiconductors