SLVUCZ6B November   2024  – March 2026 TLC69627-Q1 , TLC69628-Q1 , TLC69629-Q1 , TLC69637-Q1 , TLC69638-Q1 , TLC69639-Q1

 

  1.   1
  2.   Abstract
  3.   Trademarks
  4. 1Introduction
  5. 2Software Setup
  6. 3Sample Code Structure
    1. 3.1 Design Parameters
    2. 3.2 Flow Diagram
    3. 3.3 Basic System Setup
    4. 3.4 Advanced System Setup
    5. 3.5 Diagnostics
    6. 3.6 Demo
  7. 4Revision History

Diagnostics

The sample code provides an API to detect which LED driver devices have faults such as Thermal Shutdown (TSD), LED open (LOD), LED short (LSD), and Adjacent Pin Short (APS). For the LOD, LSD, LED_CHK, DRV_CHK, and APS, the failing channel is also detected. In addition, when macro USE_CONN_IC is set to _TRUE, the faults detected by the UPAC device are read. Within the TLC6962x_3x_APIs.h file, the prototype of the API is defined.

void LED_Update_Chip_Status(void);

This API updates the variable chip_status which is defined in file system_info.h.

struct busStatus {
    uint16_t chip_index;      // Show Chip Index
    uint16_t LOD;             // LED Open Detection
    uint16_t LSD;             // LED Short Detection
    uint16_t FB_OVF;          // Device FB overflow flag
    uint16_t COMM_ERR;        // Device communication error flag including CRC, COMM_LOSS, CMD_ERR, TOUT_ERR, MEM_ERR
    uint16_t UVLO;            // Device UVLO flag
    uint16_t TSD;             // Thermal Shutdown
    uint16_t PIN_ERR;         // Device PIN error flag including APS, LED_CHK, DRV_CHK, ISET_O, ISET_S
    uint16_t BIST;            // Device BIST error flag including WDOG_BIST, TOUT_BIST, OTP_CRC
    uint16_t DEV_MODE;        // Device mode
    uint16_t DEC;             // Device FB decrease flag
    uint16_t INC;             // Device FB increase flag
    uint16_t APS;             // Device Adjacent Pin Short flag
    uint16_t DRV_CHK;         // Device DRV_CHK flag
    uint16_t LED_CHK;         // Device LED_CHK flag
    uint16_t CRC;             // Device CRC flag
    uint16_t COMM_WDOG;       // Device COMM_WDOG flag
    uint16_t CMD_ERR;         // Device CMD_ERR flag
    uint16_t TOUT_ERR;        // Device time-out error fla
    uint16_t ISET_O;          // Device ISET open flag
    uint16_t ISET_S;          // Device ISET short 
    uint16_t SRAM_CRC;        // Device MEM_ERR flag
    uint16_t OTP_CRC;         // Device OTP CRC error flag
    uint16_t WDOG_BIST;       // Device watchdog BIST error flag
    uint16_t TOUT_BIST;       // Device time-out BIST error flag
    volatile OUTx LSD_channels[MAX_SCAN_LINES];
    volatile OUTx LOD_channels[MAX_SCAN_LINES];
    volatile OUTx APS_channels[MAX_SCAN_LINES];
    volatile OUTx DRV_CHK_channels[MAX_SCAN_LINES];
    volatile OUTx LED_CHK_channels[MAX_SCAN_LINES];

};

struct chipStatus {
    struct busStatus busStatus[MAX_CASCADED_UNITS];
#ifdef _TLC69698
    uint16_t ERR;                      // Global error flag
    uint16_t POR;                      // Power-On-Reset flag
    uint16_t OTP_CRC;                  // OTP CRC error
    uint16_t DEV_STATE;                // Device state
    uint16_t CTRL_IF_CRC;              // SPI/UART CRC error
    uint16_t CTRL_IF;                  // SPI/UART error
    uint16_t CTRL_IF_TIMEOUT;          // SPI/UART reset timeout error
    uint16_t SPI_CS;                   // SPI Chip Select (CS) pin error
    uint16_t UART_NE;                  // UART Noise Error
    uint16_t UART_FE;                  // UART Frame Error
    uint16_t UART_RST;                 // UART Reset
    uint16_t CSI_IDLE;                 // CSI Peripheral in IDLE state
    uint16_t FIFO;                     // FIFO error
    uint16_t RXFFOVF;                  // Receive FIFO overflow
    uint16_t TXFFOVF;                  // Transmit FIFO overflow
    uint16_t DAISY_CHAIN;              // LED driver error
    uint16_t LOD;                      // Daisy Chain LOD flag
    uint16_t LSD;                      // Daisy Chain LSD flag
    uint16_t DRV_IF;                   // CSI interface error
    uint16_t CSI_COMM_WDOG;            // Device CSI communication watchdog flag
    uint16_t CSI_TOUT_ERR;             // Device CSI time-out error flag
    uint16_t CSI_CMD_ERR;              // Device CSI command error flag
    uint16_t CSI_CRC;                  // Device CSI CRC flag.
    uint16_t FLTSUM_ONGOING;           // Fault summary cycle in progress flag.
    uint16_t FLTSUM_DATAVALID;         // Fault summary data valid flag.
    uint16_t DEV_CNT_LOD_LSD;          // Device count that have LOD and/or LSD.
    uint16_t ZONE_CNT_LOD_LSD;         // Total zone count that have LOD and/or LSD.
    uint16_t SZ_CNT_LOD_LSD;           // Total safety zones channel count that have LOD and/or LSD.
#endif
};

