Skip to main content
Visitor II
November 6, 2025
Solved

NUCLEO-G071RB catch 22 - PA14 set to GPIO input

  • November 6, 2025
  • 4 replies
  • 281 views

I flashed firmware that sets. Now STM32Cubeprogrammer refuses to connect to the STLINK portion.

How to recover from this / debrick the boards ? I tried pulling up PA14 / boot0 pin with a pull-up to CN7 pin 7, but no such luck...

    This topic has been closed for replies.
    Best answer by TDK

    The factory-loaded option bytes do not enable the BOOT0 pin to select boot mode. By default, it will always boot to flash as long as there's a program there.
    TDK_0-1762443226613.png

    TDK_1-1762443309542.png

    4 replies

    Super User
    November 6, 2025

    Having the ST-Link connect under hardware reset should do it.

     

    pdornier1Author
    Visitor II
    November 6, 2025

    Nope...

    12:42:17 : UR connection mode is defined with the HWrst reset mode
    12:42:22 : UR connection mode is defined with the HWrst reset mode
    12:42:22 : ST-LINK error (DEV_USB_COMM_ERR)
    12:42:22 : Error: Problem occured while trying to connect

    Serial console through STLINK _is_ working, and shows my startup message, so the USB connection is good.

    pdornier1_0-1762429700364.png

     

    Super User
    November 6, 2025

    Hold reset, click connect, then release reset. You may have to play around a bit to get the timing exactly right. STM32CubeProgrammer needs to connect after NRST is high but before PA14 is reassigned. How quick this happens depends on your program.

    Super User
    November 6, 2025

    @TDK wrote:

    STM32CubeProgrammer needs to connect after NRST is high but before PA14 is reassigned. How quick this happens depends on your program.


    @pdornier1  so it's a good idea to have a delay in there - to give time for a debugger or programmer to connect...

    pdornier1Author
    Visitor II
    November 6, 2025

    My code is bare metal (actually assembly language), so the debugger will never be fast enough. Theoretically the STLINK portion should be able to pull NRST low and BOOT0 high, then NRST high, but that doesn't seem to be happening.

    Should I consider the boards "bricked" ? As long as the boot bits in flash are not set - I don't touch them - there should always be a way back to the boot loader, not a "catch 22" like this.

    TDKAnswer
    Super User
    November 6, 2025

    The factory-loaded option bytes do not enable the BOOT0 pin to select boot mode. By default, it will always boot to flash as long as there's a program there.
    TDK_0-1762443226613.png

    TDK_1-1762443309542.png

    pdornier1Author
    Visitor II
    November 6, 2025

    Thank you & ouch...