cancel
Showing results for 
Search instead for 
Did you mean: 

SWD connect frequency decreasing after initial programming

BByer.1
Associate

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

3 REPLIES 3

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.

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

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

JW

BByer.1
Associate

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.