2025-11-25 2:07 PM
Hello everyone,
I'm trying to get the USB CDC protocol working with USBX. The hardware is fine because DFU works, and I can flash the board through it. Following a tutorial, I was also able to implement a bare-metal USB CDC device, and everything enumerated correctly and printed data.
I uploaded the USB_CDC example for the STM32WBA65RIVx, and that also enumerated without issues.
(I removed the UART part because I don’t have it; I only tested sending “hello world”.)
Then I tried to integrate USB CDC into my own project, and I got stuck because I couldn't understand why the example works but my IOC configuration does not.
Eventually, I found that enumeration only works if the option UX_DEVICE_CLASS_CDC_ACM_TRANSMISSION_DISABLE is enabled.
When I disable that option, the PC cannot detect my board.
What could be the reason for this?
I increased:
usbx_system_stack_size to 32×1024
usbx_memory_pool_size to 32×1024
Another strange thing: this parameter must be set exactly like this, otherwise enumeration does not happen:
#define UX_SLAVE_REQUEST_DATA_MAX_LENGTH 512Even if UX_DEVICE_CLASS_CDC_ACM_TRANSMISSION_DISABLE is enabled, increasing this value stops enumeration. I don’t understand why.
Minimum HEAP and STACK sizes are both set to 0x2000.
Any ideas or suggestions would be greatly appreciated.
I will attach some photos.