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: Getting the device out of safe state

Part Number: TPS65381A-Q1
Other Parts Discussed in Thread: TMS320F28377D,

Hi,

I have been working on interfacing TPS65381A-Q1 with TMS320F28377D on our custom designed hardware. I am sure that SPI communication is working as I was able to read and write to registers successfully earlier when the chip is in DIAGNOSTIC STATE.

I am trying to use the watchdog in trigger mode and to have the correct watchdog sequence setup I am forcing to stay in diagnostic mode by setting DIAG_EXIT_MASK and clearing DIAG_EXIT.

But most of the times it is going to SAFE STATE and I am unable to get it back to DIAGNOSTIC STATE . Is there any way to bring it back to DIAGNOSTIC STATE from SAFE STATE?

Any help would be appreciated.

Thanks,

Bala Grandhi.

  • Hi Bala,

    Unfortunately on this device there is no software command way to go back to DIAGNOSTIC state from SAFE state without going through RESET state.

    During debug, before enabling reset from watchdog failures, maybe you can try the following minor change to configuration:
    1) staying in DIAGNOSTIC state for debug via the DIAG_EXIT_MASK bit (1) and cleared (DIAG_EXIT bit 0). Makes sure you are writing both of those to the intended states in one SPI write into the register to avoid some issues.
    2)Then work on the watchdog code while WD_RST_EN = 0, so the WD_FAIL bit will set but the device will not cause RESET which is likely then leading to SAFE state while debugging. You can tell if the watchdog code is stable by enabling the ENDRV (safing output) with the ENABLE_DRV bit. Once the watchdog code is stable and holds the watchdog failure counter (WD_FAIL_CNT) < 5, the ENDRV pin will go high. 3) Once this is debugged you can try setting WD_RST_EN to 1 and see if the device remains in DIAGNOSTIC state as expected.
  • Thanks for the response. I have figured out the problem. The chip is staying in the SAFE state even though I am following your step1 because DIAGNOSTIC State time out is happening before I am writing to those registers.