cancel
Showing results for 
Search instead for 
Did you mean: 

How to send commands from PC to Nulceo board over ST-Link USB interface (UART)?

Mike.BK
Associate II

Hello everyone

I'm using a Nucleo board, specifically the L031K6. I'm used to sending UART messages from the board to the PC via the ST-Link USB interface. In this project I wanted to do the other direction going from the PC up to the card over the same interface.

The problem is I keep receiving data on the PC but I couldn't receive any data on the card although I tried different serial terminals.

When I searched online I only found examples of people using the other USB interface available on some cards in order to communicate in both directions or directly over GPIO using an external USB-UART bridge.

I want to know if it is possible to this task directly over ST-Link because that would be easier than buying an additional card or a new Nucleo with extra USB.

Thank you.

1 ACCEPTED SOLUTION

Accepted Solutions
MM..1
Chief II

As describe Nucleo pdf you need config ...

0693W00000Hr0JqQAJ.png

View solution in original post

4 REPLIES 4
S.Ma
Principal

Well, you need to create a code in the target mcu to catch incoming data, interpret it, amd process it....

Mike.BK
Associate II

I did create the code, with 3 scenarios, Polling, DMA and interruptions, and all of them didn't work when I send data to the board over the ST-Link (i.e over COM port in my PC)

Maybe I was not clear, I did succeed in having the solution with an external USB to UART circuit (FTDI) that is connected to UART pins on the Nucleo. My problem is that I do not want to use another external circuit, but rather the ST-Link for both directions (Nucleo -> PC which is working, PC -> Nucleo which isn't working)

MM..1
Chief II

As describe Nucleo pdf you need config ...

0693W00000Hr0JqQAJ.png

Mike.BK
Associate II

Thank you, this solved the problem.

I used PA2 and PA3 instead of PA15 and that's why I can send but can't receive.

Much appreciated.