Part Number:TMS320F28335
Tool/software: Code Composer Studio
There is two project in F28335, one is bootloader and another one is App. When power on, first bootloader will run code from default code_start address(0x33FFF6). Then branch to App project code_start address(0x300008). Both code_start is as following(i.e. DSP2833x_CodeStartBranch.asm) and the watchdog is disabled.
code_start: .if WD_DISABLE == 1 LB wd_disable ;Branch to watchdog disable code .else LB _c_int00 ;Branch to start of boot.asm in RTS library .endif
;end codestart section
I add code in App project to check watchdog WDFLAG bit as following(follow the errata document to resolve XINTF module bug)
EALLOW;
if((SysCtrlRegs.WDCR & 0x0080) == 0)
{
SysCtrlRegs.WDCR = 0x0028;
SysCtrlRegs.WDKEY = 0x0055;
SysCtrlRegs.WDKEY = 0x00AA;
}
else
{
SysCtrlRegs.WDCR |= 0x0080;
}
EDIS;
However, after the watchdog reset, the code "SysCtrlRegs.WDCR |= 0x0080" seems cannot disable watchdog. However, code_start should have disabled the watchdog. How to understand this problem? What the differene related with code_start between power on and watchdog reset? thanks.