请教:
sci的buffer设置成8个字节的缓存,必须收满8个字节,sci标志位才会置位。测试过程中发现,如果buffer已经有2个字节数据时,以后每次都发送8个字节的协议报文,那么接收到的数据始终会错位两个字节,请问能否通过寄存器,清除buffer中的计数器,让他重新开始计数?
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
请教:
sci的buffer设置成8个字节的缓存,必须收满8个字节,sci标志位才会置位。测试过程中发现,如果buffer已经有2个字节数据时,以后每次都发送8个字节的协议报文,那么接收到的数据始终会错位两个字节,请问能否通过寄存器,清除buffer中的计数器,让他重新开始计数?
SCI缓冲区模式没有指示缓冲区中有多少字节标志。并且也没有可用于清除缓冲区的标志。由于SCI接口通常很慢,因此建议您使用非缓冲模式。