Hi All,
This is from the Starterware forum; see:
http://e2e.ti.com/support/embedded/starterware/f/790/p/294382/1027405.aspx
This may be chip-related:
In the Starterware bootloader, the first thing it always does is the following
four lines in BlPlatformConfig():
HWREG(WDT_1_REGS + WDT_WSPR) = (unsigned long)0xAAAA;
while(HWREG(WDT_1_REGS + WDT_WWPS) != 0x00);
HWREG(WDT_1_REGS + WDT_WSPR) = (unsigned long)0x5555;
while(HWREG(WDT_1_REGS + WDT_WWPS) != 0x00);
There is some voltage setup, but that is module-dependent, and not always done.
There is only BL_init before that, and that just sets up the stack and clears
BSS; there is nothing in there that has anything to do with the watchdog timer.
So why should the above hang when I try it in on my board? I can run a lot of
code.
I even tried MSR cpsr_c, #MODE_SYS|I_F_BIT
in my init code, in case the extra |I_F_BIT did something.
I tried the assembly language for the above four lines in my init code:
// 19 /* Disable the WatchDog Timer - writes documented in the TRM user guide */
// 20 HWREG(WDT_1_REGS + WDT_WSPR) = (unsigned long)0xAAAA;
LDR R0,=0x44e35048
MOVW R1,#+43690
STR R1,[R0, #+0]
// 21 while(HWREG(WDT_1_REGS + WDT_WWPS) != 0x00);
??WDT_Disable_0:
LDR R0,=0x44e35034
LDR R0,[R0, #+0]
CMP R0,#+0
BNE ??WDT_Disable_0
// 22
// 23 HWREG(WDT_1_REGS + WDT_WSPR) = (unsigned long)0x5555;
LDR R0,=0x44e35048
MOVW R1,#+21845
STR R1,[R0, #+0]
// 24 while(HWREG(WDT_1_REGS + WDT_WWPS) != 0x00);
??WDT_Disable_1:
LDR R0,=0x44e35034
LDR R0,[R0, #+0]
CMP R0,#+0
BNE ??WDT_Disable_1
It hangs on the first STR R1,[R0, #+0]
Any ideas?