2020-07-01 09:46 AM
ive been trying to get my first board with a stm32 running. Im using an stm32f031k6 and an STlink v2 and I keep on getting the "can not connect to target" error. It seems like I can connect through the stlink utility to the programmer, and I've checked and double checked the connections between the board / programmer. Ive tried changing the utlity link options but no change, the only thing i can think of its a problem on the board so I have a few questions about the board layout -
any help much appreciated
2020-07-01 10:27 AM
debug connections are enough.
Startup happens with HSI, si crystal does not mattere
No need for pull, but NRST needs 100 nf to ground
Device must have all power pind connected and decoupled with low impedance pathes.
2020-07-01 10:31 AM
Most often it is that the chip is simply non-functional in the circuit
Connections seem Ok
External clock is irrelevant, the chip does not start or use, checking the clock is not a signs-of-life test.
Reset can be left as is. Should be an internal pull-up, and should read High in a static state
BOOT0 should be pulled low, but is not critical to "No Target"
Make sure VDDA/VSSA are connected
Make sure NRST is High
External ST-LINK/V2 needs power on pin 1 or 2 of the header
Check part orientation
Check supply pins
Check netlist for orphaned or unconnected nodes, especially with naming/symbols for ground and power
2020-07-01 12:18 PM
"can not connect to target" error." Try connect during reset or whatever it is called. Try different SW. STM32 ST-LINK Utility or Cube programmer may work.
The CPU is quite resistant to errors. A friend left out some power supply 100nF and I forgot to connect Vcaps together and used wrong size capacitors. But Cpu definitely breaks if you solder it 90 or 180 degrees off, I have tried those too. Should I say on purpose?
2020-07-01 01:17 PM
thanks all, i got it sorted - i made my own cable and it had a short. It's all working :)