Solved
my stm32f4 cannot connect to stlink normally
I am facing an issue with my custom-made STM32F4x minimum system board. I am experiencing unstable connections with the STLink. I am using an AMS1117 for power supply, and I have found that when the STLink supplies power at 5V to the AMS1117, it cannot connect properly. Similarly, when I directly connect the 3.3V output to VDD, it still does not connect properly. Although all the voltage readings at various points are correct (VDD is 3.3V, and VCAP is 1.25V), I cannot establish a connection with the STLink. However, the STM32 is booting up normally, and the LED flashing program I previously burned is running. Additionally, I can connect and burn using the serial port, but only the STLink connection fails. I have also tested reducing the SWD frequency to 5kHz, but it still cannot connect. The logic analyzer shows some errors and no replies in the SWD response, but there are a few ‘OK’ responses as well. Occasionally, I find that I can connect properly, but it seems to happen randomly without any changes on my part. However, when I connect the 3.3V to the AMS1117 (with all other connections remaining the same), the output to VDD is approximately 2.3V, and the STLink can connect properly. After thorough checking, I still couldn’t identify the issue.
