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.

[参考译文] 编译器/TMS320F28031:CAN 配置是否错误

Guru**** 2551110 points


请注意,本文内容源自机器翻译,可能存在语法或其它翻译错误,仅供参考。如需获取准确内容,请参阅链接中的英语原文或自行翻译。

https://e2e.ti.com/support/microcontrollers/c2000-microcontrollers-group/c2000/f/c2000-microcontrollers-forum/622287/compiler-tms320f28031-whether-the-can-configuration-is-error

器件型号:TMS320F28031

工具/软件:TI C/C++编译器

背景:终端电阻器连接不可避免地错误在客户端。

由于 CAN 总线有一个响应机制、如果节点没有接收数据来发送应答、主节点将重新发送数据包。 TA 位不能被置位。 当 DSP 确定发送失败、ES 寄存器报告 FE 错误、然后始终重复发送数据时、它将进入异常状态。 并且发送故障计数寄存器 CANTEC 的值始终会增加。

波特率设置如下、波特率应固定为250kbps。 节点约为40、发射距离超过40米。

下面是配置和代码、您能否检查我们是否可以优化代码?

这是主函数中的代码: