SPRACR5A february   2020  – may 2023 AWR2243

 

  1.   Trademarks
  2. 1Introduction
  3. 2Basic Bootloader Flow
    1. 2.1 Bootmode – SFLASH
      1. 2.1.1 Image Load Sequence
      2. 2.1.2 ROM Assisted Image Download Sequence
    2. 2.2 Bootmode – SPI
  4. 3Programming Serial Data Flash Over UART (Bootloader Service)
    1. 3.1 File to Download
    2. 3.2 Flash Programming Sequence
    3. 3.3 Supported Commands and Format
    4. 3.4 Flashing Sequence
  5. 4Revision History

Supported Commands and Format

Table 3-1 Supported Commands and Format
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.
GUID-EBC70138-3A07-4973-83A9-2209330820C6-low.gif Figure 3-1 HOST ↔ XWR Device UART Communication

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:

  • 0x00 = INITIAL_STATUS (before any actionable commands are issued)
  • 0x40 = SUCCESS
  • 0x4B = ACCESS_IN_PROGRESS
  • Any RESERVED fields in commands sent from the host should be set to 0x0