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, 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.
Earlier I was using RC circuit. Now started using DS1232
"I think the likelyhood of a port pin toggling in runaway code is greater than two specific consequent writes" There exists intelligent external watchdogs that are using some form of protcol. Possibly an I2C message, or at least a pulsed sequence with limitations for max/min pulse length and pulse distance.
An external watchdog that only needs a low-to-high (or high-to-low) transition with a maximum delay is definitely dangerous. The code may have a lot of OP-codes that may affect the processor port.
Using an NXP LPC23xx processor, the situation could be improved by using the mask registers, so the relevant pin is write-protected between the kicks, making sure that just a wild port write with a random value will not affect the watchdog.
An external watchdog that only needs a low-to-high (or high-to-low) transition with a maximum delay such as the ever popular '1232 is definitely dangerous
as stated
Erik