User Guide

Table Of Contents
Boot Loader Commands
Command Set 49
starting from word address 0x00000000. Since the flash is a 16-bit device, there must be
an even number of data bytes. The number of data bytes to be written is embedded in the
length of the payload (N) by the formula:
LengthDataToWriteInWords = (N – 8) / 2
The password required for each sector is defined in
Flash Memory Sector Mapping.
The following example shows a Write Flash Sector command writing to the Application
Sector, starting at the beginning
Note
DO NOT send a packet that spans two sectors. Split the packet into 2
separate messages, then send the first message to sector “x” and the
second to sector “x+1”.
Get Sector Size (0Eh)
The size of a flash sector can be retrieved from the module using the Get Sector Size
command. Since different products may have different flash sector sizes, this command
is useful for ensuring that the module has enough memory to store the desired data. This
example receives the sector size for the application area:
The response to this command is shown in the following example:
The size of the sector is returned in bytes. Sector 2 (application) is 212992 bytes.
Modify Flash Sector (0Fh)
The Modify Flash Sector command is used as a read-modify-write operation in the
flash. Since the Modify Flash Sector command erases the flash sector each time it is
FF 0F 0D 02 25 44 10 00 00 00 00 02 12 34 56 78 90 12 73 4C
SOH Length OpCode Password Start Address Sector Data To Write CRC
FF 01 OE 02 D1 BF
SOH Length OpCode Sector CRC
FF 04 OE 00 00 00 03 40 00 88 54
SOH Length OpCode Status Size of Sector CRC