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.

TPS65381EVM: How to reach DIAGNOSTIC state after being in ACTIVE state without generating any kind of error?

Part Number: TPS65381EVM
Other Parts Discussed in Thread: TPS65381A-Q1

Hello everyone,

I am currently using the TI product TPS65381EVM with TPS65381A-Q1 PMIC. The purpose is to set the IGN_PWRL bit to 0 if the IGN pin was set to 0 (has no connection with the VBATP) in the ACTIVE state, so according to the global STANDBY conditions (IGN = 0 & IGN_PWRL = 0 & CANWU_L = 0) the PMIC can go to STANDBY. Since the IGN_PWRL bit is only rewritable in the DIAGNOSTIC state, the PMIC should go from the ACTIVE state through SAFE and RESET to the DIAGNOSTIC state for the IGN_PWRL bit to be changed. Now I am looking for possibilities to leave the ACTIVE state without generating any errors on the PMIC.

According to the datasheet the SAFE state can be entered from the ACTIVE state by:

1. An error in the signal on the ERROR/WDI pin detected by the MCU ESM while enabled. This transition is because of an error in the MCU and sets the ERROR_PIN_FAIL flag.

2. A detected read-back error on the NRES pin which sets the NRES_ERR flag while DIS_NRES_MON is cleared to 0 (1 in default state).

These two possibilities are connected with an error generating which I want to avoid.

Is there are any other possibilities to change IGN_PWRL bit without leaving the ACTIVE state or to reach the DIAGNOSTIC state after being in the ACTIVE state without generating any kind of error?

And I have also one more question. How can I check in what state is PMIC currently?

Thanks for your attention.

  • Hello Ivan,

    There are also the global standby and global reset conditions to leave the ACTIVE state, but most of those look like errors as well. I'm assigning this to the responsible application engineers, they may have a solution for you.

    > How can I check in what state is PMIC currently?
    You can read the SAFETY_STAT_5 register, it contains the current device state.

    Regards,
    Karl
  • Hello Karl,

    thanks for your answer. It would be great if they can help me with that, because I didn't found any option to leave the ACTIVE state except to set NO_ERROR bit to 0 with 0x9310 command. But it's only temporary solution, because this bit enables MCU ESM monitoring of the ERROR/WDI pin. And I have to simulate a failure, that causes a transition to the SAFE state.

  • Hi Ivan,

    Unfortunately there is no way to transition from ACTIVE state to DIAGNSOTIC state without injecting a fault and transitioning through STANDBY or RESET state. The MCU software will need to set an indicator in EEPROM or Flash so the boot software can look at this stored bit or bits and see it was an intentional RESET transition to clear the IGN_PWRL after reboot before causing the intentional fault case. The software then needs to inject a fault such as watchdog bad events (while WD_RST_EN = 1) to cause RESET state transition.  Another option is to use an error that causes with SAFE state as you outline below with SAFE state timeout enabled so the SAFE state timeout will cause a transition to RESET state.    

    Note: the boot s/w should then also immediately clear WD_RST_EN to 0 so another unexpected reset from WD is avoided.  

    You can check in what state is PMIC currently by reading the FSM[2:0] bits in the SAFETY_STAT_5 Register.  The FSM[2:0] bits decode the following:

    STANDBY state: 00h

    RESET state: 03h

    DIAGNOSTIC state: 07h

    ACTIVE state: 05h

    SAFE state: 04h

    Sorry the device cannot do directly what you are asking, but hopefully with one of these software options it will work for your system design.

    Please let us know if you have further questions.

    Best Regards,

    Scott

  • Hi Scott,

    thanks for your help. I'll try also another option with watchdog das events that you suggested. We'll see what option is less harmful for our purposes.

    Regards,
    Ivan