2023-04-20 03:45 AM
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
Solved! Go to Solution.
2023-04-25 09:53 AM - edited 2023-11-20 07:36 AM
You can also try this:
2023-04-25 09:56 AM
The first settings works great!
Thank you very very much!
Best regards
2023-04-25 10:00 AM
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.