Error status codes, Get sector size (0eh), Modify flash sector (0fh) – ThingMagic M5e-Compact User Manual
Page 73: Boot loader commands, Fault_msg_wrong_number_of_data – 100h, Fault_flash_illegal_sector – 303h, Fault_flash_bad_write_password – 301h
![background image](/manuals/640737/73/background.png)
Boot Loader Commands
Command Set
73
Error Status Codes
FAULT_MSG_WRONG_NUMBER_OF_DATA – 100h
FAULT_FLASH_ILLEGAL_SECTOR – 303h
FAULT_FLASH_BAD_WRITE_PASSWORD – 301h
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 on M5e is shown in the following example:
The size of the sector is returned in bytes. For M5e, sector 2 (application) is 212992
bytes.
Error Status Codes
FAULT_MSG_WRONG_NUMBER_OF_DATA – 100h
FAULT_FLASH_ILLEGAL_SECTOR – 303h
Modify Flash Sector (0Fh)
The Modify Flash Sector command is the new version of the original Modify Flash
(0Ah) command. The following example writes 6 bytes to Sector 03.
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
FF
0F
0F
79
13
87
66
00
00
00
00
03
12
34
56
78
90
12
4C
FA
SOH
Length
OpCode
Password
Start Address
Sector
Data To Write
CRC