MCU Error Signal Monitor (ESM) is enabled with configurations as follows:
- Operating mode of the ESM is controlled through the MCU_ESM_CFG bit in the SAFETY_CFG3 SPI register, TMS570 mode is choosed.
- Set the Threshold of the low-signal duration from SAFETY_ERR_PWM_LMAX_CFG by choosing PWML_MAX value to be 0x3E.
- MCU_ESM_RST_EN bit in SAFETY_CFG3 register with 1b to make The device transitions to the RESET state.
- Set the threshold MCU_ESM_FC_RST_TH from SAFETY_CFG4 15
- Activated by setting the MCU_ESM_EN bit to 1b in the SAFETY_CHECK_CTRL SPI register.
Then at Runtime I read back the register SAFETY_ERR_STAT3 , it had a value of 0x05 indicated that there are no errors (the bits MCU_ESM_FAIL, MCU_ESM_ENDRV_F AIL and MCU_ESM_RST_FAIL are all zeros)
I tried to inject an error after this by asserting an error in the bit ERROR in the register ERRORSTS (by forcing an NMI) then cleared the NMI:
The PMIC does not perform the reset reaction and the software continued running, however when I read back the the register SAFETY_ERR_STAT3 , it had a value of 0x7F indicated that errors occurred (the bits MCU_ESM_FAIL, MCU_ESM_ENDRV_F AIL and MCU_ESM_RST_FAIL are ones).
According to the tps65313-q1: Figure 11-29. The NRES Driver and Logic
These are two conditions which makes the PMIC perform the reset reaction and they are met according to my test.
If I am missing any info or there are extra configurations I need to make please let me know.