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.

F28388D评估板的CAN通信



接下来,我想的是通过28388D的CANA接收来自STM32的CAN口的数据,研究了一下例程,觉得can_ex5_transmit_receive.c是最适合的。

在例程中,看到
When the TRANSMIT define is selected, the CAN Controller acts as a Transmitter and sends data to the second CAN Controller connected
externally.
If TRANSMIT is not defined the CAN Controller acts as a Receiver and waits for message to be transmitted by the External CAN Controller.

然后,我在原来例程基础上,将TRANSMIT的宏定义注释了。我对例程中注释的理解是,把TRANSMIT注释掉之后,例程就变成接收的功能了。(不知道是不是我想的不对)

硬件连接上,CAN收发器模块接到28388D的CANB,然后收发器的CANH和CANL,接到STM32的CANH和CANL,然后由STM32通过CAN向外发送数据。

这样注释后,debug完成,我在CCS中观察rxMsgData的数据变化,却始终是0。

我自己感觉,可能是对例程的理解错误

特来请教!

谢谢