Receiving Hard Fault when trying to Mass Erase.
Hi everyone,
I am using the Nucleo-WB55RG to try and fully erase/program the flash memory. However, when the FLASH_MassErase() function is called in stm32wbxx_hal_flash_ex.c, a hard fault exception occurs. I believe this has to do with trying to erase the secure memory only accessible through CPU2. When I try to boot up CPU2 (set C2BOOT pin) I receive a PGSERR flag in the FLASH_C2SR register. This has been extremely inconvenient that for the entire flash to be erased, you need execute from CPU2 and the boot process is not exactly straight forward. Are there any suggestions on how to gain access to CPU2 and perform the mass erase function? Thanks.
Steve