We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
I am using a STR912FW44 processor. My program will run if I allow the Keil IDE to automatically reset the chip after loading it to flash. However, if I manually reset the chip by toggling the power on and off the program gets stuck in the startup code. Could the Keil IDE be clearing something that a manual reset does not clear? I cannot imagine that heppening, but it seems like that is what is happening.
I have tried leaving the power off for a couple of minutes and then turning it back on, thinking maybe a capacitor is not draining down fast enough, but that made no difference.
Also I've noticed if I randomly remove a couple of lines of code from my program it seems to startup OK after a manual reset. I've only used about 150K of the 512K available, so unless I am overrunning the RAM I do not see where the size of my code could be causing the problem. Also, the RAM should get cleared on a manual restart anyway.
I appreciate any suggestions anyone can give me.
I have experienced the same problem. It seems to me that the solution was something stupid like checking the box to update the target before debugging.
Bob, you were right the solution is very stupid, and does not make sense to me. I changed the code generation from ARM-Mode to Thumb-Mode under the Target - Options - Target tab and my program started working. As I understand it, this means my program will use 16 bit instructions instead of 32 bit instructions. I do not think this will make a difference to me right now, however, it would be nice if someone could explain why this makes a difference as far as resetting the chip is concerned.
Everyone,
The change from ARM-Mode to Thumb-Mode code generation was actually not what fixed my program. I discovered today that the actual solution was to turn on the Cross-Module Optimization in the code generation options. My program is broken up into a number of modules not including all of the modules that emcompass the STR9 library, so this solution at least makes some sense. Maybe the Keil folks could post an explanation of the Cross-Module Optimization option somewhere, as the helpfile that came with the RVDS had very little info about it.
Cross Module Optimization only means that the linker removes routines that are not used. Still I do not think this caused your original problem. Maybe it is a size issue somewhere (not enought space in ROM or so).