eclipse-threadx / usbx

Eclipse ThreadX - USBX is a high-performance USB host, device, and on-the-go (OTG) embedded stack, that is fully integrated with Eclipse ThreadX RTOS
https://github.com/eclipse-threadx/rtos-docs/blob/main/rtos-docs/usbx/index.md
MIT License
146 stars 87 forks source link

U disk cannot create files in USB host mode #153

Closed 111llll111 closed 2 months ago

111llll111 commented 4 months ago

Hi,

Development board: STM32u5a9j-dk Code: en.stm32cubeu5-v1-4-0\STM32Cube_FW_U5_V1.4.0\Projects\STM32U5x9J-DK\Applications\USBX\Ux_Host_HUB_HID_MSC\STM32CubeIDE

issue: Two Kingston U disk, U disk format is FAT32, connected to the computer can read and write normally, connected to the MCU can be normally enumerate and identify, when "App_File_Create", one of them can normally create files and read and write, but the other one fails to create. Trace found that in the _fx_file_create function if (media_ptr -> fx_media_id ! = FX_MEDIA_ID) returns the error code return(FX_MEDIA_NOT_OPEN); , add print media_ptr -> fx_media_id has a value of 0 .

Can you help to analyze what is the reason?

Thanks!

rahmanih commented 2 months ago

Hi @111llll111, could you please fill this under STM32CubeU5 repo. Would you please also provide more details and data logs.

Closing this item as not really related to USBX.