Stm3210C- Eval CAN1 not working (Hard Fault)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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.
- Labels:
-
CAN
-
STM32CubeIDE
-
STM32F1 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-10-23 1: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..
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-10-23 7:52 PM
I Did check under stm32F1 cube repo and there are no specific CAN examples to be loaded onto cube IDE
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-10-26 6: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
- UM2579 Migration guide from System Workbench to STM32CubeIDE", that helps you on how to import your SW4STM32 project to STM32CubeIDE.
- UM2578 Migration guide from TrueSTUDIO® to STM32CubeIDE, explaining how to import projects from TrueSTUDIO to STM32CubeIDE.
Hope this helps you.
Imen
Thanks
Imen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
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);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-11-04 8:46 AM
Hi @ASing.1 ,
Sorry for this delay to answer you!
Did you solve your problem ?
Imen
Thanks
Imen
