Hi, I use AT89S52 in a project. I send and receive data through TXD, RXD pins to a GSM module for sending SMS to another mobile equipment. I use watchdog facility and the watchdog counter is reset at every 256 counts. My crystal frequency is 11.0592 MHz. It happens once in a while that the uC doesn't respond and remains as if it hangs. Then it has to be RESET again. I doubt whether it happens while serial data reception and sending happens simultaneously. I wrote the program in C using KEIL IDE. My questions are 1) What are the special precautions to be taken in this case?(sending and receiving simultaneously) 2)why this happens even when the watchdog is active? It will be highly appreciated if anybody can give some guidance.
assuming your watchdog is working and configured to reset the MCU, it is safe to assume that your program ends up in a condition in which it services the watchdog but not performing its main function.
I thought of that possibility. But still unable to find out any reason.
Which possibility?
program ends up in a condition in which it services the watchdog but not performing its main function.
And why you really, really shouldn't be using one in an application like this:
www.8052.com/.../119931
THANK YOU VERY MUCH. Really useful information.
Suppose there is a spike coming to the reset pin and it doesn't have sufficient duration to RESET properly. I think that can also lead to a 'hang' situation like this. Am I right? If that is the case, a good power supply(without glitches) can also solve my problem. Right? Is there any IC with built in RESET and pin compatible with 89S52 ?
If that is the case, a good power supply(without glitches) can also solve my problem. Right? No, there is no such thing as a "power supply(without glitches)" no power supply can handle e.g. a "ground jump". Is there any IC with built in RESET and pin compatible with 89S52 ? I guess with RESET you mean supervisor and I recall no uC with a built in supervisor that is "pin compatible" but e.g. all SILabs chips have built in supervisor
keep hawing if you like but you will end up with a supervisor.
Erik
View all questions in Keil forum