cancel
Showing results for 
Search instead for 
Did you mean: 

Looking for documentation on the CUSTOM_HID_ReportDesc_FS in usbd_custom_hid_if.c for custom HID.

Kevin Flanagan
Associate II
Posted on June 01, 2017 at 18:55

Looking for documentation on how to setup the CUSTOM_HID_ReportDesc_FS in usbd_custom_hid_if.c on a custom HID interface.

I seem to be banging my head against a wall, the forums, google,

https://www.youtube.com/channel/UCcnfF_6NPxbr-W2FOT6JRMQ

's youtube example, the custom hid example in STM32Cube_FW_F4_V1.16.0, ect... in trying to get a custom hid working on a Nucleo-STM32429zi board.

I get enumeration on a Windows 10 machine, but end up with errors that appear to be related to the report descriptor under device manager. Messages like 'An unknown item was found in the report descriptor' (most examples I found) and 'Extra end collection found or end collection not found.' (When left blank 0x00, 0xC)

This brings us back to CUSTOM_HID_ReportDesc_FS. In a nutshell, I need to create structure to exchange 64 byte messages in and out, and seem be failing with this descriptor. 

Any help finding the required documentation to understand and create a working descriptor would be greatly appreciated. 

Thanks,

6 REPLIES 6
Kevin Flanagan
Associate II
Posted on June 02, 2017 at 23:10

I seems to have gotten this working. Even though this question has not gotten a responce, digging through the forum archives has helped immensely. Not 100% what the hangup was, but some key items learned going down this road with the NUCLEO-STM32429zi...

  1. USBD_CUSTOM_HID_REPORT_DESC_SIZE in usbd_conf.h needs to match the number of bytes (33)used in CUSTOM_HID_ReportDesc_FS. (This was my final hurdle).I used 

    Badreddine Bouzouita's descriptor.

  2. CubeMX v4.2.1.0 does not generate the exact same files as used by Badreddine Bouzouita in his youtube and source example. Doing a compare on usbd_custom_hid_if.c is critical. Especially references to hUsbDevice_0.
  3. For working NUCLEO-STM32429zi CubeMX code, I need to check 'Initialize all peripherals with their default mode'. If I do not do this I end up with several 'unsolvable' clock configuration errors when I enable USB OTG FS.
  4. That said, to keep the board from hanging up on bootup I need to comment out MX_ETH_Init(); inside of main() in main.c. I need to research how to disable the ethernet in CubeMX before generating the code. 

Again, thanks to everyone over the years that have contributed to the forum archives. I searched them exhaustively and the solution was gleamed from them.

fyi. Does a method exist to post a zip of the basic project shell to provide others a way to comment and maybe use as a starting point?

Posted on June 05, 2017 at 16:23

Hello

Flanagan.Kevin

,

Thank you for your feedback and contribution to shareyour knowledge with community member.

https://community.st.com/community/share-your-activities/blog/2016/12/04/how-to-share-your-activities-with-the-community

You can share your project in the community by clicking onBrowse >> Share >> Share your project (in the right)

0690X00000607FHQAY.png

Regards

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on June 05, 2017 at 17:28

Imen,

Thanks for the documentation on how to share. I have shared a .zip of the project with the community. 

https://community.st.com/0D50X00009bMM5YSAW

 

Thanks again,

-Kevin

Posted on June 05, 2017 at 23:24

Hi

Flanagan.Kevin

,

The document is not available!

You should publish it so that it will be visible to the community.

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen
Posted on June 05, 2017 at 23:36

Aaah, just looked and it is waiting for moderation approval. I should have waited for the moderation before posting the above.

My Bad

-Kevin

Posted on June 07, 2017 at 18:40

The project has now been approved, so the link should now work. 

I logged out and opened it in an Incognito window to verify it.