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.

TPS65381 Stuck In Safe Mode - This is 3137 Based Design

Other Parts Discussed in Thread: TMS570LS3137

Hello All,

I have followed what is in this doc:

And by power cycling the design (IGN) have got the code to run - but more often it gets stuck in SAFE mode; and/or the SPI commands in the ecmpInit() get stuck.

In the example code:  (sys_main.c)

_mpuInit_();

/* avoid TPS65381 to transit to ACTIVE operating state */

//Hercules_TPS65381
spiInit();

/* avoid TPS65381 to transit to ACTIVE operating state */
//Hercules_TPS65381
sciInit();
ecmpInit();
if(ecmpIfGetRegister(ECMP_SAFETY_STATUS5) != 7)
{
//TPS65381 does not stay in diagnostic state.
sciSend(scilinREG, 46, (uint8_t *) "\r\nTPS65381 is NOT in DIAG state, toggle IGN!\r\n");
while(1);
}

Can someone outline exactly what is taking place to 

'avoid TPS65381 to transit to Active Operating state' ?

Thanks In Advance,
John W.

  • Hi John,

    I will answer this from the TPS65381 viewpoint, but if it is a question to the Hercules team on how to use the software you would need to post to their forum, I can support them if they need help with the TPS65381 in your use case. 

    Most likely when you are using IGN a couple of things are occurring that could lead to SAFE state.  Most likely you are not configuring the TPS65381 via the SPI software fast enough and then transiting the TPS65381 to ACTIVE state before the DIAGNOSTIC state timeout occurs, which will cause the device to go to SAFE state.  You have ~580ms from power up of TPS65381 to get to ACTIVE state or to set the DIAG_EXIT_MASK bit to mask the diagnostic state time out, usually to allow for software debug. 

    If you made it to ACTIVE state either an ERROR_PIN_FAIL or NRES_ERR could also send you to SAFE state. 

    These can be seen in the state diagram, Figure 5-16 on page 65 in the datasheet. I put the key section below.

    Scott

  • Hello Scott,

    Thanks for this reply - I definitely think at this point the issue is on the TPS85381 side vs. 3137 side.

    I will give what you are suggesting a try and get back with you - I think what I am doing at boot-time could be affecting the timing.

    I am vectoring the start of this through the bootloader - and I haven't really timed that process but there is obviously a little time being 
    burned there; plus setting up some other peripherals so that is probably where the issue is.

    I will try setting the DIAG_EXIT_MASK and let you know how this goes.

    Thanks,
    John W.

  • Hi,

    The hercules software team provides a product call SafeTI diagnostic Library which provides a new TPS Driver also along with it.The package includes demo applications which can be run on safety hitex kit and the Control Cards.I think you should be able to re use this example code meant for the TMS570LS3137 hitex kit for your purpose the examples have been unit tested also.

    You should be able to directly able to use the examples(Hitex kit examples).The below link gives more infomration on how we have configured Halcognen so as to interface TPS65381

     

    Let me know if this helps.

    Regards

    Manoj

  • Manoj,

    By new driver - do you mean the one that was released in Feb. 2015 - r2.2.0?
    If so, I have taken a look at that and that was why I looked at spna176a.pdf.

    If there is a newer rev - please let me know where it is.

    Thanks,
    John W.

  • Hello Again Scott,

    I was able to reign in my boot time timing - and this seems to be OK now.

    I also enabled WDOG on the 65381 - wow - that seems to work really good. ;)
    Just need to get the windowing dialed in at this point on that.

    If it's OK - I would like to keep this open for a little while in case I uncover any other issues - if that is alright with you.

    Thanks for your help!
    John W.
  • Yes I mentioned about the feb 2015 release.It is different compared to the implementation mentioned in spna176a.pdf.That is the code base which we are supporting as of now for TPS65381.