UART and watchdog

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

UART and watchdog

2,384 次查看
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
标签 (1)
0 项奖励
回复
2 回复数

893 次查看
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 项奖励
回复

893 次查看
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 项奖励
回复