cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F103C8T6 blue pill CAN does not work

GRosi.1
Associate

I'm trying to send CAN messages with the STM32F103C8T6 microcontroller (blue pill hardware with genuine ST chip) to a CAN analyzer without success.

I'm using STM32CubeIDE v1.12.0. I double checked the hardware, I'm using PB8 and PB9 pins to connect to the CAN transceiver (SN65HVD230 ) RX and TX pin respectively, I have 120 ohm resistor on both CAN line termination, I settled CAN baudrate to different baud but the result is always the same, no pin level changing on TX pin PB9, it remains always at 3.3V (looked with a scope meter), it seems that the CAN cell is not connected to the external pins. I'm not using the USB that is disabled, external 8 MHz crystal with PLL to have 72MHz clock. The code works because I have a LED that correctly toggle its status every 1 second, after a while the CANtransmit function HAL_CAN_AddTxMessage(..) return an error because it doesn't find a free trasmit mailbox. Attached the main function, please help

12 REPLIES 12
SofLit
ST Employee

You can also try this:


_legacyfs_online_stmicro_images_0693W00000binuJQAQ.png

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.
APrim.2
Associate II

The first settings works great!

Thank you very very much!

Best regards

Ok great! you're welcome.

I invite you to close this thread by clicking "Select as best" the comment that resolved your issue.

Thank you.

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.