// For diagnostics
extern struct chipStatus chip_status[BUS_NUM];

The variable chip_status can be watched in the Expressions view during the debug of the code by following the steps in Watching Variables, Expressions, and Registers. An example without any error is depicted in Figure 3-5. The first index of variable chip_status is the daisy chain index. On the EVMs there is only one chain. For the flags of the LED drivers, the busStatus variable is used which has an index for each LED driver in the chain. On the TLC69628Q1EVM and TLC69698Q1EVM there are 2 devices cascaded and, therefore, busStatus runs from 0 to 1. For TLC69622Q1EVM and TLC69625Q1EVM there is only 1 device cascaded and, therefore, busStatus only has index 0.

 Example of Watching Expression
                    chip_status Without Errors Figure 3-5 Example of Watching Expression chip_status Without Errors
 Expanded Example of Watching
                    Expression chip_status Without Errors Figure 3-6 Expanded Example of Watching Expression chip_status Without Errors

Figure 3-6 depicts an expanded view of the chip_status variable. For each of the two LED drivers in the daisy chain, the chip index and fault status bits are shown. In addition, for the LSD, LOD, LED_CHK, DRV_CHK, and APS faults the actual output channel that has the fault can be found. An example of LOD fault is depicted in Figure 3-7. In this example, chip index 1 (which is index 0 of busStatus) has an LOD fault. When array LOD_channels is expanded, the expansion shows that the fault occurs on pin OUT12. The LOD_channels is an array with only 1 index because for the TLC6962x/TLC6963x-Q1 devices there is only 1 scan line.

 Example of chip_status With
                    LED Open (LOD) Fault Figure 3-7 Example of chip_status With LED Open (LOD) Fault

When the LED drivers are paired with the UPAC device, the chip_status variable also shows the error flags of the UPAC device. An example without any fault is depicted in Figure 3-8. For each daisy chain (first index of chip_status) the error flags are listed. Note that CSI_IDLE is 1, because during the diagnostics no messages is forwarded by the UPAC device. FLTSUM_DATAVALID is 1 because the diagnostics in the sample code happens after the first cycle of the Fault Summary of TLC69698-Q1.

 Example of chip_status Without Errors When Paired With TLC69698-Q1 Figure 3-8 Example of chip_status Without Errors When Paired With TLC69698-Q1

An example of an LOD fault when using the UPAC device is depicted in Figure 3-9. In this example both DAISY_CHAIN and LOD flags in TLC69698-Q1 are set. Moreover, the fault summary feature of the TLC69698-Q1 counted that there is 1 device with a fault (DEV_CNT_LOD_LSD) and that there is 1 LED zone with a fault (ZONE_CNT_LOD_LSD). The LED zone which is failing is not indentified as a so-called safety zone in the LED driver. Therefore, SZ_CNT_LOD_LSD is still 0.

 Example Showing Expression chip_status With LOD Fault When Paired With
                    TLC69698-Q1 Figure 3-9 Example Showing Expression chip_status With LOD Fault When Paired With TLC69698-Q1

In the example depicted in Figure 3-10 the fault summary counted 3 LED faults in 2 devices where all 3 LED zones have been specified as so-called safety zones. When safety zones fail, the TLC69698-Q1 also records the location of the faults. Those locations can be found in variable fault_summary which is depicted in Figure 3-11. The entry after the last valid entry is filled with 0xFFFF to indicate the end of the array. That means that in the example index 3 of the array is filled with 0xFFFF because indices 0 to 2 have the valid locations of the failing LED safety zones.

 Example Showing Expression chip_status With 3 Faults When Paird With
                    TLC69698-Q1 Figure 3-10 Example Showing Expression chip_status With 3 Faults When Paird With TLC69698-Q1
 Example Showing Expression fault_summary With 3 Faults When Paired With
                    TLC69698-Q1 Figure 3-11 Example Showing Expression fault_summary With 3 Faults When Paired With TLC69698-Q1