cancel
Showing results for 
Search instead for 
Did you mean: 

USB defined as Class = DFU need to printf to interface for Debug

MStev.7
Associate II

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.

1 REPLY 1

Sounds like a Composite device, you'd need to add descriptors and end-points to manage the two types of device.

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