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.

TI-RTOS warm boot

Hello,

I am using TM4C129. Does TI-RTOS support keeping current data after reset (warm boot) and how? The data I would like to keep includes bss, data and heap sections.

Thanks & regards,

Benson

  • Hi Benson,

    TI-RTOS does not have a power module that supports warm boot on TM4C129. You would need to write one on your own. Here's a short summary of how it could be done:
    - The application has a warm reset function that saves the bss, data and heap (as well as CPU regs) to non-volatile memory (if these sections were in memory whose state will be lost on a warm reset). It next initiates a warm reset.
    - The application registers a resetFxn (see rtsc.eclipse.org/.../Reset.html) that gets called when TI-RTOS starts up i.e. before bss/data have been initialized. This function checks to see whether cold/warm reset caused the core to boot. In case of a warm boot it will jump to a special function in the application that will restore the bss/data/heap (and any other state like CPU regs) and resume execution from the old point.

    Hope this helps.

    Best,
    Ashish
  • Hi Ashish,

    "The application registers a resetFxn (see rtsc.eclipse.org/.../Reset.html) that gets called when TI-RTOS starts up i.e. before bss/data have been initialized. "

    After the resetFxn, the restored data will be overwritten by the BIOS, right?

    Thanks,

    Benson

  • Anyone can help? Thanks!
  • Hi Benson

    Benson Lo said:

    "The application registers a resetFxn (see rtsc.eclipse.org/.../Reset.html) that gets called when TI-RTOS starts up i.e. before bss/data have been initialized. "

    After the resetFxn, the restored data will be overwritten by the BIOS, right?

    Yes, that is true only if resetFxn returns. If you read my original post, I mentioned that the resetFxn needs to determine if it was called because of a cold reset or warm reset. In case of a warm reset, it can restore the bss/data and then load the old state into the CPU registers. Loading the old state would take the execution back to the same point where "WFI" was called and the CPU was put to sleep.

    Best,

    Ashish