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.

CCS/TMS570LS0332: the problem between MCU and TPS65381

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

Tool/software: Code Composer Studio

Dear E2E:

    I have a problem about the TPS65381,when MCU set  an esm error to TPS65381.

    Configuration:

    1. The connection of  hardware between tps65381 and tms570 :  the same as show in document of TPS65381A-Datasheet(Rev A) (P103 Figure 6-9)

    2. The configuration of tps65381: PWD_THR = 0X5u, TPS_WDT_WIN1_CFG = 0x2u, TPS_WDT_WIN2_CFG = 0x1u

    Phenomenon:

    condition1:  1. check the error pin monitoring (this function I used in the TI Library: bool TPS_TestErrorPinMonitoring(TPS_Test_Result * ErrorPinMonitoring_Test))

                      2. First, using the fixed window(TPS_WDT_WIN1_CFG = 0x2u, TPS_WDT_WIN2_CFG = 0x1u) to check the error (ANSWER_ERR, SEQ_ERR, TIME_OUT, ANSWER_EARLY) of TPS

                         Second, changing the the fixed window of TPS (TPS_WDT_WIN1_CFG = 0x27u, TPS_WDT_WIN2_CFG = 0x18u)

    when I use one of the condition1 as above and esm error to tps65381 , the status of tps65381 : active state ->  safe state -> reset state -> diagnostic state ->safe state ... -> dagnostic state -> active state. the reson of Dagnostic state to safe state is the conditon1 can not be passed ,it will be dead in the function. When DEV_ERR_CNT = PWD_THR, the status of tps will enter into standby state, then tps will pass the function of the condition1 , then tps enter into active state.

    Question: 1. when I set the PWD_THR > 1 , the tps65381 can not pass the function of condition1 as above. what's the reason of this problem?

                   2. What is the meaning of the PWD_THR and how to use it?

                   3. When NO_SAFE_TO = 1 AND DEV_ERR_CNT[3:0] >= SAFE_LOCK_THR[3:0] + 1 , how to jump out of the safe state?

    

  • Hi Yu,

    I don’t think I fully understand all your settings for the software or device or the question but I will provide the best answers I can and ask clarifying questions.  From this forum we only support the TPS65381A-Q1 so software specific questions will need to be posted on the TMS570/Hercules forum if needed.

    Can you please clarify that you are using 0xYu as an indicator for a hex value Y?

    Answer 1: There may be three separate reasons that could be causing the state transition described:

    a) WD_WIN1_CFG is set to 2 hex, WD_WIN2_CFG is set to 1 hex.  If this is the case these will not be usable settings in the watchdog timer of the TPS65381A-Q1.  Please see section 5.4.12 Watchdog Sequence in the TPS65381A-Q1 datasheet.  In this section the timing tolerance formulas for the window1 and window2 of the watchdog are given. It is recommended to use at a minimum 02 hex and 02 hex in the  WD_WINx_CFG register settings.  Using 02 hex and 01 hex for the windows will leave the known time for window 2 of only 1.05 to 1.16 ms after the synchronization event.  That will be very difficult for a MCU with it’s own clock tolerance to achieve an answer into the TPS65381A-Q1 (Answer-0) correctly in Window 2 for a good event.  You may be seeing the combination of these states because MCU is not re-synchronizing in time after a reset and you are getting a mixture of RESET state due to watchdog failure and SAFE state due to MCU ESM failures.  Please see the datasheet Figure 5-16 Device Controller State Diagram.  In this figure you will see watchdog failures while WD_RST_EN is set to 1 will cause RESET state and MCU ESM failure will cause SAFE state.

    b) The other two reasons you may be seeing this state transition is not correctly understanding the PWD_THR, NO_SAFE_TO, SAFE_LOCK_THR, SAFE_TO and how they related to the device state machine.  

    a. You have PWD_THR, NO_SAFE_TO, SAFE_LOCK_THR, SAFE_TO configured so you are seeing a SAFE state time-out.  See the NOTE section in section 5.4.24 SAFE State of the datasheet for SAFE state timeout and the configuration options.  This is the path from SAFE to RESET in Figure 5-16.

    b. If the PWD_THR  is programmed to a value lower than SAFE_LOCK_THR the device will transition to STANDBY state on each transition into SAFE state when DEV_ERR_CNT >= PWD_THR.  Keep in mind if PWD_THR causes a transition to STANDBY state while IGN and/or CANWU pin is high, the device will immediately re-power up to RESET state then DIAGNOSTIC state. It will only be in STANDBY state for one device internal clock cycle. This is the path from SAFE to STANDBY then back to RESET in Figure 5-16.

    Answer 2:  PWD_THR is the power down threshold. As mentioned in answer 1, it’s impact on the device states is shown in Figure 5-16. Details about how to use it are on the NOTE section in section 5.4.24 SAFE State of the datasheet.  DEV_ERR_CNT is incremented every time the device transitions to SAFE state.  What happens next depends on the settings of PWD_THR, NO_SAFE_TO, SAFE_LOCK_THR, and SAFE_TO.  Depending on your application you can configure these registers to the TPS65381A-Q1 will lock in SAFE state indefinitely, stay in SAFE state until SAFE state time-out then RESET state or power down to STANDBY state assuming the wake up request source is low.

    Answer 3:  In this case a forced state transition must occur.  There are a few options as shown in Figure 5-16 that could work. These are:

    1) Power down to STANDBY state (IGN = low and ignition power latch not used, CANWU = low and WR_CAN_STBY command sent).

    2) Force RESET state by having the MCU intentionally send either bad events or timeout events to the watchdog

    3) Force RESET state via WR_CAN_STBY command if CANWU pin was used to wake up the device.  Even if CANWU remains high, if it was the pin that woke up the device and CANWU_L is set to 1, the WR_CAN_STANDBY will still cause a transition to STANDBY state for 1 internal clock cycle then the device will immediately go to RESET state then DIAGNOSITIC state.  

    Best Regards,

    Scott

  • Hi Scott,
    Thank you for your reply!

    Can you please clarify that you are using 0xYu as an indicator for a hex value Y?
    The 0xYu means a hex value Y.

    For your advice, I will try some test for Tps. If I have a question, I will consult you again.Thank you!

    Best Regards,

    CY