Missing ''busy'' state handling in custom USB HID code generated by MX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-05-16 3:51 AM
I'm using STMCubeMX 4.21.0 to generate custom USB HID project. My device needs to send frequent HID reports, therefore it calls USBD_CUSTOM_HID_SendReport every 1-10ms.
This function always returns USBD_OK, even if previous report is not transmitted - in this case it just ignores new report.
It becomes a problem because there is no way for user code to check if data was successfully transmitted or another attempt is required.
I've implemented a local workaround in this function: it returns USBD_BUSY when hhid->state == CUSTOM_HID_BUSY
But this change is not in user modifiable area, therefore this change is lost on every project re-generation in CubeMX.
Am I missing something, is there any other good way to work around this issue?
#cubemx-usb-hid- Labels:
-
STM32CubeMX
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-05-17 5:02 AM
Hi
Tyurin.Denis_Mikhail
,Please attach your .ioc file.I shared thisissue internally with our CubeMx team for further check and investigation.
Thanks
Imen
Thanks
Imen
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-05-17 7:14 AM
Sure, here is the link to ioc file:
https://raw.githubusercontent.com/denis-m-tyurin/IRtoUSB/master/Firmware/IR_TO_USB/IR_TO_USB.ioc
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2017-10-25 4:59 AM
This still exists in v4.1, my thought is smae with
HAMMI.Imen
‌, there need a busy state with return to check whether the data is transmittedsuccessfully.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-23 9:53 AM
Hello,
Please note this is not an STM32CubeMX issue but a USB device library issue. The fix will be available with the next version of the library, that is delivered as part of the STM32Cube MCU embedded software packages.
Best regards.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2018-02-23 6:18 PM
I did this too for my device project on STM32F072.
-- pa
