2021-01-25 04:04 AM
2021-01-25 08:08 AM
Check that you real valid memory. A hardfault may point that you access non-existing memory.
2021-01-25 08:36 AM
It might help to be specific about the specific chip involved, and show a screen shot of the CubeIDE access.
The debugger view may notice the issue and not display data read.
Generally Hard Faults are diagnosed by inspecting the processor registers and code at/approaching the fault location.
2021-01-26 08:17 AM
The address is valid, even the debugger show ? instead of 0 / 1.
2021-01-26 08:24 AM
I am using ST32H743, and working with the second half of the flash from address 0x0810_0000
I am using commands of FLASH_Erase_Sector() while all other commands are HAL , may that be a problem?
Sometimes when i try to read from the memory i get the fault, and when i view the flash memory by the debugger i see ???? instead of 0/1. Only erasing the flash solving the problem until the next time it occures.
I tried to use command HAL_FLASHEx_Erase and it looks like the problem solved. I dont know why but now i am writing and reading without getting the fault errors.
2021-01-26 08:29 AM
Could be the ECC on the flash lines, getting something partially written or corrupted can cause this.