cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F446RE CAN Works in Loopback Mode but Not in Normal Mode

AsmaEST
Associate

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.

 

1 REPLY 1
mƎALLEm
ST Employee

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 on "Accept as Solution" on the reply which solved your issue or answered your question.