UART and watchdog

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

UART and watchdog

2,385 Views
FordFairlaneBen
Contributor I
Hi everyone:
I´m using the SCI transmitter to send and receive data at 9600baud. With the transmission I have no problem but when I try to receive I get the next problem:
I send 3 bytes from the PC and the MC9s08AW resets because of the watchdog. Why this happens?
Thank you very much.
Best regards
Labels (1)
0 Kudos
Reply
2 Replies

894 Views
mke_et
Contributor IV
Right away I'd look at your receive routine. If you're using a polled routine, make sure it gets out on a regular basis to kick the watchdog. If it's an interrupt routine, then look for where it's hanging and not exiting.
0 Kudos
Reply

894 Views
rocco
Senior Contributor II
Hi, Ford:

In addition to what mke_et said, make sure you are clearing the interrupt flag, if you are using interrupts.

Read the status register before reading the data register, or the interrupt flag will remain set, and you will loop through your ISR forever.
0 Kudos
Reply