Program won't start after power cycle or reset

Sysprogs forums Forums VisualGDB Program won't start after power cycle or reset

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #35300
    GeneM
    Participant

    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?

    Thanks

     

    • This topic was modified 3 weeks, 4 days ago by GeneM.
    • This topic was modified 3 weeks, 4 days ago by GeneM.
    #35303
    bflannery
    Participant

    Are your hardware boot pin(s) in the correct state to boot from 0x08000000?

    #35304
    GeneM
    Participant

    I believe so, BOOT0 is pulled low and my blinky program starts from power up with BOOT0 pulled low. But it is jumpered and I’ve tried it both pulled high and pulled low. No joy.

    • This reply was modified 3 weeks, 4 days ago by GeneM.
Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.