Tool/software: Code Composer Studio
Dear team
My customer is using TMS320F28335.
There are two projects, boot project and the app project. The boot project is executed in sector A, the begin address is 0x33FFF6, and the app project is executed in sectors B to H.
The power-on program runs from the boot project. After a delay of 1s, it jumps to the app project. During the jump, sometimes it can jump to the app, execute the app program, and sometimes restart (after asm(" LB 0x318000");), causing the program to be executed from the boot again.
They found the following program is called twice
void DisableDog(void)
{
EALLOW;
if(!(SysCtrlRegs.WDCR & 0x0080)) //check WDFLag
{
//Force a reset
//make sure WDog is enabled
//watch dog enable, and WDCHK value
SysCtrlRegs.WDCR = 0x00A8; //previous value of 0x0068
//would disable the WDog
//write invalid data forces reset
SysCtrlRegs.WDCR = 0x0000;
}
//Clear WDFlag - also need to write WDCHK correctly
SysCtrlRegs.WDCR = 0x00E8; //This will also disable the WDog
//SysCtrlRegs.WDCR = 0x00A8; //This will enable the WDog
EDIS;
}