Skip to main content
Explorer
March 14, 2023
Question

SWD connect frequency decreasing after initial programming

  • March 14, 2023
  • 3 replies
  • 1385 views

On a custom board, we have an issue where after our first connection at 8MHz over SWD, then programming, we can only connect at 50kHz or slower. Has anyone seen this before? Could there be an issue in our hardware design/layout that is causing the connection to be so slow? Or something in our firmware configuration? It seems like it is likely in the configuration somewhere. If we erase the chip an program on a different program, it seems ok, but still baffled what could be wrong in the firmware config.

0693W00000aIx0oQAC.png0693W00000aIx1rQAC.png

    This topic has been closed for replies.

    3 replies

    Graduate II
    March 14, 2023

    Is the NRST actually connected?

    How does it perform with "Connect Under Reset"

    Or with BOOT0 pulled HIGH?

    Perhaps has to do with what you're running, perhaps not from HSI clock, or doing other things that contend for the core, say sleep/low-power, WFI, etc.

    Which STM32 are we talking about here?

    The CM0(+) tend to be a bit on the slow side, but 2 or 4 MHz connectivity should be viable.

    Using STM32L011 here for a couple of things, not had any issues with speed/connectivity reprogramming or debugging those.

    At 24 MHz from an ST-LINK/V3 I'd perhaps expect issues.

    Super User
    March 15, 2023

    How are the SWD pins set in GPIO? Read out and check/post relevant GPIO registers' content.

    JW

    BByer.1Author
    Explorer
    March 15, 2023

    Using an STM32F412ZG. The NRST was NOT connected. It is now on one board and it is letting us connect at 4MHz using Hardware reset as the Reset Mode. The rest of the SWD pins match the STM32F412ZG nucleo devkit that we have. We are using the HSE.