2024-10-18 03:37 AM
Dear all,
I'm unable to connect via SWD to my STM32F103C8T6. What ever I try I get no target found with STM32CubeProgrammer or ST-LINK Utility (I have tried all combinations at slow and high speeds).
- device is virgin
- BOOT0 is low
- NRST unconnected (shows 3V3) and connected/removed while testing
- Connections go through from ST-Link to STM32 pins
- 30 Ohm and 0 Ohm tested for SWCLK and SWDIO (GND and 3V3 connection to ST-Link with no resistor)
- Correct mapping of ST-LINK pins to STM32 checked multiple times
- There are no obvious shorts between any of the paths
- 3V3 is stable and GND closed
- The ST-Link was tested with a "blue pill" board with the same STM32 on it and it worked flawlessly
I have also tried:
- Cutting the path to the esternal 16MHz crystal curcuit
- Connecting/Disconnecting VCC
- Soldered a new STM32 onto the board
I am currently running out of ideas, I think there is either a fault in the PCB design that damages the MCU or prevents booting or maybe some config that I have missed? I'm grateful for any ideas..
Some info on the board: It's a 2-Layer 1 mm board with a solid GND plane on the backside, I have attached sreenshots of the schematic and the routing. Please not that the LED on the BOOT0 path has been replaced with a 0 Ohm resistor to actually pull the pin low. Please let me know any further info required.
Solved! Go to Solution.
2024-10-21 01:14 AM
@liaifat85 wrote:You mentioned that NRST is unconnected. You can connect it directly to the ST-Link reset pin and attempt a reset before programming to ensure a clean reset signal.
Indeed.
@akenvi although NRST isn't strictly necessary, it is always wise to include it in the debugger/programmer connection - it will get you out of some situations where just the SWDIO+SWCLK can be locked-out.
@liaifat85 wrote:Before printing the PCB, it is always better to simulate the schematic.
Would any of those simulators actually simulate the SWD link?
2024-10-22 12:36 AM
Thanks all for your further answers!
It appears though as the problem is somewhere on the HW config side. We now tested several boards with the "real" ST-LINK V2 and NRST connected to no avail. When checking the levels of the signals close to the MCU pins or at the MCU pins there was a decent signal quality with almost no overshoot and a ripple of 100 mV peak-peak at 3.25V, SWCLK and SWDIO both looked similar in quality and NRST had a bit slower rise/fall time due to the capacitor as expected, but signal was very smooth.
On one board we had many GPIOs high while on others almost none were (NRST was always high though).
The next step is to build the board in the most basic config without any unnecessary components and check from there again.
2024-10-22 07:06 AM
Thank you,
apparently it was the VDDA pin that was not powered properly. With the pin powered the MCU boots and connection via STM32CubeProgrammer was possible in a first try. I think that solved the riddle.
2024-10-22 07:07 AM - edited 2024-10-22 07:08 AM
The marked solution from @Tesla DeLorean suggests Analogue Power or Part Orientation - which was it?
Sorry - posted too quickly!