2022-01-09 02:57 AM
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.
Solved! Go to Solution.
2022-01-09 04:42 AM
2022-01-09 04:18 AM
Well, you need to create a code in the target mcu to catch incoming data, interpret it, amd process it....
2022-01-09 04:32 AM
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)
2022-01-09 04:42 AM
As describe Nucleo pdf you need config ...
2022-01-09 05:10 AM
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.