RWW for Single Bank Flash on STM32
I understand you can't erase the same bank you are running code in. Or something like that. But I am confused on the STMG0 because this one only has a single bank. So how do I use Flash to emulate EEPROM if I am using flash to run my code. Everything has been working. not sure what I changed but now when I do an erase I am getting an exception. Maybe I should not do the background interrupt based erase!?
Thread #1 [main] 1 [core: 0] (Suspended : Signal : SIGTRAP:Trace/breakpoint trap)
HardFault_Handler() at stm32g0xx_it.c:100 0x8013964
<signal handler called>() at 0xfffffff1
HAL_TIM_IRQHandler() at stm32g0xx_hal_tim.c:3,843 0x80192bc
TIM6_DAC_LPTIM1_IRQHandler() at stm32g0xx_it.c:268 0x8013a6c
<signal handler called>() at 0xfffffff9
HAL_FLASHEx_Erase_IT() at stm32g0xx_hal_flash_ex.c:282 0x8017682
DoEEP() at EEPromMgr.cpp:323 0x800208c
DoWrite() at EEPromMgr.cpp:280 0x8001f4e
DoEEProcess() at EEPromMgr.cpp:217 0x8001dfc
main() at main.c:614 0x80136f6 