cancel
Showing results for 
Search instead for 
Did you mean: 

Bug Report - USB - STM32F446 / STM32CubeMX

johan239955
Associate II
Posted on December 22, 2017 at 14:44

Dear ST,

First is there any publicly available Bug report site?

Found with SMT32CubeMX Version 4.23.0

and using the latest firmware package for stm32f4 (1.18.0)

USB Custom HID Device:

  1. STM32CubeMX Parameter Setting: USBD_SUPPORT_USER_STRING is always enable and can not be disabled
  2. USBD_SUPPORT_USER_STRING does not enable the function:

    uint8_t *     USBD_FS_USRStringDesc (USBD_SpeedTypeDef speed, uint8_t idx , uint16_t *length); 

    as its preprocessor check, checks on  USB_SUPPORT_USER_STRING_DESC
  3. uint8_t *     USBD_FS_USRStringDesc (USBD_SpeedTypeDef speed, uint8_t idx , uint16_t *length); 

    is not added to the USBD_DescriptorsTypeDef when USBD_SUPPORT_USER_STRING is enabled.

    resulting in a INVSTATE Usagefault when the device is connected to a pc for the first time where the PID / VID combination is unknown.
  4. uint8_t *     USBD_FS_USRStringDesc (USBD_SpeedTypeDef speed, uint8_t idx , uint16_t *length); is only a prototype and no function is generated
  5. No code available for the User String Descriptor in the usbd_desc.c
  6. in usbd_customhid.h:
    1. CUSTOM_HID_EPIN_SIZE is always set to 0x02 on STM32CubeMX generation and can not be configured. the STM32CubeMX USB Class Parameter: USBD_CUSTOMHID_OUTREPORT_BUF_SIZE isn't used
    2. CUSTOM_HID_EPOUT_SIZE is always set to 0x02 on STM32CubeMX generation and can not be configured. the STM32CubeMX USB Class Parameter: USBD_CUSTOMHID_OUTREPORT_BUF_SIZE isn't used
    3. USB_CUSTOM_HID_DESC_SIZ is always set to 0x09 on STM32CubeMX generation. the STM32CubeMX USB Class Parameter: USBD_CUSTOM_HID_REPORT_DESC_SIZE isn't used.
  7. Polling interval of the USBD_CUSTOM_HID_CfgDesc can not be configured in STM32CubeMX and are resetted to default every STM32CubeMX generation.
    1. Note the comments say its 20 ms polling interval. where in fact it is 32 ms. (value = 0x20)

#bugs #stm32-f4 #bug-report #stm32-stm32cube #stmcubemx-bug-report ##usb #custom-usb-hid-device #custom-hid #custom-usb-hid
5 REPLIES 5
Amel NASRI
ST Employee
Posted on January 25, 2018 at 14:33

Hi

Zwarteveld.Johan

‌,

First is there any publicly available Bug report site?

The forum is the public site that you may use to report issues or comments you have. Community members and ST moderators will answer you whenever it is possible.

He mycomments about what you reported (valid for thecurrent version 4.24 of STM32CubeMX):

1-5. In USB Custom HID, User string descriptor isn't supported. SoUSBD_SUPPORT_USER_STRING has to be disabled in CubeMX interface (for all USB classes except DFU).

6. Some updates have to be applied in bothusbd_customhid.h and CubeMX interface in order to make it possible to configureCUSTOM_HID_EPIN_SIZE,CUSTOM_HID_EPOUT_SIZE andUSB_CUSTOM_HID_DESC_SIZE.

7. It will be possible to configureUSBD_CUSTOM_HID_CfgDesc when the version 2.5.0 ofSTM32_USB_Device_Library will be deployed in STM32Cube packages.

I report the comments 1-6 internally to be considered in coming version of both STM32CubeMX and STM32Cube packages.

-Amel

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

Posted on February 02, 2018 at 02:55

Amel N wrote:

First is there any publicly available Bug report site?

The forum is the public site that you may use to report issues or comments you have. Community members and ST moderators will answer you whenever it is possible.

Hi Amel,

I have encountered the same sorts of issues as Johan described above. It would be great to have some fixes to the CustomHID code. I also have some suggestions for improving it to better suit real-world applications. I will post separately on this topic.

I'd like to enthusiastically second the idea of having a dedicated public issues database in addition to the forum, which is best suited to discussion. I believe it would help both the community and ST greatly, having a central place to report, find and track issues.

Thanks,

  :: Gavin

Houda GHABRI
ST Employee
Posted on June 01, 2018 at 12:31

Hi

Zwarteveld.Johan

‌,

This issue will be solved in a future cubeMX release but unfortunately I don't have the exactdelivery date for the moment.

I will keep you informed for the updates.

regards,

Houda

Daniel Squires
Associate II

CUSTOM_HID_EPOUT_SIZE always 0x02 after generate code, and have to amend after.. very frustrating any news on when this might be resolved?

Pavel A.
Evangelist III

Their HID code is not a complete library or "SDK". The Cube templates are based on few limited examples. Anyway you will have to add a lot of customization.

-- pa