2026-04-22 10:34 PM - last edited on 2026-04-23 2:59 AM by Andrew Neil
Hardware: STEVAL-MKI109D (STM32H563ZI)
CubeMX: 6.17.0
CubeIDE: 2.1.0
Connection: USB-C directly to STM32H563 USB OTG (no ST-LINK chip)
PROBLEM:
I need USB CDC Virtual COM Port in a bare-metal application
(no RTOS). CubeMX 6.17.0 for STM32H563 only offers:
- USBX (requires ThreadX)
- ThreadX
- FileX
- LevelX
Classic USB_Device middleware (usbd_cdc_if.h / CDC_Transmit_FS)
is NOT available for STM32H5 series in CubeMX 6.17.0.
USBX requires ThreadX RTOS. Without ThreadX running,
MX_USBX_Init() causes the board to crash silently —
after DFU flash the board is completely invisible on USB
(no lsusb entry, no /dev/ttyACM*).
QUESTIONS:
1. How do I implement USB CDC on STM32H563 WITHOUT ThreadX?
2. Is there a way to enable classic USB_Device stack for STM32H5
in CubeMX 6.17.0?
3. Is there a bare-metal USBX CDC example that does NOT require
ThreadX for STM32H5?
4. Can I manually add usbd_cdc_if.c and USB Device library files
to an STM32H5 project without CubeMX support?
I have a working SPI sensor application (ISM330DHCX on DIL24)
and just need to stream data over USB CDC. Adding full ThreadX
RTOS is too complex for this use case.
Please provide guidance or a working minimal example.
Attachments: MKI109D_ISM330DHCX.ioc
2026-04-23 3:07 AM
Hello @pooja_g
First, I would suggest starting with this article : How to implement USBX in standalone mode and How to implement USB mass storage device standalone
Second CubeMX doesn't support classic core middleware for H5 as it supports natively USBX. To use classic core MW apps, check this repo.
Also you can port this example.
I hope this helps!
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.