2021-09-20 02:45 PM
Hi!
I am currently trying to connect the ST-LINK/V2 to my custom board which is using a STM32F446RC. I am able to detect the ST-LINK using both the STM32CubeIDE or the STM32 ST-LINK utility, however this is only displaying the serial number. but it is failing to detect the target (MCU).
I have added a picture of the header on the custom board and the header am using for guidance.
Am not sure whether to use the JTAG connections or the SWD connection guidelines.
2021-09-20 02:52 PM
Seems like your pin numbering is completely rotated vs ARM 10-pin
Just use the SWD connections, the ST-LINK expects 3.3V on Pin 1 or 2 of their header
GND, VCC, SWDIO/TMS, SWCLK/TCLK minimum
NRST allows for connect under reset
SWO/TDO allows for debug channel
Check orientation of your STM32
Make sure VDDA is powered
Check voltage/caps of VCAP pins, should see 1.25 V or about
Check level on NRST, should be high
2021-09-20 03:48 PM
@Community member Thank you for replying. So I tried connecting it using the SWD connections. I have attached a picture of the table I used for connection. the SWO pin would be PB3 on the custom board header. Everything else maps the same. I still receive a fail connection.
2021-09-20 04:00 PM
Using the STM32CubeIDE I change the debugger configuration to openOCD just for the sake of getting some output, the error I receive on the console is the following:
Error: target voltage may be too low for reliable debugging
Error: init mode failed (unable to connect to the target)
Using GDB server I get:
Error in initializing ST-LINK device.
Reason: No device found on target.
The BOOT0 and BOOT1 are both hard-wired to GND on the custom board
2021-09-20 04:09 PM
The reading on the VCAP is about 4.2 mV
2021-09-20 04:20 PM
Additionally, if I disconnect the ST-LINK/V2 from the computer but leave it connected to the custom board, the ST-LINK/V2 led stays on. Am not sure if this is a positive indication.
2021-09-20 05:19 PM
Apologies, the VCAP pin has a voltage of 1.14 V and NRST is high.
I however wired the BOOT0 and BOOT1 to ground, which means is booting from the user flash memory. Could this be the issue?
2021-09-20 05:43 PM
Recheck connections. If it's not detecting the target voltage is 3.3V, something is off. BOOTx connection doesn't matter for debugging, unless your program reassigns SWD pins.
Try STM32CubeProgrammer.
2021-09-20 08:43 PM
No shouldn't matter. It does however foreclose on the ability to get a signs-of-life response from the System Loader via a USART
The inability to connect typically falls into two categories, the wrong pins, or device non-functional.
The ST-LINK via Utilities or STM32 Cube Programmer, should be able to report the VCC / VTarget voltage
NRST High suggests the analogue side is powered.
Close to 1.2V on the VCAPs suggests orientation is correct.
2021-09-21 01:50 PM
Thank you @Community member and @TDK I will go ahead and probe the SWD and SWCLK. I will post schematics along with the results from the probing.