2024-08-14 08:32 PM - edited 2024-08-14 08:38 PM
Hi there,
I am using STM32F429BIT6 and want to show the SDcard(connect with MCU by SDIO) as a Udisk on PC.
I can normally read/write the SD card by MCU with FATFS.
But after I added the USB config in CubeMx, the code is something wrong.
My CubeMX config is as follows:
As we can see, I enabled the USB log, but nothing output.
After debugging, I found the MCU is blocked in the while loop in USBD_GetEpDesc().
I don't know what that means, please help me. Thank you!
Solved! Go to Solution.
2024-08-22 02:35 AM
Hi @FBL
Thanks for your reply.
Finally I know the reason of mine project.
I am compiler the project with MDK compiler V6, this is NOT work for USB_DEVICE source code,
after I change to MDK compiler V5, everything is work well.
2024-08-21 03:21 AM
Hi @Junde
The issue with USBD_GetEpDesc() might be due to incorrect endpoint configuration. Would you share your endpoint descriptor config? Could you share a minimum project to reproduce? USBD_MAX_STR_DESC_SIZ should be adjusted to accommodate the longest string descriptor you plan to use. A typical value might be 256 bytes to ensure USB stack can handle the string descriptors without buffer overflows. Also, it seems FH_mount(&sDisk[0]) is your custom initialization.
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.
2024-08-22 02:35 AM
Hi @FBL
Thanks for your reply.
Finally I know the reason of mine project.
I am compiler the project with MDK compiler V6, this is NOT work for USB_DEVICE source code,
after I change to MDK compiler V5, everything is work well.