Hard fault STM32F3
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-08-05 5:58 AM
Posted on August 05, 2013 at 14:58
Hello;
am using UART communication between 2 boards contaning STM32F3, the first send the same frame every 320 ms, and the second just receive this and make autobaud.after 2 minutes of working my MCU go into HARD-FAULT-HANDLER !i don't undestand why !(HARD_FAULT_STAT = 0x40000000) #stm32f3-hard_fault-uart
Labels:
- Labels:
-
STM32F3 Series
This discussion is locked. Please start a new topic to ask your question.
4 REPLIES 4
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-08-05 7:04 AM
Posted on August 05, 2013 at 16:04
i don't undestand why !
Probably the same reason most people end up there, cause you're writing to memory you shouldn't be. Check the bounds of arrays you are writing. Use a Hard Fault handler which allows you to identify the faulting instruction, and registers at the fault.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-08-06 12:02 AM
Posted on August 06, 2013 at 09:02
thank you for reply,
i don't know how to do this : ''Use a Hard Fault handler which allows you to identify the faulting instruction''in my Hard Fault handler there is just an empty infinite loop,
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-08-06 2:33 AM
Posted on August 06, 2013 at 11:33
Using your favourite search engine, look for joseph yiu and hard fault handler. He has written nice books, covering this topic (beside others).
BTW, I guess your problem is either stack overflow, out-of-bounds array access, or a dangling pointer. I use debug output via UART at such occasions. This way, you can easily narrow down to the bug location.Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-08-06 7:49 AM
Posted on August 06, 2013 at 16:49
As you can imagine this topic come up over-and-over
[DEAD LINK /public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/How%20to%20debug%20hard%20fault%20handler%20exceptions&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=1163]https://my.st.com/public/STe2ecommunities/mcu/Lists/cortex_mx_stm32/Flat.aspx?RootFolder=%2Fpublic%2FSTe2ecommunities%2Fmcu%2FLists%2Fcortex_mx_stm32%2FHow%20to%20debug%20hard%20fault%20handler%20exceptions&FolderCTID=0x01200200770978C69A1141439FE559EB459D7580009C4E14902C3CDE46A77F0FFD06506F5B¤tviews=1163http://blog.frankvh.com/2011/12/07/cortex-m3-m4-hard-fault-handler/
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Up vote any posts that you find helpful, it shows what's working..
