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.

CodeStartBranch.asm not disabling watchdog

Hi,

My CodeStartBranch.asm file says that watchdog will be disabled if the WD_DISABLE is set to 1. In the codestart section also, there is a LB instruction to disable the watchdog. However when I try to disable WD from this code, it seems the watchdog remains enabled. I am curious to know why this is so.


Does the CodeStartBranch.asm not actually disable the watchdog?

  • Hi,

    Though "CodeStartBranch.asm" for all the devices is almost same, I would like to know which device you are using.

    WD disable code in this asm file should work fine. How are you checking that WD is not getting disable?

    Regards,

    Vivek Singh

  • Hi Vivek,

    I am using a 28335. In my main code, I have not written anything to the WDCR register to enable the watchdog. So I presume that it should be remaining disabled after having run through the CodeStartBranch.asm. However when I run my code without the watchdog servicing part (the 0x55 and 0xAA writes to the WDKEY), it doesnt work. It works only if I service the watchdog.

    So I think, either the CodeStartBranch.asm did not disable the WD or it got re-enabled somewhere in between. Please help.
  • Hi,

    To make sure this code is working or not (or even getting executed), you should put a breakpoint inside  "CodeStartBranch.asm" and then run the code.  If CPU doesn't halts at breakpoint then it means "CodeStartBranch.asm" function is not called and in that case you need to check the setting for the entry points for your CCS project.

    If CPU halts at the breakpoint then step through the code and after executing the code which disables the WD, check the status of WDDIS bit in WDCR register. This bit should be set to '1'. If it's set to '1' then check the status of same after entry to your main function.

    Let us know what you find.

    Regards,

    Vivek Singh 

  • try this:
    go to Project --> Properties-->C2000 Linker-->Advance options -->Symbol Management-->--entry_point
    in there write code_start. This may solve your problem.
    Regards
    Gastón