Error in sending message with FDCAN on STM32H735G-DK
- March 20, 2024
- 2 replies
- 3793 views
Dear all,
I've been following this video on YT on how to get the FDCAN on my discovery board (STM32H735G) to work: https://www.youtube.com/watch?v=sY1ie-CnOR0 . Note that this is the 2nd video of a series, if you want to watch it. Now, my problem is not with the video but with why the code doesn't work on my board. The full code you can find attached to this post.
The code compiles and runs without a problem, however, when I reach the
if (HAL_FDCAN_AddMessageToTxFifoQ(&hfdcan1, &TxHeader1, TxData1)!= HAL_OK)
line in the while(1) loop the second time around, it throws an error. I have been unable to identify what the error is or how to solve it, however, I had a look at the pins with an oscilloscope to confirm the existence of a signal or the lack thereof. I did not see a signal. What I find interesting is that it succeeds the first time but only gives an error the second time around.
Any insights and solutions are welcome!
