STM32的CAN硬件本身就是完全符合CAN总线规范的呀,硬件上就支持自动重发!配置问题!看看CAN_MCR寄存器的NART位描述:
Bit 4 NART : No automatic retransmission
0: The CAN hardware will automatically retransmit the message until it has been
successfully transmitted according to the CAN standard.
1: A message will be transmitted only once, independently of the transmission result
(successful, error or arbitration lost).
怎么感觉你像老师在指导我们,看到原子哥的视频是有提到自动加的,也可以自己在外面加来判断吧
确实,那问题来了,如何让整个现场遵循CAN总线规范呢?求指点
发送邮箱就三个,需要发送的帧数会不止三帧,我这里为了统一单帧和多帧发送接口,整个发送都是使用延时发送。所以在接收时很容易出问题。
STM32的CAN硬件本身就是完全符合CAN总线规范的呀,硬件上就支持自动重发!配置问题!看看CAN_MCR寄存器的NART位描述:
Bit 4 NART : No automatic retransmission
0: The CAN hardware will automatically retransmit the message until it has been
successfully transmitted according to the CAN standard.
1: A message will be transmitted only once, independently of the transmission result
(successful, error or arbitration lost).
一周热门 更多>