L4 Flash erase issue
MCU is STM32L4R9 with 1MB. I'm having trouble getting the device to erase the upper half of the flash programmatically. Apparently the device ships with opt bytes set for dual bank.
I connected the device to the STM32 programmer through USB and turned off the DBANK option byte, which changed programming somewhat and appears to program 0x2000 sized pages now. However it still doesn't appear to erase correctly, in this case it for sure won't erase page 127 or 0x080FE000.
What puzzles me is that the programmer shows DBANK off, but the debugger still shows the OPTR DBANK bit set. Also, the note says on page 160 of datasheet rm0432-stm32l4..
Note: For 1-Mbyte and 512-Kbyte Flash memory devices, do not care about
DBANK.However this isn't really true, as this bit does apparently do something.
