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.
Hi: My program works on my C164CI based circuitry and it works fine for some time say, like 24 hours and then the processor resets when nothing unusual seems to have happened. I have one interrupt each going on at 50ms and at 400 micro seconds from GPT2 and GPT3 timers. We also have ASC0 configured for RS232 communication at 19200 Kbaud going on in the main loop. Can there be a reset if one of the interrupt routine some times takes more time than 50 ms or 400 micro seconds to execute ?(the WDT is always disabled) Thanks Prasad
No, if there is an interrupt request before the interrupt service routine returns, the interrupt request flag is set, that's all. It just means that the interrupt will be processed later. It cannot cause a reset. If the watchdog timer is disabled, reset can be caused either by SRST instruction or by hardware. Even if your program goes astray, it is very unlikely that it executes SRST instruction accidentally on it's way. But if you put SRST in the hardware trap service routines, you might get a reset. At some point your program could try to access a word on odd address via 16-bit bus, which causes a hardware trap. Also there might be a CPU supervisor that generates a hardware reset when CPU supply voltage goes out of range. Or it might be ringing on RST line. Good luck! Mike
Is it really doing a hardware reset? Another possiblity is that (usually due to stack corruption) the program jumps to a point after the last of your code. It then executes the garbage that is there and finally the program counter wraps around and executes the code at location 0. This gives gives an apperance of a reset out of nowhere.