cancel
Showing results for 
Search instead for 
Did you mean: 

STM32 FDCAN: Frames visible on CANable (candump) but TX still reports ACK error — scope shows ACK notch

suyog1
Associate II

TL;DR:

  • Two-node bus: STM32 (FDCAN1)CANable (SocketCAN) at 500 kbit/s

  • candump can0 shows frames from STM32, but STM32 keeps flagging ACK error and increments TxErrorCnt.

  • Scope on CANH/CANL (diff trace CH1–CH2) shows a dominant ACK bit in the ACK slot (!)

  • External loopback works.

  • Looks like my MCU isn’t “seeing” the ACK at its RX input—looking for eyes on transceiver mode pins, RX pin mapping/AF, and timing.

Hardware

  • MCU: STSpin32G4 

  • Transceiver: SN65HVD230DR

  • Other node: CANable / candleLight  on Linux as can0.

  • Wiring: STM32 TXD/RXD ↔ CAN transceiver ↔ twisted pair to CANable.

  • Termination: 120 Ω at each end (I can measure ~60 Ω between CANH–CANL with power off; will re-check if requested).

  • Ground: Common GND between boards.

If helpful, I have shared the schematic snippet for the transceiver pins .

What works vs. what fails

Works

  • External loopback mode: frames “succeed.”

  • candump sees frames from STM32 in normal mode.

  • Scope on CANH/CANL shows clean dominant bits. The CH1–CH2 differential (pink) clearly shows a dominant pulse in the ACK slot.

Fails

  • In normal mode, FDCAN reports ACK error on every frame; TxErrorCnt climbs (I previously hit Error Warning/Passive).

 Any insights or “you missed this obvious thing” would be hugely appreciated. Thanks!

 

20250924_132429.bmp

 

20250924_133627.bmp

suyog1_0-1758703163149.png

Screenshot from 2025-09-24 11-49-28.png

1 REPLY 1
Ozone
Principal II

I don't see anything obvious.
I don't have much experience with the STM32 CAN interface, although my company uses all sorts of CAN devices.

Perhaps you can try a lower baudrate, and play with the bit timing parameters (what the CAN spec calls "quanta").
The latter e.g. define at what point during a signal the IP samples the ACK.