SLVAFT2B May 2024 – April 2025 TPS2HCS10-Q1
The I2T trip code examples shows how to handle an event on the high-side switch when an I2T event happens in the system. This code example assumes that the device is set up to LATCH mode for I2T faults and shows the correct sequence of events to reset the device after the I2T event occurs. In auto-retry mode (where TCLDN_CHx of the I2T_CONFIG_CHx register are set to a timeout), the device automatically waits the appropriate duration of time before re-enabling the channel.
Note, that in this code example the FAULT pin is set up to be used as a falling edge interrupt. When the I2T trip occurs, the FAULT pin (which is open drain) is pulled low and the microcontroller is interrupted. The software on the microcontroller can then wake up device execution and take the necessary mitigations to reenable the device. In LATCH mode, the following are appropriate steps to take after the I2T trip event occurs is to:
The following is a relevant snippet of code:
if(currentValue & TPS2HCSXX_FLT_STAT_CH1_I2T_FLT_CH1_MASK)
{
/* Disabling the channel */
HCS_setSwitchState(0);
/* Setting the device to 2s retry state */
exportConfig.i2tConfigCh1.value.bits.TCLDN_CH1 =
(tcldn_ch1_en_4p0s_mask);
HCS_writeRegister(TPS2HCSXX_I2T_CONFIG_CH1_REG,
exportConfig.i2tConfigCh1.value.word);
/* Waiting for two milliseconds. At this point, normally
yield the tasks if in an RTOS, but wait for
an interrupt here. */
DL_TimerA_startCounter(TIMER_0_INST);
while(timerTriggered == false)
{
__WFI();
}
timerTriggered = false;
/* Setting back to latch mode */
exportConfig.i2tConfigCh1.value.bits.TCLDN_CH1 = 0;
HCS_writeRegister(TPS2HCSXX_I2T_CONFIG_CH1_REG,
exportConfig.i2tConfigCh1.value.word);
/* Re-enabling the channel */
HCS_setSwitchState(1);
}