Showing results for 
Search instead for 
Did you mean: 

STM32U575 : simple USB VCP UART

Senior III

I have my own little board: with STM32U575CIT6Q (LQFP48 package). The USB is very simple and just DM (PA11) and DP (PA12) are connected. No USB-C, no USB-C Power Detector neither external chips for USB-C (as on NUCLEO-Board for USB-C-power).

I want to bring-up a simple USB VCP (CDC) UART, in FS mode. But all the code (generated by CubeMX) and example codes in CubeMX drivers/demo/application download does not work:

a) I do NOT want to use USB-C stuff, assuming "UCPD", e.g. MX_UCPD1_Init(); means "USB-C Power Detection"! There is not anay USB-C power detection, unit etc.
b) biggest problem: when code enters call: CHECK_CAD_FUNCTION_CALL in file "usbpd_pdm_core.c" - my external debugger (ST-Link2 via SWD pins (PA13 = SWDIO, PA14 = SWCLK) is disconnected (debugger in GUI is lost).

This function CHECK_CAD_FUNCTION_CALL comes from a pre-compiled LIB "USBPDCORE_NOPD_CM33_wc32.a" - what is it doing?

==> how to create a simple USB FS VCP UART with STM32U575 chip? (w/o any USB-C stuff)

the simple ST Middleware with USB Device is gone. All is now ThreadX, USBX based (OK, I can go with a "new" RTOS", FreeRTOS/CMSIS_RTOS seems to be gone).

But why is it so complicated to generate a FW for my own board? (NUCLEO boards are working fine, but designing your own board and bring up a FW for it is much harder now).



Accepted Solutions

I have one PCB now working (details below).

On chips with VDDIO2 (my LQFP64 package does not have) - some GPIOs can be driven with 1.8V (even MCU is on 3.3V), but not all. Pretty cool feature (I like it),
Unfortunately, not the QSPI signals are on VDDIO2.
So, I had to run entire MCU with 1.8V in order to get all my needed GPIO signals as 1.8V logic (e.g. also I2C, some GPIOs).
Never mind.

1.8V VDD:
One board is now working!

The change I did:
there is a (deblocking) cap on VDDSMPS: it was 1 microF or 0.1 microF before - NOT 10 microF. Changing it to 10 microF (and cap is very close to pin) - seems to be the root cause.

I had also an external pull-up on nRST (as 10K) - now as DNI (because I saw: nRST has an internal pull-up already, but I guess this was not the cause).

I can confirm as:

If VDD drops below 1.796V (with external PSU) - USB does not work anymore.

Ext. OSC still OK, SMPS seems to be OK, even with lower voltage (both are still oscillating). But MCU does not come up on USB with VDD "too low" (even still in spec. range).

No idea what happened: the same external LDOs ICs I tried before (for fix 1.8V) show me now 1.801V - and it works.
I got impression: when VDD is too low, the board draws more current and the voltage on VDD drops (I have used the current limiter on external PSU).

Never mind: works now entire MCU as 1.8V (on one board).


Best regards,

View solution in original post

Lead II

Do it exactly as you would with any other STM32 chip or board. UCPD is not related to USB device other than by sharing the connector. Do not configure/enable UCPD, just do the USB device CDC VCP stuff.

Than you. Yes: I am thinking to take the ST USB Middleware (stack) from another project and merge it to this MCU. Let's see.

Principal III

Thank you for your great hints, very helpful.
After I have studied several repositories and projects - I went with my USB VCP working on another board
(Portenta H7, based on a STM32H7xx). Was a bit easier (and the same USB FS stack works).

It was easier to "merge" the old Middlewares/ST/STM32_USB_Device_Library into my new project.
-- IT WORKS --

now I have USB VCP working on my own PCB, with a STM32U575CIT6Q chip.
And I have my QSPI tester working (I need QSPI as interface for external chips). It works.

Here my board:


Just strange:

It works only if I configure UART1, I have to do (otherwise USB does not work, even not using UART1 yet):

#if 1

/* XXXX: why is it necessary to get UART VCP working??? */






If you dont want to be forced to use ThreadX (like me), look also here :

STM32H5 Classic Core Middleware

  • ST's proprietary stacks: ST USB Device and ST USB Host
  • Third parties' stacks: FreeRTOS, FatFS, and LwIP


If you feel a post has answered your question, please click "Accept as Solution".

Thank you, very helpful.

But I could cry...  "rrrrrr"
using USB needs to power MCU with 3V3!

My board, with 48pin STM32U575CIT6Q (LQFP48), runs fine with 1V8 LDO:
I can connect via the debugger, I can flash FW ...
BUT: the USB does not work! (no VCP UART).

Changing to 3V3 LDO - all works fine.
(all what I have read: yes, USB needs 3V3)

So, STM32xxx MCU does not work with VDD 1V8 - USB is "broken"!

This small package does not have an option for several VDDs, all the same, I think.
Pretty annoying - why STM cannot make USB FS inside chip working even at 1V8?

"rrrrrrr" (now this MCU is off from my list to be used for my purpose: QSPI testing with 1V8

Well the 48-pin doesn't look to export the VDDUSB supply for the USB pin drivers.

For QSPI 1.8V you can use one of the NUCLEO boards and jumper the Core to 1.8V

Tips, buy me a coffee, or three.. PayPal Venmo Up vote any posts that you find helpful, it shows what's working..

VDDUSB has to be 3V3 , because usb interface signals are at 3V3 level,

see ds:  48pin is the only case, without separate usbvdd, so pin bonded to vdd internal;

if you want separate usbvdd , minimum is 64pin case;




If you feel a post has answered your question, please click "Accept as Solution".

Thank you.
I saw: (USB is 5V) but USB FS PHY needs 2.7...3.3V (datasheet).
I have redesigned my PCB: now with LQFP64 package, which has VDDUSB (set to 3V3).,


All fine.

Happy New Year