I’m trying to track down an unrelated problem on an MKV31F256, and I checked the “Reset device After programming” option under VisualGDB Project Properties->Debug setting.
Now when I start a debugging session, the program is written to flash and is then immediately erased. It only happens when the “After programming” option is selected. I’m watching flash with Segger’s J-Mem app set to refresh every 100msecs. I can see the program get written to flash when I start a debugging session and then flash is immediately erase.
Is this supposed to happen? I would expect the “Reset device” device setting would be to reset the CPU, not reset the whole micro to factory defaults.