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.
想在28035电机例程里面添加can的发送程序,
使能了ecan时钟,ecan也完成了初始化。
但是 debug之后 canta始终不置位。
程序始终卡在while(ECanaRegs.CANTA.all == 0);这条语句
连接了ECantools 并不能接受到消息。
目前没有任何思路。求各位不吝赐教,可能的原因在哪里。
以前遇到过此类情况,只需要提前设置一次发送就可以跳过这段循环了。(即在while语句前 添加 ECanaRegs.CANTRS.all = 0x00000001;)
求各位不吝赐教。
controlsuite中提供的是一个CAN自测程序。
在调试28069的时候,断点设在while(ECanaRegs.CANTA.all != 0x0000FFFF ) {}也会停在这里
这是要等待CANTA置位。全速执行就没有问题。
可以参照其寄存器配置编写个can_tx()函数。