DLPU110B April 2021 – August 2022 DLPC6540
Get Boot Hold Reason | |
---|---|
Return Parameter(s) | |
Byte | Description |
Byte 0 | Reason code 0x00 BOOT_HOLD jumper in HOLD position 0x01 Switched to programming mode initated by main app 0x02 Reading flash info failed 0x03 Flash layout mismatch 0x04 Can't initialize ARM peripherals 0x05 Can't allocate memory pool 0x06 Failure in initialization task 0x07 Controller is invalid to run the application 0x08 Error in USB initialization 0x09 Error in i2c initialization 0x0A Error getting app configuration 0x0B App configuration layout mismatch |
Returns the code that specifies the reason for being in bootloader mode. |
Get Flash Info | |
---|---|
Read Parameter(s) | |
Byte | Description |
Byte 0 | Chip Select of Flash Device 0 = Flash chip select 0 memory domain 1 = Flash chip select 1 memory domain 2 = Flash chip select 2 memory domain |
Return Parameter(s) | |
Byte | Description |
Bytes 0-1 | Manufacturer ID |
Bytes 2-9 | Device ID |
Bytes 10-13 | Device size in bytes |
Bytes 14 - * | Sector Information bits 0-31: Sector Size bits 32-47: Num Sectors |
Byte 14 | Availability bit 0: 0 = Flash can be used for programming; 1 = Flash cannot be used for programming. |
This command returns the flash device and manufacturer IDs. Only CFI compliant flash devices are supported. The system can have multiple flash devices. The command returns the info for the flash present at the given chip select. Note : Chip Select 0 Flash is required for system operation. Other Flash Chip Selects are technically optional but required for Splash Capture and Warp Operations. |
Get Programmable Flash Sector Information | |
---|---|
Return Parameter(s) | |
Byte | Description |
Bytes 0 - * | Sector Information bits 0-31: Sector Size bits 32-47: Num Sectors |
This command returns the flash sector information read from CFI compliant flash devices. If the flash is non-CFI compliant, this command will fail. The sectors returned by this command are the only ones available for programming a flash image. The system is designed such that the flash image is in a contiguous memory space. If a system has multiple flash parts, then the software checks the size of the flash at ChipSelect 0. If this is equal to the maximum supported size (32MB), then a flash device at ChipSelect 1 (if present) will also be supported for flash programming. Similarly, if the size of flash devices at both ChipSelect 0 and 1 are 32MB, then a flash device at ChipSelect 2 (if present) will be supported for flash programming as well. The command appends the sector information for each part, which is supported for flash programming, and provides them as output. |
Set Unlock Flash For Update | |
---|---|
Write Parameter(s) | |
Byte | Description |
Bytes 0-3 | Flash Update lock/unlock 0 = Lock 4154802215 = Unlock |
This command unlocks the flash update operation (Download, Erase). By default the flash update operations are locked. This is to prevent accidental modification of flash contents. To unlock, the pre-defined key shall be send as the unlock code. Calling this command with any other parameter will lock the flash update commands. |
Get Unlock Flash For Update | |
---|---|
Return Parameter(s) | |
Byte | Description |
Byte 0 | 0 = Locked 1 = Unlocked |
This command returns whether the flash is in unlocked state. |
Set Erase Sector | |
---|---|
Write Parameter(s) | |
Byte | Description |
Bytes 0-3 | Sector Address |
This command erases the sector of the flash where the given address falls in. This command is a flash update command, and requires flash operations to be unlocked using Unlock Flash for Update command. The sector address shall be specified as an offset from flash start address. For example in a flash device where all sectors are 64KB of size, sector addresses shall be specified as follows : Sector 0 = 0 Sector 1 = 0x10000 Sector 2 = 0x20000 and so on... |
Set Initialize Flash Read Write Settings | |
---|---|
Write Parameter(s) | |
Byte | Description |
Bytes 0-3 | Start Address offset to program data to where Offset 0 refers to first byte in the flash, 1 refers to second byte and so on. This offset must be an even number. |
Bytes 4-7 | This specifies the number of bytes Flash Write command should expect or the number of bytes Flash Read command should return.This must be an even number. |
This command initializes flash read/write operation. This command shall be called before Flash Write command is sent. Note: For Flash Write, the Address and download size set up shall both be even. |
Set Flash Write | |
---|---|
Write Parameter(s) | |
Byte | Description |
Bytes 0 - * | Data to write to flash memory |
This command is used to program data to flash. This command shall be called only after setting the start address and size using the Initialize Flash Read/Write Settings command. This command is a flash update command, and requires flash operations to be unlocked using Unlock Flash for Update command. Flash write commands can be chained till the initialized number of bytes are programmed. The bootloader will auto-increment the address and size for each command. Only the initialized number of bytes will be programmed even if more data is provided. It is important to send only even number of bytes per flash write command to ensure all bytes are written. This is done so that all flash writes are optimized as per the multi-word write supported by the flash device. This command supports variable sized payload. |
Get Flash Write | |
---|---|
Read Parameter(s) | |
Byte | Description |
Bytes 0-1 | Num bytes to read in this command |
Return Parameter(s) | |
Byte | Description |
Bytes 0 - * | The bytes read from the flash |
This command is used to read data from flash. This command shall be called only after setting the start address and size using the Initialize Flash Read/Write Settings command. Flash read commands can be chained until the initialized number of bytes are returned. The bootloader will auto-increment the address and size for each command. Only the initialized number of bytes will be returned. Calling the function after returning requested data will return in command failure. This command supports variable sized response. |
Get Checksum | |
---|---|
Read Parameter(s) | |
Byte | Description |
Bytes 0-3 | Start Address offset for checksum computation where Offset 0 refers to first byte in the flash, 1 refers to second byte and so on. |
Bytes 4-7 | Number of bytes to compute checksum |
Return Parameter(s) | |
Byte | Description |
Bytes 0-3 | Simple additive checksum |
Bytes 4-7 | Sum of simple additive checksum calculated at each address |
This command computes and returns the checksum starting at the given address for the specified number of bytes. Checksum is calculated as below : uint32 SimpleChecksum = 0; uint32 SumofSumChecksum = 0; uint08 *Addr = (uint08 *) StartAddress; while (NumBytes--) { SimpleChecksum += *Addr++; SumofSumChecksum += SimpleChecksum; } |
Set Reset Flash | |
---|---|
Write Parameter(s) | |
Byte | Description |
Byte 0 |
Chip Select 0 = Flash chip select 0 memory domain 1 = Flash chip select 1 memory domain 2 = Flash chip select 2 memory domain |
This command resets the Flash device connected to the given chip select. Any partial commands given gets reset and the flash is put in read mode. |