Getting Hard Fault Issue as Part of Flash Erase Operation.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-06 8:29 AM
Have you seen and tried the example in the STM32CubeWB? : FLASH_EraseProgram .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-06 9: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?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-06 11:21 PM
Hi Team,
- Not Erasing the code currently Being executed, we have dedicated page for our config data storage. we are doing the operations for that page.
- we are able to Erase and Write and Read properly.
- After erase operation we are doing cache memory flushing, where we are getting the issue.
- Inside this function FLASH_FlushCaches() we are getting the Hard fault; it is part of the HAL_FLASHEx_Erase().
Please let us know is there any other changes are required from Flash side.
Regards,
Srinivas
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-07 1:52 AM
can you share your code here please ?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2022-12-08 10:37 AM
Hi Team,
Please find my Flash Driver code for your reference. Here with i am attaching the Error screen shot as well.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-01-05 9:17 AM
Hello,
Can you share the call stack and the disassembly when the issue occurs?
Best Regards
