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.

Stack and .cinit initialization after Watchdog reset

Other Parts Discussed in Thread: TMS320F28335

Hi,

I am using TMS320F28335 controller and have few queries on stack and cinit initialization after watchdog reset.

  1. Similar to Hard/Power reset whether stack and cinit will be initialized/called after watchdog reset.
  2. If stack and cinit are reinitialized after watchdog reset, then is there any possibility to skip the re-initialization of stack and cinit after watchdog reset. 

Thanks & Regards

Vishnu Beema

 

  • We compiler folks are not experts on system initialization issues like this.  We do provide the RTS (runtime support) library routine c_int00 which initializes the C runtime environment and calls main.  It is in the source file boot.asm.  That source file, along with the rest of the RTS source, is in the \lib directory file rtssrc.zip.  Feel free to adapt that routine to whatever your system needs are when a watchdog reset occurs.

    Thanks and regards,

    -George

  • Hi George,

    Thank you for your comments. I am not sure to which forum will the question suits best. I am not able to move the question from one forum to to other forum. Can you please let me know how to move the question to other forum.

    Thanks & Regards

    Vishnu Beema

  • Hi Vishnu

    what exactly do you mean by stack and cinit initialized after a HARD/POWER reset?  By stack initialization - do you mean setting the right stack pointer needed by application?

    cinit is performed in software by calling respective RTS library function and moreover device boot flow will be same after a watchdog reset or after a external reset or after power up. If you have proper RTS library functions being called after a power up then they should be called even after a watch dog reset.

     

    Best Regards

    Santosh

  • Hi Vishnu,

    The watchdog reset is the same as hard reset, that is CPU starts executing the code from pointed to by reset vector at 0x3FFFC0 (InitBoot function). After the boot rome code is through the program flow continues with the code supplied by the user (if you use TI support code this should be the code within "DSP2833x_CodeStartBranch.asm"). while you can change the code within mentioned file to jump to main instead to _c_int00 I don't think this is smart. You would at leas have to modify the stack pointer (SP), so that you would not run out of stack if more watchdog resets happen consecutively (or if WD reset happened due to stack overflow)

    Regards, Mitja