STM32 Nucleo U575ZI-Q Board implemnetation of usart2 via USB C
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-15 2:23 AM - last edited on ‎2025-04-17 12:00 AM by mƎALLEm
I have a raw dataset in header file; I have to do some post processing with it ; So How can I get it done with USART by plotting the waveform .
even After Configuring USART2 and UCPD with CDC also I dont find USART is detected; If I Am wrong Correct me and How to approach this?
- Labels:
-
STM32U5 series
-
UART-USART
-
USB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-15 2:37 AM - edited ‎2025-04-15 2:41 AM
Welcome to the forum.
Please see How to write your question to maximize your chances to find a solution for best results.
@Sathees_medtronic wrote:I have a raw dataset in header file; I have to do some post processing with it ; So How can I get it done with USART by plotting the waveform .
I'm not sure what you're actually asking here?
If the data is in a header file, can't you just take it direct from there?
Do you really just want to know how to transfer data - any data - via UART?
More specifically, via the Virtual COM Port (VCP) provided in the ST-Link on your Nucleo U575ZI board?
As you can see in the User Manual for the board, the ST-Link's VCP connects to a UART on the STM32U5 Target chip:
This give you a UART connection to the Host PC via the ST-Link's USB connection (Micro USB; CN1) without the need for any USB code in the STM32U5 Target chip.
This Virtual COM Port is, by default, connected to LPUART1 on PA9,10:
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-15 2:44 AM
@Sathees_medtronic wrote:After Configuring USART2 and UCPD with CDC also I don't find USART is detected; If I Am wrong Correct me and How to approach this?
To create a "virtual" UART link over USB, you would not use a real UART on the Target microcontroller at all - the comms would be purely through the USB software.
As noted above, by far the simplest way to get UART comms with a PC is to use the ST-Link's VCP.
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-16 9:11 AM - last edited on ‎2025-04-16 9:40 AM by Andrew Neil
Duplicate merged as clarification
How to Use USB-C Port on Nucleo-U575ZI-Q Board for USART/CDC Communication?
Hi ST Community,
I’m working on the STM32 Nucleo-U575ZI-Q board and I need some guidance. I usually work with USART using the standard TX/RX pins, but this time, I want to use the USB-C port on the board to perform serial communication — specifically, sending data to a serial monitor on my PC.
Here’s what I’m trying to do:
- I have a dataset stored in a header file on the MCU.
- I want the STM32 to read this dataset and send each data point through the USB-C interface.
- On the PC side, I want to view this data on a serial monitor (like Tera Term or PuTTY), and eventually plot it in real-time.
I understand this should be done using the USB CDC class, but I’m completely new to configuring the USB-C interface as a virtual COM port.
Could someone please guide me
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-16 9:39 AM
Thanks for clarifying that you do actually want to use just USB.
But this still doesn't make sense:
@Sathees_medtronic wrote:
- I have a dataset stored in a header file on the MCU.
header files are not stored on the MCU - they get compiled into the Flash image.
So the file has to be available on the PC at the time you do the compilation.
So, as you have this data in a file on the PC, why not just take it directly from that file - why compile it and program it into an MCU, only to read it out again?
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-16 10:05 AM - edited ‎2025-04-16 10:12 AM
Yes They are stored in Flash,So How can Do it with CDC or How should I approach this!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-16 10:44 AM
Is there not an example in CubeIDE (ie, in the firmware pack) ?
A complex system designed from scratch never works and cannot be patched up to make it work.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2025-04-16 11:16 AM
For the south end USB connection you'd need to work the USB Device CDC examples.
You could read internal flash with something like a MSC or MTP device. Writing via USB might be more problematic as the internal flash can stall the MCU and not ideal for real-time operation. Could make a RAM drive, or use external QSPI NOR FLASH
Up vote any posts that you find helpful, it shows what's working..
