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: How to exit the SAFE state without cycling the power?

Part Number: TPS65381A-Q1

It appears that we are blocked from writing to the SAFETY_FUNC_CFG Register after the  TPS65381A-Q1 powers-up and enters the SAFE state.

The board powers up and the bootloader waits for 8 seconds for an external command. If the command does not occur, then the code is loaded and executed. However, the TPS65381A-Q1 is in the SAFE state at this point.

Is there a was set TPS65381A-Q1 into reset mode and then diagnostic mode from starting in the safe mode?

  • Hello, device operating states, shows these conditions for transitioning from safe to reset state: 

     

    ( NO_SAFE_TO = 1 AND DEV_ERR_CNT[3:0] < SAFE_LOCK_THR[3:0] + 1

    AND SAFE STATE TIME-OUT) or

    ( NO_SAFE_TO = 0 AND SAFE STATE TIME-OUT)

     

    Scott is copied for additional inputs.

    Regards

  • Hello Leo,

     

    The TPS65381A-Q1 powers up and will transition through RESET state to DIAGNOSTIC state. If the system MCU and software does not respond within the DIAGNOSTIC state timeout time (~512ms) the device will automatically transition to SAFE state since the MCU has not responded in time. If there has been no configuration done from the MCU it is difficult to get back out of SAFE state since it is designed as a trap against malfunctioning MCU's/software in these functional safety systems.

     

    Please see section 5.4.19 Device Operating States and Figure 5-16 for details on the device states, how to transition between them and on Figure 5-16 there are tips about using DIAG_EXIT_MASK bit for software debug purposes to avoid scenarios like this during system development.

     

    If the MCU and software can configure the device within the DIAGNOSTIC state timeout, then various paths to force RESET state can be used to cycle the device back through RESET state to DIAGNOSTIC state such as SAFE state timeout mentioned by Mahmoud, or forcing a watchdog reset for example.

     

    The best option usually for software development is to write a small bootloader that will get the MCU to the point where it can write the DIAG_EXIT_MASK bit to 1, to hold the TPS65381A-Q1 in DIAGNOSTIC state, then run the standard debugger tools once the PMIC has reached and is held in DIAGNOSTIC state.

  • Thanks Scott,

    During startup, is it possible to keep the TPS65381A-Q1 device in diagnostic mode for longer than ~512ms? For prototyping reasons, the initialization code today takes longer than ~512ms to be loaded.

    - Leo 

  • Hi Leo,

    The only way to keep the device in DIAGNOSTIC state at start up is to set the DIAG_EXIT_MASK bit to 1 before the ~ 512 ms DIAGNOSTIC state timeout occurs.  Thus a small boot loader to handle just that task is normally needed to control the PMIC before the rest of the prototype/debug process continues.