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.

TPS65381A-Q1: WD_FAIL_CNT in DIAG when Writing WD_WIN1_CFG

Part Number: TPS65381A-Q1

Hi,

My customer reported when they write to WD_WIN1_CFG and WD_WIN2_CFG in DIAG, the WD_FAIL_CNT changes to 7 from 5 when it goes to ACTIVE, this forces them to make two good events to decrease the CNT to 5 when it just goes to ACTIVE, is this the normal process? If not, any suggestion for me to debug this issue? Thanks.  

  • Hi Wayne,

    Anytime the WD_WIN1_CFG or WD_WIN2_CFG registers are written to, the WD_FAIL_CNT will increment by +1 (unless the counter is at the maximum of 7).  A write to these registers also ends the current WD sequence and starts a new one so it is easy for the MCU to synchronize to the TPS65381A-Q1 since the MCU knows a new sequence started immediately after the write to WD_WINx_CFG.  

    As documented in section 5.4.23 ACTIVE state,  "The WD_FAIL_CNT[2:0] counter reinitializes to 5 during a transition from the DIAGNOSTIC state to the ACTIVE state.".   The WD_FAIL_CNT[2:0] counter also reinitializes to 5 during a transition to DIAGNOSTIC state from RESET state and if LBIST is run.

    Thus this seeing WD_FAIL_CNT re-initialize to 5 upon entry to ACTIVE state is expected.

  • Scott,

    Thank you.

    To double confirm with you, even if the WD_WIN1_CFG and WD_WIN2_CFG are written during DIAG which causes WD_FAIL_CNT increment by +1 and +1 to 7, the CNT will be reinitialized to 5 upon entry to ACTIVE. Right? 

  • Hi Wayne,

    Doubly confirmed, it will reinitialize to 5.  Every transition into ACITVE state will re-initialize the WD_FAIL_CNT to 5.  Again this is in the datasheet and fully expected:  As documented in datasheet section 5.4.23 ACTIVE state,  "The WD_FAIL_CNT[2:0] counter reinitializes to 5 during a transition from the DIAGNOSTIC state to the ACTIVE state."

    Scott

  • Hi Scott,

    Thanks for the confirmation.

    I also double confirmed with customer, they misled me. The fact is that they configured WD_WINx_CFG before DIAG so the CNT is 7 when it is in DIAG. I know WD_WINx_CFG can only be written in DIAG state, however, looks like it is OK to write them before DIAG, is it true and any potential issue if write WD_WINx_CFG before DIAG? They want to do this to save some configuration time. Thanks. 

  • Hi Wayne,

    The first state the device enters into after RESET state is DIAGNOSTIC state so it that is when the device should be configured including the WD_WIN_CFGx registers.  The expected flow is to set up the WD as required for the application including the WD_WIN_CFGx registers and then run the diagnostics for the watchdog.