2023-03-28 08:55 AM
The device I am using is the STM32G0B1RETx, which has a USB feature. The system is wired up to allow access to the USB interface and is viable via /dev/tty.usbmodem123 on a PC. I have a design that requires the USB interface to be configured for DFU, the configuration in STM32CubeIDE is USB_DRD_FS= Device_Only_FS and USB_DEVICE=Download FIrmware Update Class (DFU). This configuration works properly and I am able to perform a DFU upgrade without any issues.
The issue I am facing is I have a need to send debug messages to the USB interface while the interface is in this mode.
I can achieve sending debug messages out of the USB interface IF I configure the interface as a Communication Device Class (Virtual Port Com), however when I configure the interface in this manner I lose the ability to perform DFU updates, which are required in my design.
So I need a solution that will provide the DFU functionality as well as the ability to send debug messages to the USB interface, somewhat of a hybrid of DFU and VPC.
2023-03-28 01:51 PM
Sounds like a Composite device, you'd need to add descriptors and end-points to manage the two types of device.