Skip to main content
Associate II
Sep 13, 2023 10:34 AM UTC
Question

STM32H735 CDC & DFU

Is their any possibilty to use CDC and DFU due to the same USB Port, by switching it by software? And is their any example for it? I tried several things but couldn't find any solution. The configuration at CubeMX Just allows one Class for USB_DEVICE Mode.

Tedico_0-1694601054184.png

This topic has been closed for replies.

5 replies

Pavel A.
Sep 13, 2023 1:31 PM UTC

What do you mean by switching? Do you want only one function at any time, or both simultaneously (a composite device)?

 

TedicoAuthor
Associate II
Sep 14, 2023 6:36 AM UTC

By switching i mean, only one function at any time. The DFU Upload mode then should be started by a defined CDC command.

AScha.3
Super User
Sep 13, 2023 1:37 PM UTC

dual/composite device :  just an example ->

 https://github.com/STMicroelectronics/x-cube-azrtos-h7/tree/main/Projects/STM32H747I-DISCO/Applications/USBX/Ux_Device_HID_CDC_ACM

>> This application provides an example of Azure RTOS USBX stack usage on STM32H747I-DISCO board, it shows how to develop a composite USB Device communication Class "HID" and "CDC_ACM" based application.

 

If you feel a post has answered your question, please click on " Best Answer ".
TedicoAuthor
Associate II
Sep 18, 2023 1:50 PM UTC

Thanks for the example, but how can i migrate such a project to my hardware? I tried by creating and comparing and merging a new project for my hardware but without any success. Do you have any tip?

TedicoAuthor
Associate II
Sep 21, 2023 1:09 PM UTC

I now was able to create a project including CDC_ACM and DFU and the initialization also looks well. The code is similar to the other example with CDC_ACM and HID.

Nevertheless i have problems to run it at the target device STM32H735. In the debug session that function call _tx_thread_schedule(); never returns.

Does anyone have any idea, what I'm doing wrong?

Attached I have the project.

Thanks in advance.