打印

请教ATMEL AT91SAM7S256的USART 超时问题

[复制链接]
1041|0
手机看帖
扫描二维码
随时随地手机跟帖
跳转到指定楼层
楼主
feel123|  楼主 | 2012-6-7 14:57 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
拟用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计数器就不会停下来,即便是一个信息帧已经结束,除非手动复位?

相关下载

相关帖子

发新帖 我要提问
您需要登录后才可以回帖 登录 | 注册

本版积分规则

0

主题

94

帖子

0

粉丝