cancel
Showing results for 
Search instead for 
Did you mean: 

STM32H735 CDC & DFU

Tedico
Associate II

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

5 REPLIES 5
Pavel A.
Evangelist III

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

 

AScha.3
Chief II

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 "Accept as Solution".

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

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?

Tedico
Associate II

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.