2020-10-23 12:41 PM
I have been wanting to use Hal_CAN library and everytime I use HAL_CAN_AddTxMessage using cube IDE I get an Hard fault. So if anyone has a good CAN bus transmission and recieve Example that would be really helpful.
2020-10-23 01:58 PM
Look at what's actually faulting. Hard Faults are most likely due to bad memory addresses or invalid casts.
Show the code, it might be simpler. There are surely CAN examples under the CubeF1 trees for the board in question..
2020-10-23 07:52 PM
I Did check under stm32F1 cube repo and there are no specific CAN examples to be loaded onto cube IDE
2020-10-26 06:59 AM
Hello @ASing.1 ,
There is no example projects in STM32CubeIDE formats within STM32CubeF1, but in this case you can use the import/convert feature from SW4STM32 or TrueSTUDIO project to STM32CubeIDE following the available document
Hope this helps you.
Imen
2020-10-26 12:13 PM
Well I got the CAN TX to work but I am trouble receiving messages, By using this function :
HAL_CAN_GetRxMessage(&hcan1, CAN_RX_FIFO0, &Rxcan, Rxdata);
2020-11-04 08:46 AM
Hi @ASing.1 ,
Sorry for this delay to answer you!
Did you solve your problem ?
Imen