2020-07-23 07: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
2020-07-23 08: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.
2020-07-23 08: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.
2020-07-23 08:49 AM
What kind of flash, internal, external, how is it connected and configured?
2020-07-27 04: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