2022-12-05 11:05 PM
Hi Team,
We are using the Flash Operations as part of Data saving in specific page. As part of that we are erasing the page and writing the new data.
As Part of the Flash Erase operation, we are Entering into HardFault_Handler() function through the FLASH_FlushCaches() function.
Original Flash Erase operation was success like FLASH_PageErase(), after that we are getting this issue in the function FLASH_FlushCaches().
Could you please provide the insight on this one, why Flush operation is failing randomly, is there any changes or additional initializations are required for flash Erase before going to execute the Erase operation.
Regards,
Srinivas.V
2022-12-06 08:29 AM
Have you seen and tried the example in the STM32CubeWB? : FLASH_EraseProgram .
2022-12-06 09:03 PM
Are you erasing code currently being executed? MCU doesn't behave randomly, be systematic in debugging. Not sure you've provided enough info to track things down here.
What is the reason for the hard fault and what is the offending assembly instruction?
2022-12-06 11:21 PM
Hi Team,
Please let us know is there any other changes are required from Flash side.
Regards,
Srinivas
2022-12-07 01:52 AM
can you share your code here please ?
2022-12-08 10:37 AM
2023-01-05 09:17 AM
Hello,
Can you share the call stack and the disassembly when the issue occurs?
Best Regards