这些小活动你都参加了吗?快来围观一下吧!>>
电子产品世界 » 论坛首页 » 嵌入式开发 » MCU » 请教ATMEL AT91SAM7S256的USART 超时问题

共1条 1/1 1 跳转至

请教ATMEL AT91SAM7S256的USART 超时问题

菜鸟
2010-04-27 10:06:53     打赏
拟用AT91SAM7S256做一主机多从机式通讯,主机发送请求,从机应答。从机不主动发送应答信息。
由于信息帧的长度不一致,想用接收超时来实现变长信息帧的处理。
芯片手册上描述是这样的:
Stop the counter clock until a new character is received. This is performed by writing the
Control Register (US_CR) with the STTTO (Start Time-out) bit at 1. In this case, the idle state on RXD before a new character is received will not provide a time-out. This prevents having to handle an interrupt before a character is received and allows waiting for the next idle state on RXD after a frame is received.
我在开发板上测试,发现信息接收完毕PDC已经产生中断了,Timeout位仍然置1了。也就是说通讯超时还是发生了。

是不是只要开始接收字符,timeout计数器就不会停下来,即便是一个信息帧已经结束,除非手动复位?



关键词: 请教     ATMEL     AT91SAM7S256     USA    

共1条 1/1 1 跳转至

回复

匿名不能发帖!请先 [ 登陆 注册 ]