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.
您好!
我将 Hercules 开发套件与 TMS570结合使用、我想使用微控制器以1Mbps 的速率通过 CAN 总线发送多条消息、而无需立即接收任何消息。 我将使用峰值 PCAN Pro CAN 转 USB 器件以及示波器来监控总线。
我关注了本 TI 教程的发送方部分(无接收器、我使用 CAN 器件和示波器监控流量): https://training.ti.com/hercules-how-tutorial-can-communication
我执行了以下步骤:
#include "sys_common.h" #include "CAN.h" int main (void) { int i = 0; const uint8 message[8]={0x25、0x00、0x00、0xFF、0xFF、 0xFF、0xFF、0xFF}; canInit(); canUpdateID (canREG1、 canMESSAGE_BOX1、0x78EFFD88); for (i= 0;i < 10000;i++) { canTransmit (canREG1、 canMESSAGE_BOX1、消息); } 返回0; } void canErrorNotification (canbase_t *节点、uint32通知) { void canStatusChangeNotification (canbase_t *节点、uint32通知) { void canMessageNotification (canbase_t *节点、uint32 MessageBox) { }
我的问题是、当我运行该程序时、不仅使用 PCAN 的监控程序没有收到消息、而且我也不会使用示波器在总线上看到任何数据。 我唯一能想到的是、我没有初始化 UC 的某些方面、但我不确定如何继续调试此问题。 如果有人能向正确的方向指出我、那将不胜感激!