Skip to main content
Visitor II
January 9, 2022
Solved

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

  • January 9, 2022
  • 4 replies
  • 2606 views

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.

    This topic has been closed for replies.
    Best answer by MM..1

    As describe Nucleo pdf you need config ...

    0693W00000Hr0JqQAJ.png

    4 replies

    Visitor II
    January 9, 2022

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

    Mike.BKAuthor
    Visitor II
    January 9, 2022

    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..1Answer
    Graduate II
    January 9, 2022

    As describe Nucleo pdf you need config ...

    0693W00000Hr0JqQAJ.png

    Mike.BKAuthor
    Visitor II
    January 9, 2022

    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.