13.3.7.5 FillMemory command
The FillMemory command fills a range of bytes in memory with a word pattern. It
follows the same rules as the WriteMemory command. The difference between
FillMemory and Writememory is that a word data pattern is included in FillMemory
command parameter, and there is no data phase for this command, while WriteMemory
does have a data phase.
Table 13-25. Parameters for FillMemory Command
Byte #
Command
0 - 3
Start address of memory to fill
4 - 7
Number of bytes to write with the pattern
8 - 11
Pattern word
• To fill with a byte pattern (8-bit), the byte must be replicated 4 times in the pattern
word.
• To fill with a short pattern (16-bit), the short value must be replicated 2 times in the
pattern word.
For example, to fill a byte value with 0xFE, the word pattern would be 0xFEFEFEFE; to
fill a short value 0x5AFE, the word pattern would be 0x5AFE5AFE.
Process command
Host
Target
FillMemory, with word pattern 0x12345678
ACK:
0x5a a1
ACK:
0x5a a1
Generic Response:
0x5a a4 10 00 e4 57 05 00 00 03 00 70 00 00 00 08 00 00 78 56 34 12
0x5a a4 0c 00 97 04 a0 00 00 02 00 00 00 00 05 00 00 00
Figure 13-10. Protocol Sequence for FillMemory Command
Chapter 13 Kinetis Flashloader
K22F Sub-Family Reference Manual , Rev. 3, 7/2014
Freescale Semiconductor, Inc.
301