I am using an STM32 to transmit data over CAN using CAN2. Currently, my code is only setting up the can peripheral and sending periodic messages.
My messages usually look like this on the receiving side:
can0 002 [1] 00
, as recorded by candump.
Unfortunately, sometimes the stm32 spits out this: can0 002 [2] 00 D0
. I am definetly not sending D0
, yet it keeps coming back.
01
becomes 01 C6
and03 C6
sometimes.
02
becomes 02 C6
and 05 EA
. The patterns in a failure are predictable.
Increasing the bitrate seems to reduce the chances of failure, but they still occur.
It is like the CAN peripheral is being interrupted mid-transmission, but is that even possible?
I measured the garbage data on the STM can_tx pin, so the transceiver/wiring should not be to blame.
Is there any possibility of interference with my CAN2 peripheral? Is there a setting I am missing?