STMicroelectronics / x-cube-azrtos-h7

X-CUBE-AZRTOS-H7 (Azure RTOS Software Expansion for STM32Cube) provides a full integration of Microsoft Azure RTOS in the STM32Cube environment for the STM32H7 series of microcontrollers.
https://www.st.com/en/embedded-software/x-cube-azrtos-h7.html
Other
149 stars 56 forks source link

STM32 F1 USBX usage problems #7

Closed arilink-tech closed 3 years ago

arilink-tech commented 3 years ago
  1. I first refer to the x-cube-azrtos-h7 example on STM32 H7 to migrate ThreadX and USBX. CDC HID, including the combination of the two, have been tested, and they all work normally.
    1. Then I ported ThreadX and USBX on STM32 F105RBT6. Currently, they can enumerate and work normally, but there are still some problems. The specific problems are as follows: On F105RBT6, USBX has problems with the data processing (OUT) sent by the host. The specific manifestation is HAL_PCDEx_SetRxFiFo(&hpcd_USB_OTG_FS, 0x200) when the USB is initialized; the RX FIFO is 512 bytes. When the host sends more than 512 data to the STM32 through VCOM After the byte, VCOM will stop working. The same situation also occurs on HID devices. When the data received by app_usbx_device_thread_hid_callback() exceeds 512 bytes, it will also stop working. The same code will not have problems on H7. My guess is that USBX did not correctly read data from the RX FIFO on the STM32 F105, which caused the RX FIFO to overflow and freeze, but I don’t know how to fix it. Can you provide some information?