cancel
Showing results for 
Search instead for 
Did you mean: 

USB Composite Device Bug

Apisit-K
Associate

 

I have setup a Nucleo-F103RB as a USB composite device by (CDC + HID) by modifying a STM32CubeMX CDC project. The device enumerates correctly and everything works initially, however I am encountering a strange bug where if I open a COM port to read the CDC data and then close it, the HID portion stops responding until I open the COM port again. 

Also worth mentioning I am using FreeRTOS with separate tasks for sending HID report and CDC data.

Does anybody know where to look to fix this bug?

Thanks in advance.

 

1 REPLY 1
Imen.D
ST Employee

Hello @Apisit-K 

Could you please provide more details about your problem, use debug logs to trace the execution flow and identify where the failure occurs.

Ensure you are using the latest version of STM32CubeMX, HAL libraries, and FreeRTOS, as limitations fixes in newer versions might resolve your issue.

Check the configuration of the USB middleware in STM32CubeMX and ensure that the composite device is correctly set up to handle both CDC and HID.

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen