Showing results for 
Search instead for 
Did you mean: 

I have an issue with STM32L552 USB library. After sending an HID message once, the usb will send empty packets indefinitely (len=27, data len =0).

Associate II

This is the data I recorded with WireShark. As shown in the picture, when I send HID packet once (len=91), the USB will send empty data packets indefinitely (len=27), then trying to send packets from host to device (out direction) will cause the transmission to fail. 

The USB middleWere was done by the CubeMX plus modifications that needed to support 64 bytes packets for custom HID.

I can’t find a way to stop or solve it.

Need to mention that this kind of problem has never appeared when doing the same on STM32F103.


I have a similar problem on STM32G491 custom HID. After sending the first packet I get continuous 0-byte IN transactions sent. Did you ever find a fix?

Associate II

I have seen various problems with custom HID with various versions, notified at many places :

etc. It seems Custom HID implementation is not really taken seriously at ST.

What I find is that it depends a lot on the version of the Cube framework. People say that it works well with the 5.2 (but I was not able to install it on recent linux distribution), I found that it works on CubeMX 6.7 with Framework v. 1.11.0 but not with 1.11.3 for example. So you should not use "Use last version" but a given version. For me on a STM32F3-discovery it works well with 1.11.0 in custom HID.

Hope this helps,