stm32h743 random hard fault while reading flash
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-23 7:39 AM
Hi everyone!
i have a custom board with h743vit6 on it
when i'm trying to access flash like this:
cell_data = * (__I uint32_t *) address;
i'm getting random hard faults from time to time
at first everything works fine, but after hard fault happens once, i'm getting it every time i am trying to read from flash
changing latency didn't help
it can't be a power issue either cause i'm using a power source that can drive up to 1 A
the mcu works at 300 mhz, clock signal comes from fpga and looks good
writing to flash works fine though
- Labels:
-
DEBUG
-
Flash
-
STM32H7 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-23 8:20 AM
Instrument your hard fault handler and determine a bit more about what the error is. The SCB register contains a bunch of info. I doubt the hard faults are random.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-23 8:28 AM
Have your Hard Fault handler output actionable data.
Do sanity checking on the address, before reading it. More likely something on the stack is being corrupted either due to size, accesses out of range, or cache coherency.
Going to have to dig into the details to understand the potential causes.
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-07-23 8:49 AM
What kind of flash, internal, external, how is it connected and configured?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2020-07-27 4:16 AM
So I've checked MMFAR and found out that flash bank 2 has this small region that causes my program to fail, but i still don't know the reason why it can't be accessed
