2020-07-11 05:32 AM
I've made a custom design of a board with an STM32F070C6B6. When powering on the board and connecting a genuine ST-LINK v2 programmer, the connection fails halfway through the setup.
What i've tried (i'm on linux):
1) Via STM32CubeProgrammer:
Connect under reset & core reset: the connection fails with either "DEV_CONNECT_ERR" or "DEV_TARGET_CMD_ERR"
2) Via OpenOCD:
`openocd -f interface/stlink-v2.cfg -c "reset_config srst_only srst_nogate connect_assert_srst" -f target/stm32f0x.cfg --debug` : The connection succeeds, but the chip does not respond to "halt" or "flash banks mass_erase".
3) St-link tools: Tool can connect but says "unknown chip"
Any idea's what could cause this?
Attached are a picture of the board and the pcb layout.
2020-07-11 06:18 AM
Seems reasonable enough
The CM0(+) have relatively slow connectivity. This isn't usually a problem with ST-LINK/V2 which connect at 1 to 4 MHz, but can be an issue with ST-LINK/V3 at 24 MHz
If there is no code on the part, and it keeps dropping out, I'd look at the power supply and VDD/VDDA
With user code, entering low power modes, reconfiguring or disabling the SWD or PA13/PA14 pins, will cause loss in connectivity. Having BOOT0=HIGH can give safe harbour in the System Loader, rather than user code.
2020-07-12 08:26 AM
Hi, thanks for looking into this. The power good LED stays constant bright the entire time so i would doubt that the power supply is a big issue (feeding of a bench power supply). The part is factory new so bad code also shouldn't be a problem.
I'm not sure in what direction to look then, it could be my st-link v2 that's faulty somehow. The errors that I'm getting ("DEV_CONNECT_ERR") seem to indicate that the communication is working, but the chip somehow returns wrong values..
2020-07-12 09:50 AM
Well, do the Murphy's law check: