2023-03-14 10:35 AM
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.
2023-03-14 03:28 PM
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.
2023-03-15 12:44 AM
How are the SWD pins set in GPIO? Read out and check/post relevant GPIO registers' content.
JW
2023-03-15 08:57 AM
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.