We have developed a board around STR912FAW47 Micro-Controller. During initial testing we tried to bring up the board by loading a simple program for toggling an output port pin. We are using ULINK2 Debugger and Keil MDK ARM for loading the program. When we try to load the program, it does not get loaded in single attempt. After getting loaded successfully, the program does not seem to be working, as we do not see the desired toggling on the IO port. Then we tried to run the program in debug mode through ULINK 2, the program start working intermittently once after 2-3 attempts of connecting and running through debug mode. Further seeing in detail, it is observed that whenever the program is not working, it is going to Undefined Exception Handler (with infinite loop), instead of going to Reset Handler on executing first instruction after reset. It is very strange, as from the code and flash memory, it is seen that the instruction loaded at the 0x0 address is clearly for jumping to Reset Handler. Can anyone put some light on this behavior?
1 Answer
\$\begingroup\$
\$\endgroup\$
Have you disabled the watch dog timer? If not providing a proper handler for the WDT and if it comes up enabled by default (a common scenario) then this may very well be the root of your problem.