HardFault
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-03-22 1:09 PM
Posted on March 22, 2013 at 21:09
Hello,
I have a problem which i cannot resolve.My first code, a DCF77 receiver which update my RTC once a day runs fine without any problems.Now, i have added a new function to calculate the Sunrise or Sunset time for my location (Lat, Lon)In that function, another function is called to calculate someting. The first time this function is called, this function will be executed and works fine. the second time, i get a HardFault and i can not find out how.Sometimes, when it is running in Debugmode and i step slowly thru my code, it executes all my functions without any HardFault.When i comment the function call my program works fine. Can anybody help me?I have attached a screenshot of my debugger. As you can see it stuck at __Float64_mulI guess that it has something to do with the float64. But this function is executed earlier and does not cause a hard fault
This discussion is locked. Please start a new topic to ask your question.
11 REPLIES 11
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2013-03-26 12:54 PM
Posted on March 26, 2013 at 20:54
FPU instructions can hard fault on the STM32F4 if the math unit isn't enabled, this should not be an issue for you.
Commenting out code isn't going to help here. You need to clearly identify the failing assembler instructions, and the registers at the fault. Depending on the type of failure may also want to dig into the stack. If the printf() code doesn't have support in you tool chain you could always break point the hard fault handler and walk through it.
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-03-26 12:57 PM
Posted on March 26, 2013 at 20:57
Dueling posts, glad to hear you fixed it.
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..

- « Previous
-
- 1
- 2
- Next »