DLPU082B August   2021  – August 2022 DLPC7540

 

  1.   Programmer's Guide
  2.   Trademarks
  3. Scope
  4. References
  5. Acronyms
  6. System Boot
    1. 4.1 Data In flash
    2. 4.2 Bootloader Application
    3. 4.3 Main Application
    4. 4.4 Commands Supported by Bootloader and Main Applications
    5. 4.5 Debug Terminal
    6. 4.6 HOST_IRQ/SYSTEM_BUSY
    7. 4.7 Heartbeat
    8. 4.8 Low-level Fault
  7. System Status
  8. Version
  9. Power Modes
  10. Display Modes
  11. Source Detection and Configuration
  12. 10Internal sources
    1. 10.1 Test Patterns (TPG)
    2. 10.2 Solid Field (SFG) Color
    3. 10.3 Curtain
  13. 11Display Formatting
  14. 12Image Processing
  15. 13Illumination Control
  16. 14Peripherals
    1. 14.1 GPIO
    2. 14.2 PWM
  17. 15Interface Protocol
    1. 15.1 Supported Interfaces
    2. 15.2 I2C Target
    3. 15.3 USB
  18. 16Command Protocol
    1. 16.1 Command Packet
    2. 16.2 Response Packet
    3. 16.3 Destination Details
    4. 16.4 Error Handling and Recovery
    5. 16.5 System Busy - I2C scenarios
      1. 16.5.1 GPIO implementation
      2. 16.5.2 Short Status response
    6. 16.6 Support for Variable Data Size
  19. 17Auto-Initialization Batch File
  20. 18Command Descriptions
  21. 19System Commands
    1. 19.1  3D
    2. 19.2  Administrative
    3. 19.3  Autolock
    4. 19.4  Blending
    5. 19.5  Bootloader
    6. 19.6  Calibration
    7. 19.7  Debug Internal
    8. 19.8  Debug
    9. 19.9  General Operation
    10. 19.10 Illumination
    11. 19.11 Image Processing
    12. 19.12 Manual WPC
    13. 19.13 Peripherals
    14. 19.14 Warping
  22.   Revision History

Bootloader

Bootloader

Table 19-28 Boot Hold Reason [Opcode: 12h | Destination: 1]
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.

Table 19-29 Flash Info [Opcode: 20h | Destination: 1]
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

bit0: 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.

Table 19-30 Programmable Flash Sector Information [Opcode: 21h | Destination: 1]
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.

Table 19-31 Unlock Flash For Update [Opcode: 22h | Destination: 1]
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.

Table 19-32 Erase Sector [Opcode: 23h | Destination: 1]
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...

Table 19-33 Initialize Flash Read Write Settings [Opcode: 24h | Destination: 1]
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.

Table 19-34 Flash Write [Opcode: 25h | Destination: 1]
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.

Table 19-35 Checksum [Opcode: 26h | Destination: 1]
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;

}

Table 19-36 Reset Flash [Opcode: 27h | Destination: 1]
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.