2024-04-23 07:04 AM
I'm new to STM and I'm trying to use USART to communicate between MCU board and my computer. I'm now using USART2 and CP2102 to translate TTL to USB. And have succeeded. But my goal is to directly use USB-C of STLINK to output serial data, because the user manual of this board just like below shows that the USART3 can directly output to USB-C of STLINK. But I failed to use only USB to communicate and I don't no why.
Solved! Go to Solution.
2024-04-23 08:18 AM
Hello,
Via ZIO connector, simply connect:
USART2_RX (PA3) to USART3_TX (PD9)
USART2_TX (PD5) to USART3_TX (PD8)
Without disordering anything, you need to ensure that USART3 IOs are not configured to keep them as inputs.
2024-04-23 07:11 AM
Check the solder bridges mentioned in the documentation. Has anyone played with this board before you?
Is the VCP of the board visible on the host side (lsusb or device manager) ?
2024-04-23 08:18 AM
Hello,
Via ZIO connector, simply connect:
USART2_RX (PA3) to USART3_TX (PD9)
USART2_TX (PD5) to USART3_TX (PD8)
Without disordering anything, you need to ensure that USART3 IOs are not configured to keep them as inputs.
2024-04-24 12:26 AM
Thanks for your reply.
This board is brand new board, so the solder bridges should be default just like mentioned in the documentation. And sorry that I don't know what is VCP, could you please explain what do you mean by VCP is visible on host side?
2024-04-24 12:39 AM
Do you mean that I should set USART3 to disabled. Then output the TX RX from USART2 and connect it to output pin of USART3 (TX to TX RX to RX) than I can read the data from the USB-C of STLINK?
2024-04-24 01:03 AM
@BrianYuan wrote:what is VCP, could you please explain what do you mean by VCP is visible on host side?
VCP = Virtual COM Port - the USB-to-UART connection appears on the PC as a "virtual" COM port,
@BrianYuan wrote:please explain what do you mean by VCP is visible on host side?
When you plug the board in to your host computer, do you see its "COM port" appear?
You haven't said what computer you're using, but on Windows it would appear in Device Manager; eg,
2024-04-24 01:15 AM
Sorry, I'm using MacBookAir M2, and I use CtoC cable to connect from my laptop to STLINIK USB-C port it looks like below, it is detected to be /dev/tty.usbmodem1103. And I use
screen /dev/tty.usbmodem103 115200
this command to screen the serial output.
Btw, when I use USART2 to output data and use CP2102 module to translate to USB to my laptop, it looks like
/dev/tty.usbserial-0001
and I can successfully get the data from my board.
I'm not sure these information is helpful, and thank you for your help.
2024-04-24 02:22 PM - edited 2024-04-24 06:02 PM
Yes and you need to disable the gpio pins of USART3 no matter it’s is enabled or not.
2024-05-09 02:41 AM
Hello,
Could you please give a status of that thread? if it was resolved you need to click on "Accept as Solution" on the comment that answered your question.
Thank you for your understanding.