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.

TPS3851: Watchdog Timer initialization issue

Part Number: TPS3851

Hi,

We are using TPS3851 for External watchdog configuration. We are facing issue with its initialization.

The code snippet we are using for the initialization is as below:-

FUNC(void, BT_GLOBAL_CODE) PLATFORMTda2xxSetPinmuxRegs(C_UINT32 baseAddrOffset, C_UINT32 ioPinCfg)
{
    C_UINT32 tmpRegVa ;

C_UINT32 regVal=0U;
/* Unlock MMR_5 for pin muxing*/ HW_WR_REG32(0x4A002550U, 0x6F361E05U); tmpRegVal = HW_RD_REG32(SOC_CORE_PAD_IO_REGISTERS_BASE + baseAddrOffset); tmpRegVal &= ~(0xF000FU); tmpRegVal |= (ioPinCfg & 0xF000FU); HW_WR_REG32((SOC_CORE_PAD_IO_REGISTERS_BASE + baseAddrOffset), tmpRegVal); /* Lock MMR_5 for pin muxing*/ HW_WR_REG32(0x4A002550U, 0x143F832CU); regVal = HW_RD_REG32(0x48460014U); regVal |= 0x00000800U; HW_WR_REG32(0x48460014U, regVal); }

We are unable to configure the Watchdog Timer using the above code.

Please give your comments on which all registers need to be configured for enabling External Watchdog and the procedure of doing the same.

  • Ashish,

    Your code is difficult to follow out of context. No code is needed to initialize the watchdog. The watchdog pin on TPS3851 simply needs a falling edge before the watchdog time out expires. An example of pseudocode (very high level informal code) might be:

    start by physically connecting the MCU GPIO pin to the WDI pin of the TPS3851

    Upon TPS3851 power up:

    Code start:

    initialize function:

    {initialize MCU GPIO to output

    Wait 150us after Watchdog being enabled}

    watchdog trigger function:

    { Set GPIO pin "high"

    wait 50ns

    Set GPIO pin "low" before "t_WD" expires}        

    Code End.

    //Note: keep WDI low majority of time to prevent excess current draw. Bring high then low before "t_WD" to prevent WDO from triggering

    As long as there is a falling edge on the WDI pin before the watchdog timeout t_WD, the device will not trigger a watchdog timeout event.

    Please refer to Figure 2 in the TPS3851 datasheet.

    I hope this basic example helps! Please let me know if you have any questions.

    -Michael

  • Hi Michael,

    Thank you for the reply.

    We are using TPS3851 External watchdog with TDA2Ex.

    As per the TDA2Ex_TRM, the pin connected to WDI is a multiplexed pin.

    So, we need to make the pin as gpio first. And then we need to configure gpio4_17 as output.

    We want to toggle the WDI pin through gpio4_17.

    Please let us know the procedure to configure the multiplexed pin as gpio, make it as output and toggle the WDI pin.

    Regards,

    Ashish
  • Ashish,

    Same response as the other E2E thread on this topic. Unfortuantely I can only support your voltage supervisor questions and needs. You need to refer to the TDA2Ex datasheet and user guide to figure out the proper configuration of the GPIO pin for that device. If you believe you have the correct configuration and the Voltage Supervisor is not responding how it should, then I can work with you to figure out why. You need a falling pulse on the WDI pin before I can help troubleshoot. Best of luck!



    -Michael