SPRACR5A february 2020 – may 2023 AWR2243
Command | Command Id | Description | Fields |
---|---|---|---|
PING | 0x20 | The device responds with ACK | |
OPEN FILE | 0x21 | Command that gives details about the type of file being downloaded | File Size: Total File size being downloaded. |
File Type: META IMG1(4), META IMG2(5),META IMG3(6), and META IMG4(7) | |||
Storage type: 2- SFLASH and 4- SRAM | |||
WRITE FILE to SFLASH | 0x24 | Command that gives the content of the file to write to SFLASH | |
WRITE FILE to RAM | 0x26 | Command that gives the content of the file and the file is directly written to RAM | |
CLOSE FILE | 0x22 | Command that indicates the end of file download | Storage type: 2- SFLASH and 4- SRAM |
GET STATUS | 0x23 | Command that requests the status of the previous command. The device responds with the status of the previous command issued | |
ERASE DEVICE | 0x28 | Command to erase the contents of the SFALSH | |
GET VERSION | 0x2F | Command that requests the version of the ROM. Device responds with the version information | |
ACK response | 0xCC | Response from the device. |
The 8-bit checksum in each UART command is a simple unsigned sum of the unsigned values of all the bytes of the payload of the command, where only the least-significant 8 bits of the sum are kept. For example, the pseudo-code to calculate the checksum would be:
checksum = 0
for each byte in the payload, checksum = (checksum + (unsigned) byte) AND (0xFF).
The STATUS RESPONSE returned from the device is the bootloader error status based on the last actionable command executed. Actionable commands include OPEN, WRITE TO FLASH, CLOSE, and ERASE. Status commands like PING, GET STATUS, and GET VERSION do not affect the error status reported in the STATUS RESPONSE. The possible returned STATUS values are as follows: