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 currently working on converting an application originalldeveoped using the Archimedes tool kit V4, to Keil. The device is a Dallas 80C320. I have successfully ported the code and it runs using the uVision2 simulator. When I download the HEX-80 file to the actual hardware, the chip constantly resets. I took the simple "hello world" progam and had the same results. Any clues?
I would check if the WDT is running or not, that may be the cause of the "automatic" reset... Alex
Also you need to check that your main program has a loop in it, something like while(1); or for(;;); to stop execution once jobe is done otherwise chip keeps resetting. Mahmood
"while(1); or for(;;); to stop execution once jobe is done" This does not stop execution! It forms a tight loop, in which the processor is continuously executing the same instruction! What it does is to prevent the processor from trying to execute the blank ROM beyond the end of the real code.
What it does is to prevent the processor from trying to execute the blank ROM beyond the end of the real code. What actually happens if you don't include the endless loop is that the blank rom location is invalid instruction and microcontroller considers it NOP, it keeps NOPping till end of ROM and starts again, this looks like chip resetting. Mahmood
I think the simulator does faithfully reproduce this behaviour.
I verified that I have an endless loop
while(1){ };
Just an update...it was a watchdog issue; however, it is an external watchdog. It turns out the hardware did not take advantage of the internal watchdog feature of the Dallas 80C320 but instead used a XICOR X25043 CPU Supervisor with watchdog timer. So now my focus is to look at the bit addressing or mapping. The variable in the code may not have been mapped correctly to a bit addressable address. Thanks for the input.