Azure USBX does not work properly on STM32F105

arilink 101 Reputation points
2021-08-04T01:28:06.683+00:00

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.
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:

1: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.
2: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?

Azure RTOS
Azure RTOS
An Azure embedded development suite including a small but powerful operating system for resource-constrained devices.
341 questions
{count} votes

Accepted answer
  1. arilink 101 Reputation points
    2021-08-09T06:05:21.143+00:00

    Yes, I am the arilink on github

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. arilink 101 Reputation points
    2021-08-09T06:06:15.133+00:00

    Thank you very much for your help. ThreadX and USBX are really good to use, but the corresponding technical support is relatively small, and problems are difficult to solve.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.