cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F412 CAN Transmits unexpected data

JDOG
Associate III

When I trigger a transmit of a test CAN message on CAN bus 2 the CAN module transmits unexpected data when I look at CAN bus with a logic analyzer. PCAN does receive the unexpected message and it does acknowledge the massage.

TxTestMsgCode.jpg

 Here is what I see on the CAN Bus.

UnexpectedDataTX.jpg

PCAN Receive:

 

 

PCAN_RX_Unexpected message.jpg

 

 

1 REPLY 1
Karl Yamashita
Lead III

Set your variables to global. Once your leave the SendCAN_Message function, the variables are destroyed. 

Tips and Tricks with TimerCallback https://www.youtube.com/@eebykarl
If you find my solution useful, please click the Accept as Solution so others see the solution.