Owner manual

Boot Loader Commands
66 Command Set
Read Flash (02h)
The Read Flash command reads the contents of flash from the specified address. Since
the length of the Microprocessor reply packet is limited to 248 bytes, reading the
application firmware data requires multiple read commands.
Note
Length is defined as the number of 16-bit words, and the maximum value of
length is 124 words.
M5e/M5e-Compact Flash Read Example
There is an option where the M5e/M5e-Compact can read flash by sector number to
decouple the memory map from the serial interface. From now on, all embedded products
will use this interface.
In this example, the sector number 02 indicates the application area. This command
reads the first five data elements of the application, which is equivalent to the original
command (using data length of 05). The sector codes can be found in Flash Memory
Sector Mapping.
The reply to this command looks like this
:
Error Status Codes
FAULT_FLASH_ILLEGAL_SECTOR – 303h
FAULT_MSG_INVALID_PARAMETER_VALUE - 105h
FF 06 02 00 00 00 00 02 05 FA 59
SOH Length OpCode Start Address Sector Num Bytes To Read CRC
FF 0A 02 00 00 01 23 45 67 89 AB CD EF 01 23 BC ED
SOH Length OpCode Status
1
Word 1
1.Word 1 contains the data located at address 0x208000.
2
Word 2
2.Word 2 contains the data at address 0x208001, and so forth. (Remember that the Microprocessor data is word addressed.)
Word 3 Word 4 Word 5 CRC