Question
STM32 prototype unable to connect to PC using ST-Link/V2 SWD
Posted on May 23, 2016 at 10:28
Circuit Diagram
http://i.stack.imgur.com/0cqvh.png
Background & What I have triedI have wired wrapped this setup myself using a fresh STM32F411RC MCU from digikey (on a proto-advantage LQFP-64 to DIP-64 breakout board).I have Boot0 set to 1 and Boot1 set to 0, which should start the System Memory which contains the bootloader (AN4488), but I don't think it matters what is selected for SWD to work.I've wired up the SWCLK, SWDIO, NRST, GND, MCU_VDD, as outlined in the ST-LINK/V2 User Manual (UM1075).I power my prototype using the USB, a multimeter confirms 3.3v is getting to each of the VSS/VDD pairs & VBAT pin.I've tried the various frequencies for SWD as well as the various Reset Modes and Modes in the windows GUI.My wiring is as minimal as this guy using the STM32F030, so i'm not sure what the problem is: https://www.newbiehack.com/categories/newbiehack-tutorial-ARM-Video6-GPIOCreatingTheCircuit-nomenuError message arch:~$ st-util -v99 2016-05-18T12:50:58 DEBUG src/stlink-common.c: stlink current mode: debug (jtag or swd) 2016-05-18T12:50:58 DEBUG src/stlink-common.c: stlink current mode: debug (jtag or swd) 2016-05-18T12:50:58 DEBUG src/stlink-common.c: *** looking up stlink version 2016-05-18T12:50:58 DEBUG src/stlink-common.c: st vid = 0x0483 (expect 0x0483) 2016-05-18T12:50:58 DEBUG src/stlink-common.c: stlink pid = 0x3748 2016-05-18T12:50:58 DEBUG src/stlink-common.c: stlink version = 0x2 2016-05-18T12:50:58 DEBUG src/stlink-common.c: jtag version = 0x19 2016-05-18T12:50:58 DEBUG src/stlink-common.c: swim version = 0x4 2016-05-18T12:50:58 INFO src/stlink-common.c: Loading device parameters.... 2016-05-18T12:50:58 DEBUG src/stlink-common.c: *** stlink_core_id *** 2016-05-18T12:50:58 DEBUG src/stlink-common.c: core_id = 0x00000000 2016-05-18T12:50:58 DEBUG src/stlink-common.c: *** stlink_read_debug32 0 is 0xe0042000 2016-05-18T12:50:58 DEBUG src/stlink-common.c: *** stlink_read_debug32 0 is 0x40015800 2016-05-18T12:50:58 WARN src/stlink-common.c: unknown chip id! 0 2016-05-18T12:50:58 DEBUG src/stlink-common.c: *** stlink_close ***Under linux ST-LINK/V2 is detected however the MCU is not. Windows STM ST-LINK Utility trace.log: Error (0x16) after target cmd F2 36 04 20 04 E0 00 00 00 00 W at 0xe0042004: 0x00000000 Error (0x12) after target cmd F2 35 04 20 04 E0 00 00 00 00 W at 0xe000edf0: 0xa05f0000 Error (0x12) after target cmd F2 35 F0 ED 00 E0 00 00 5F A0 cErrLog::SetLogTraceOn STLinkUSBDriver.dll loaded ST-Link/V2 device detected Target voltage detected: 3.222947 Driving NRST low Error getting target IDCODE: if SWD, check SWD connection Error (4) while initializing ST-Link in SWD mode ST-Link/V2 device detected Target voltage detected: 3.221382 Driving NRST low Error getting target IDCODE: if SWD, check SWD connection Error (4) while initializing ST-Link in SWD mode ST-Link/V2 device detected Target voltage detected: 3.221382 Driving NRST low Error getting target IDCODE: if SWD, check SWD connection Error (4) while initializing ST-Link in SWD modeThe windows GUI shows ''Detection Failed'' for ''Target'' & ''Target Voltage'', and provides the error message ''Can not connect to target.''.Questions- Any ideas on what I should try next, or what might be causing the problem?
- Put a 22ohm resistor on the NRST line between the ST-LINK/V2 and the board. (AN4488 pg42)
- Fully wire up and ground all the other ST-LINK/V2 header pins like shown in AN4488 pg42, even though I don't think it's necessary.
- Product page with all datasheets: http://www.st.com/content/st_com/en/products/microcontrollers/stm32-32-bit-arm-cortex-mcus/stm32f4-series/stm32f411/stm32f411rc.html
