原创 PIC18Fxx8之CAN终止发送

2007-10-29 17:31 4926 6 6 分类: MCU/ 嵌入式

1_004:中止发送


MCU可以通过对信息缓冲器(TXBnCON<3>)相关的TXREQ位清0来中断信息的发送。ABAT位(CANCON寄存器)置1将请求中断发送信息过程。


如果信息未开始发送,或者是信息开始发送却因为丢失仲裁或发送错误而中断,都将退出发送信息过程。当模块置相应缓冲器的ABT位(TXBnCON<6>)为1时,表明退出发送。如果信息已经开始发送,那么当前的信息仍将被全部发送。


如果当前信息被全部发送且没有失去仲裁或出现发送错误,则ABT位将不会被置1,因信息已经发送成功了。同样,如果信息在一个中止请求中发送,并且信息丢失仲裁或出现错误,信息将不再发送,ABT位将被置1,这意味着信息发送未完成。


******************************************************************


ABORTING TRANSMISSION
The MCU can request to abort a message by clearing the TXREQ bit associated with the corresponding message buffer (TXBnCON<3>). Setting the ABAT bit(CANCON<4>) will request an abort of all pending messages.


If the message has not yet started transmission, or if the message started, but is interrupted by
loss of arbitration or an error, the abort will be processed. The abort is indicated when the module sets the ABT bits for the corresponding buffer(TXBnCON<6>). If the message has started to transmit, it will attempt to transmit the current message fully.


If the current message is transmitted fully and is not lost to arbitration or an error, the ABT bit will not be set, because the message was transmitted successfully. Likewise, if a message is being transmitted during an abort request and the message is lost to arbitration or an error, the message will not be retransmitted and the ABT bit will be set, indicating that the message was
successfully aborted.


 

PARTNER CONTENT

文章评论0条评论)

登录后参与讨论
EE直播间
更多
我要评论
0
6
关闭 站长推荐上一条 /3 下一条