AnsweredAssumed Answered

Hard Fault interupt when erasing FLASH (intermittent)

Question asked by bayton.paul on Oct 12, 2017
Latest reply on Oct 13, 2017 by bayton.paul

I frequently get a Hardfault interrupt generating when erasing (and in some cases programming) the flash using HAL_FLASHEx_Erase and HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, ..)

Part is STM32L433CC

It may have something to do with the debugger, as it does not generally occur when the program is first loaded and run, but does occur when the program is reset (executed a second time)

 

Code is executed in flash, but in a different page from that being erased

CPU is running at 8MHz Range1 0WS, caches enabled (not sure this makes any difference anyway)

 

Any suggestions for locating the source of the fault ?

 

SCB - HFSR (hard fault status register) indicates:

FORCED: Forced hard fault. Indicates a forced hard fault, generated by escalation of a fault
with configurable priority that cannot be handles, either because of priority or because it is
disabled.

Outcomes