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.

Use of reset cause in Tiva C Series

Hi all,

I had a problem, tracked here: http://e2e.ti.com/support/microcontrollers/tiva_arm/f/908/p/333519/1166547.aspx where I could not read the Reset Cause using TivaWare.

I found out that this is because TI-RTOS/BIOS is clearing the Reset Cause register when it's started. There's an excellent argument in that thread that this should be considered as a bug, which I'll reproduce here:

Agreed Benjamin,

Unless the RTOS performs a documented action based on the source of the reset it should not be clearing the reset cause register and maybe not even then.  The application may have good reason not to clear the register.

If the RTOS is not performing any action based on the reset source (reading the cause and storing it somewhere else certainly doesn't count2 and seems at best a waste) then it has no business clearing that register.  It can only be a source of bugs1 and as such I would consider it a bug myself.

Robert

1 - Since it does not have a useful purpose, then at best it has no effect.  Since any code is potentially a bug source the only real effect of code that does nothing is to introduce a source of bugs.

2 - Especially if it is undocumented.


In that thread, I state that I couldn't find anything in the RTOS user's guide to indicate that this register is cleared, or why it was being cleared rather than left in a state where TivaWare could read it. Can someone from TI indicate whether or not they'll consider this a bug? If not, why not? And if it's an intentional feature, where is it documented?

I'll also note that if it's intentional, someone needs to slap a big warning sign on TivaWare that BIOS 'does not play well with others' regarding the contents of these registers, but I suspect that's a post on the TivaWare forums, not here.

  • Benjamin,

    While I'm not trying to proclaim innocence here, I have reviewed all the code I know of that TI-RTOS is contributing to a project and I see no reference to the Reset Cause register, nor calls to ResetCauseClear().

    Can you provide more information about your application? Which version of TI-RTOS are you using? Which driverlib libraries are you using?

    Alan