Skip to main content
Associate
March 25, 2025
Solved

STM32F446RE CAN Works in Loopback Mode but Not in Normal Mode

  • March 25, 2025
  • 1 reply
  • 442 views

Hello,

I configured CAN communication between two STM32F446RE boards. The code works in Loopback Mode, but not in Normal Mode.

I did not use an external CAN transceiver, as I read that direct communication is possible on the STM32F446RE.

What I have tried:

  • CAN initialization is correct, and messages are transmitted successfully in Loopback Mode.
  • In Normal Mode, HAL_CAN_AddTxMessage() returns HAL_OK, but no messages are received.
  • Connected CAN_TX of Board 1 to CAN_RX of Board 2 and vice versa, with a shared GND.
  • Enabled CAN interrupts and checked for errors using HAL_CAN_ErrorCallback(), but none appear.

 

Best answer by mƎALLEm

Hello,


@AsmaEST wrote:

I did not use an external CAN transceiver.


You can't do that in Normal mode. You need a transceiver for each CAN node.

And this is the (minimum) structure needed for this mode:

CAN.png

There are other methods without transceiver that I don't recommend.

But if you are connecting Tx to Rx (like an UART communication) this is not the correct HW for CAN and this will never work.

Hope that answers your question.

1 reply

mƎALLEm
mƎALLEmBest answer
Technical Moderator
March 25, 2025

Hello,


@AsmaEST wrote:

I did not use an external CAN transceiver.


You can't do that in Normal mode. You need a transceiver for each CAN node.

And this is the (minimum) structure needed for this mode:

CAN.png

There are other methods without transceiver that I don't recommend.

But if you are connecting Tx to Rx (like an UART communication) this is not the correct HW for CAN and this will never work.

Hope that answers your question.

To give better visibility on the answered topics, please click "Best answer" on the reply which solved your issue or answered your question.