I'm running an LPC2144, and my program won't run to main - it freezes up in a 3-line loop in the disassembly window - a BMI instruction in my boot block at 0x7FFFD2DA loops back to 0x7FFFD2D6 and repeats over and over. It simulates fine, and my stacks should be of adequate size. For fun, I tried putting this program into my demo board with a LPC2148, and it runs without issue every time. If I frig around with it long enough, just reloading and debugging over and over, I can sometimes manually step through a bunch of disassembly and get the program to run, after which point I can continue to debug without issue even after a reset. But as soon as I add just one line of code and reload the program, it freezes up all over again. My program uses the RTX kernel and retarget.c, and I've never seen a problem like this on my other boards using similar programs.
Can anybody point me in the right direction? I'm pretty unfamiliar with most of the lower level stuff.
Update - the program will run, if I hard reset it for the better part of a second. The reset that comes from the ULINK is 50ms long, and won't kick it over in debug mode. I soldered in a hard switch, and holding that down longer will make the program run correctly on the next execution from Debug.
This behavior seems to be isolated to the LPC2144, my LPC2148 works fine with the same program.
Update - the program will run, if I hard reset it for the better part of a second.
Well, guess you better fix your reset generation circuit, then. You wouldn't happen to be using a silly old RC reset circuit, would you?
I'm not sure what you mean by this??? The reset pulse from the debugger (via ULINK2 programming module) is a fixed pulse width, and I'm not really able to change it. Haha, and no I'm not using an RC, there's no capacitance on this signal anywhere.
Haha, and no I'm not using an RC, there's no capacitance on this signal anywhere.
Haha yourself. So now that we've established what you're not using --- what are you using for reset circuit? And how did you connect that ULink reset output line to said reset circuit?
PROBLEM RESOLVED - Pin 0.14 needs to be tied high on Reset, or the chip goes into the boot loader, and gets all frigged up. Rookie mistake! Thanks for the help, anyway.