Skip to main content
ignasi
Associate II
Dec 1, 2017 3:08 PM UTC
Solved

Firmware Working in Debug but not on Stand Alone

Posted on December 01, 2017 at 16:08

Hi,

I'm developping a firmware with a stm32f405zgt6

Unfortunatly, I debug the code, step by step, and it's working fine, but then, when my board is on stand alone mode, the firmware is not working. It looks it even didn't start.

Any idea or tip about such a behaviour?

Thank you very much

    This topic has been closed for replies.
    Tesla DeLorean
    Tesla DeLoreanBest answer
    Guru
    Dec 1, 2017 4:01 PM UTC
    Posted on December 01, 2017 at 17:01

    Assuming a custom board, make sure BOOT0 is pulled low.

    Add instrumentation so that it outputs status and progress via a serial port, or use a GPIO/LED. Use check points starting at Reset_Handler to see how far it is getting.

    Add status output to obvious failure points, like ErrorHandler() and Hard Fault Handler, so you know if it stuck there. Also anywhere you have while(1) loops where things might get trapped.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..

    3 replies

    Tesla DeLorean
    Tesla DeLoreanBest answer
    Guru
    Dec 1, 2017 4:01 PM UTC
    Posted on December 01, 2017 at 17:01

    Assuming a custom board, make sure BOOT0 is pulled low.

    Add instrumentation so that it outputs status and progress via a serial port, or use a GPIO/LED. Use check points starting at Reset_Handler to see how far it is getting.

    Add status output to obvious failure points, like ErrorHandler() and Hard Fault Handler, so you know if it stuck there. Also anywhere you have while(1) loops where things might get trapped.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    ignasi
    ignasiAuthor
    Associate II
    Dec 4, 2017 5:44 PM UTC
    Posted on December 04, 2017 at 17:44

    Hi Clive One,

    Thanks, that was the answer. Boot 0 was not forced to GND.

    Andrew Neil
    Super User
    Dec 1, 2017 10:04 PM UTC
    Posted on December 01, 2017 at 23:04

    Are you sure your hardware gives a proper RESET without the debugger ...

    A complex system that works is invariably found to have evolved from a simple system that worked.A complex system designed from scratch never works and cannot be patched up to make it work.