This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

[FAQ] RE: TPS65381-Q1: Debug Mode

Other Parts Discussed in Thread: TPS65381-Q1, TPS65381A-Q1

Kindly reply to my TPS65381-Q1: Debug Mode question

And I have another query. ERROR_PIN_FAIL is always set even though ERROR/WDI pin is always high (MCU ESM Module detects no failure) and I am reading ERROR_PIN_FAIL status before Diagnostic state timeout. Hence i am expecting ERROR_PIN_FAIL bit should be low.

Let me know why ERROR_PIN_FAIL bit is always set?

  • Yusup,

      Please read this section closely. Remember that you must be in the DIAGNOSTIC state to update the SAFETY_ERR_PWM_x register.

    5.4.16 MCU Error Signal Monitor (MCU ESM)

    This block monitors the external MCU error conditions signaled from the MCU to the device through the

    ERROR/WDI input pin. The MCU ESM is configurable to monitor two different signaling options depending

    which functional safety architecture MCU family is being monitored and how the specific MCU family

    indicates on the error or fault output pin improper operation. The MCU ESM mode is selected through the

    ERROR_CFG bit in the SAFETY_FUNC_CFG register.

    In TMS570 mode the ESM detects a low-pulse signal with a programmable low-pulse duration threshold

    (see Section 5.4.16.1). This mode is selected when the ERROR_CFG bit is set to 1. In PWM mode the

    ESM detecting a PWM signal with a programmable frequency and duty cycle (see Section 5.4.16.2). This

    mode is selected when the ERROR_CFG bit is cleared to 0 (default). PWM mode can be used as an

    external clock-monitor function.

    The MCU ESM is deactivated by default. To activate it, clear the NO_ERROR bit to 0 in the

    SAFETY_CHECK_CTRL register.

    NOTE

    Activating the MCU ESM is only recommended when the watchdog is configured in Q&A

    mode, otherwise the ERROR/WDI pin is used both for watchdog trigger input and MCU error

    signaling.

    The low-signaling duration threshold (for TMS570 mode) or the expected PWM low-pulse duration (for

    PWM mode) is set through the SAFETY_ERR_PWM_L register. The expected PWM high-pulse duration

    (for PWM mode) is set through the SAFETY_ERR_PWM_H register. A detected MCU signaling error is

    indicated when the ERROR_PIN_FAIL bit in the SAFETY_ERR_STAT register is set to 1.

    NOTE

    An update to a SAFETY_ERR_PWM_x register (only possible in the DIAGNOSTIC state)

    has an immediate effect. Therefore, if the MCU writes a new value to the

    SAFETY_ERR_PWM_x register which is less than the value of the current pulse-duration

    counter value, the MCU ESM immediately detects an error condition on the ERROR/WDI

    pin. The pulse duration counter then reinitializes to 0 and sets the ERROR_PIN_FAIL bit to 1.

    When the TPS65381A-Q1 device is in the DIAGNOSTIC state, the MCU can emulate a signaling error

    (emulated fault-injection) for a diagnostic check of the error-signal monitor by checking the status of the

    ERROR_PIN_FAIL bit while the NO_ERROR bit is cleard to 0 (MCU ESM enabled) without a transition to

    the SAFE state.

    Let me know if you still need help.