January 29, 2024 at 20:50 #35300GeneMParticipant
I’m working on a new app that downloads, runs and debugs fine from VisualGDB on a new, custom SOM we’ve designed using a STM32H7A3. But if I stop the app, disconnect VGDB and power cycle or reset the board with the VGDB debugger disconnected, the app doesn’t appear to start. I blink an LED almost immediately after initializing the clock and GPIO so I have a pretty good indication of when or if the app starts. I used CubeMX to generate the startup and peripheral initialization code. The SOM uses external crystals for HSE and LSE and I use the CubeMX generated SystemClock_Init() function.
I wrote a very simple blinky program that blinks the LED on my SOM. It downloads, runs and debugs fine from VGDB and it also starts running (blinking the LED) immediately after power cycling or hitting the reset button just as I’d expect. This blinky program doesn’t use the HSE or LSE so that might be a clue. My new app starts up using the debugger 99% of the time but on rare occasions, I’ve seen it hang waiting for the HSE or LSE to startup in the SystemClock_Init() function. I’m working on this problem (I think I need to adjust the decoupling caps on the crystals) but it happens only rarely when downloading from VGDB and I have never seen the new app start at all without the debugger.
I’ve used STM32CubeProgrammer to make sure the new app is still loaded in flash at 0x08000000 after power up and it looks right to my eye. However, I can’t start the app from CubeProgrammer. I can download the new app .bin file using CubeProgrammer and it says it completes the file download, verifies the download, that the application is running and the start operation achieved successfully but I don’t see the LED blinking. Nor can I start the new app using CubeProgrammer after I downloaded it with the VGDB debugger. I can download and start the simple blinky program from CubeProgrammer.
Could there be something I’m doing or not doing that is preventing my main program from starting without a debugger attached?
ThanksJanuary 29, 2024 at 21:44 #35303bflanneryParticipant
Are your hardware boot pin(s) in the correct state to boot from 0x08000000?January 29, 2024 at 23:16 #35304
- You must be logged in to reply to this topic.