Downloaded STM32H7A3 program runs but doesn't stay flashed
I'm bringing up a new board using a STM32H7A3. I've developed, downloaded, debugged and run lots of test programs from the VisualGDB IDE. Now I'm working on the main application. I can still develop, download, debug and run from VisualGDB but when I exit VisualGDB, power down the board and repower it, the program doesn't seem to start up. Almost the very first thing the main app does is blink a LED and that's not happening after powering down and powering back up. VisualGDB has a simple HAL based Blinky example built in and as a test, I built this example and it works fine both from VGDB and after powering down and back up.
If I set a break point at the first line of code in my main app and look at the disassembled code, it starts running at memory location 0x08020DF8. The Blinky app starts at 0X08000348. Both of those memory locations are in the Flash memory space according to the reference manual so I'm pretty sure both programs are running from Flash memory.
I'm using a STLinkV3-PWR debugger for both programs.
Another hint is I can download the Blinky program .bin fileusing CubeProgrammer and it runs fine after power down/up. But If I try to download my main app .bin file with CubeProgrammer, it doesn't run at all.
Seems like I need to set some bit somewhere before the download process to make sure the main app gets permanently programmed. Or maybe there's a bit I have to set so the Flash doesn't get cleared on power up. I've scoured the reference manual but haven't found anything helpful yet.
Any help will be greatly appreciated as always. - Thanks
