You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
danielsulik opened this issue
Sep 7, 2023
· 4 comments
Assignees
Labels
projectsProjects-related (demos, applications, examples) issue or pull-request.questionFurther information is requestedusbUSB-related (host or device) issue or pull-request
Brief description
A serious problem with USB composite CDC-CustomHID device working reliably. I have ported your H7 Composite Custom HID - CDC example code to STM32F723 MCU.
HID interface either hangs, sometimes CDC I/F hangs or data integrity fails when running loopback test on both
interfaces at the same time from two different host processes.
Describe the set-up
The board: Not applicable. I was testing with STM32F723-DISCO development board.
IDE: System Workbench for STM32
Observed on Windows 7, 8.1, 10
Describe the bug
I have implemented USB composite CDC- and Custom HID device based on your H7 Composite Custom HID - CDC example code.
HID I/F receives 64 bytes long reports and sends the same reports back to the host running a HID loopback test process .
CDC I/F receives random bytes long packets from length between 1 to 12345 bytes and sends the same data back to the host running loopback test on the same host, however in a different process.
Device enumerates OK with VID 0x483 and PID 0x5741,
If I run test on one interface only it works reliably 247 without any problem.
Once I run loopback test on both interfaces one of the interfaces hangs or incorrect data is received by the host.
Does not matter if the code is running in HS or FS mode.
For simplicity no UART is implemented on CDC side. There is just a simple loopback.
The main loop is not stuck, blinking LED process is still blinking, however processing of comms on USB either CDC or HID is stuck. Looks to me like missing an interrupt processing.
Minimal version of the code is in the attachment. cdc-hid-min.zip
The text was updated successfully, but these errors were encountered:
To replicate the problem quicker set bInterval parameter to 0x1 on CDC and HID interface.
in usbd_customhid.h
#define CUSTOM_HID_HS_BINTERVAL 0x1U
#define CUSTOM_HID_FS_BINTERVAL 0x1U
in usbd_cdc.h
#define CDC_HS_BINTERVAL 0x1U
#define CDC_FS_BINTERVAL 0x1U
By the way, STM32CubeF7 firmware still supports version 2.11.0 of the USB Device library, while the latest version is 2.11.2 including some fixes. Would you give it a try? You can find it here and could easily integrate it manually into your project.
projectsProjects-related (demos, applications, examples) issue or pull-request.questionFurther information is requestedusbUSB-related (host or device) issue or pull-request
Brief description
A serious problem with USB composite CDC-CustomHID device working reliably. I have ported your H7 Composite Custom HID - CDC example code to STM32F723 MCU.
HID interface either hangs, sometimes CDC I/F hangs or data integrity fails when running loopback test on both
interfaces at the same time from two different host processes.
Describe the set-up
The board: Not applicable. I was testing with STM32F723-DISCO development board.
IDE: System Workbench for STM32
Observed on Windows 7, 8.1, 10
Describe the bug
I have implemented USB composite CDC- and Custom HID device based on your H7 Composite Custom HID - CDC example code.
HID I/F receives 64 bytes long reports and sends the same reports back to the host running a HID loopback test process .
CDC I/F receives random bytes long packets from length between 1 to 12345 bytes and sends the same data back to the host running loopback test on the same host, however in a different process.
Device enumerates OK with VID 0x483 and PID 0x5741,
If I run test on one interface only it works reliably 247 without any problem.
Once I run loopback test on both interfaces one of the interfaces hangs or incorrect data is received by the host.
Does not matter if the code is running in HS or FS mode.
For simplicity no UART is implemented on CDC side. There is just a simple loopback.
The main loop is not stuck, blinking LED process is still blinking, however processing of comms on USB either CDC or HID is stuck. Looks to me like missing an interrupt processing.
Minimal version of the code is in the attachment.
cdc-hid-min.zip
The text was updated successfully, but these errors were encountered: