Question
Bug Report - USB - STM32F446 / STM32CubeMX
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:
- STM32CubeMX Parameter Setting: USBD_SUPPORT_USER_STRING is always enable and can not be disabled
- 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
- 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.
- uint8_t * USBD_FS_USRStringDesc (USBD_SpeedTypeDef speed, uint8_t idx , uint16_t *length); is only a prototype and no function is generated
- No code available for the User String Descriptor in the usbd_desc.c
- in usbd_customhid.h:
- 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
- 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
- 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.
- Polling interval of the USBD_CUSTOM_HID_CfgDesc can not be configured in STM32CubeMX and are resetted to default every STM32CubeMX generation.
- Note the comments say its 20 ms polling interval. where in fact it is 32 ms. (value = 0x20)