2 years, 10 months ago.

Detached ST-LINK/V2-1 no virtual com

Is this as designed or am I doing something wrong? I'm using a NUCLEO F767ZI

I've been through the documentation. Updated to latest mbed-os and updated the STLINK firmware to the latest but I still can't see any output. I'm on OS-X, so before it was detached I would just screen /dev/tty.usbmodemXXXX and get any printf statements in my program (using Serial USBTX,USBRX). Now that the STLINK is broken off I have no jumpers connected on the STLINK, and SWD is connected as follows:

1 - VDD_TARGET - CN8 pin 7 (3.3v)

2 - SWCLK - CN11 pin 15 (PA14)

3 - GND - CN8 pin 13 (GND)

4 - SWDIO - CN11 pin 13 (PA13)

5 - NRST - CN11 pin 14 (RESET)

6 - PB3 - CN7 pin 15 (SWO)

I have USB to STLINK and 5V in to E5V on the NUCLEO for power.

Am I missing something here?

1 Answer

2 years, 10 months ago.

The STLINK also acts as a Serial to USB interface. The target serial port pins identified by USBTX, USBRX pair are connected to a serial port on the STLINK F103 and piped through the USB serial channel that the STLINK provides. When you cut the STLINK board these serial port pins are disconnected and you dont see the communication anymore. There are several solutions:

Reconnect the USBTX,USBRX pair to the STLINK. You need to add some solderbridges on the nucleo target to enable D0,D1 pins again and then connect these pins to the TX,RX jumper on the STLINK part (see manual for details). You could also use another serial port instead of USBTX,USBRX pair.

You could use an external USB-Serial converter (eg using the FT232 or similar).

Another option that provides output only is to use the SWO debug method. See here for an example.

Accepted Answer

Thank you. I did manage to figure this out. I did not attempt to undo the solder bridges for SB5 and SB6, but instead changed my code from

Serial pc(USBTX, USBRX);

to

Serial pc(PG_14, PG_9);

and connected PG_14 to the STLINK TX pin and PG_9 to RX. Everything is working now.

posted by Kevin Sears 04 Jan 2018