STM32F030xx hitting random Hardfaults
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-28 8:06 AM
Hi guys,
I hope you can help me with this one:
In approximately 1 out of 100 devices we have some strange behaviour which ultimately boils down to a HardFault Interrupt which triggers a Watchdog Reset.
The majority of products in the field does not have this error, and the ones that does "randomly" generate it. Sometimes the stack trace is readable sometimes not, and when it is the hardfault hits at different parts of the code wihtout any obvious corelation to executed code or runtime (sometimes it hits after 2 minutes, sometimes after hours).
And now the most interesting part: I tried to isolate the error and started to remove parts of my code. Currently I have a blank while(1) main loop with an alive counter without any configured or enabled interrupts and still - the hardfault hits.
Do you have any ideas or clues what could cause such behaviour? I checked against all hardfault causes listed in the cortex-m0 manual but couldn't find anything promising.
What I have now is only clock init (hsi) -> startup code -> blank while(1).
I'm looking forward to any idea!
Cheers!
Solved! Go to Solution.
- Labels:
-
DEBUG
-
STM32F0 Series
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-13 11:16 PM
The answer is probably here, but thanks for your insights:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-28 8:09 AM
Incorrectly configured external memory, insufficient wait states. Listing the source(s) of the hard fault via the SCB registers would be helpful, even if they change "randomly".
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-28 8:31 AM
You may also run your code using a "known good" hardware such as Nucleo or Disco, to exclude hardware-related problems.
JW
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-06-28 8:58 AM
Flash related issues seem most likely.
Would look to external drivers, like power supply issues or manufacturing defects (opens, tombstoned capacitors, etc)
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
‎2021-07-13 11:16 PM
The answer is probably here, but thanks for your insights:
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-14 6:06 AM
So you're overclocking it? That info would have been useful to put in the OP.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2021-07-14 6:10 AM
Not really, it is running at 8MHz, but with PLL (where it is not needed).
