2021-04-09 02:09 AM
This is the data I grabbed with bushound. As shown in the picture, when I send data through HID once, the USB will send empty data packets indefinitely, and subsequent data packets will cause the transmission to be stuck and repeated. I tested the USB driver I designed and the HID sample program of FW_WB_V1.11.0, both of which are the same phenomenon. Through jtag debugging, it is found that after sending data, the register USB_EPnR will repeatedly change between 0x3673 and 0x7633. This is the proof that USB is sending data cyclically, but I can’t find a way to stop or solve it.
And this kind of problem has never appeared in the USB debugging of STM32F4.
Solved! Go to Solution.
2021-06-07 07:12 AM
Hello @ZZh.1 ,
For the mentioned behavior, the problem is fixed and it will be available in the next version FW_WB_V1.12.0.
Here’s the fix : on the file stm32wbxx_hal_pcd.c incomplete condition for the IT handler with interrupt transfers.
Line 1854:
the condition should be :
if ((ep->type == EP_TYPE_INTR) || (ep->type == EP_TYPE_CTRL) ||
((ep->type == EP_TYPE_BULK) && ((wEPVal & USB_EP_KIND) == 0U)))
Instead of :
if ((ep->type == EP_TYPE_BULK) && ((wEPVal & USB_EP_KIND) == 0U))
Thanks for your contribution and feel free to raise any issue or feedback.
You're always welcome.
BeST Regards,
Walid
2021-06-07 12:45 AM
Hello @ZZh.1 ,
Thanks for your contribution.
We confirm the point and we are working on it. We will give you an update as soon as possible.
BeST Regards,
Walid
2021-06-07 07:12 AM
Hello @ZZh.1 ,
For the mentioned behavior, the problem is fixed and it will be available in the next version FW_WB_V1.12.0.
Here’s the fix : on the file stm32wbxx_hal_pcd.c incomplete condition for the IT handler with interrupt transfers.
Line 1854:
the condition should be :
if ((ep->type == EP_TYPE_INTR) || (ep->type == EP_TYPE_CTRL) ||
((ep->type == EP_TYPE_BULK) && ((wEPVal & USB_EP_KIND) == 0U)))
Instead of :
if ((ep->type == EP_TYPE_BULK) && ((wEPVal & USB_EP_KIND) == 0U))
Thanks for your contribution and feel free to raise any issue or feedback.
You're always welcome.
BeST Regards,
Walid