cancel
Showing results for 
Search instead for 
Did you mean: 

USB Full Speed MSC using uSD (SMMC2) and FatFs took so long to enumerate

Jtron.11
Senior

I am using STM32F722ZE MCU. I am successfully implemented micro SD FATFS USB Full Speed MSC.

The problem is every time I plug the board to PC, it took so long, up to 40 seconds, for the USB enumeration to be completed.

Can anyone help me to point out for me there is something that I missed or any way to speed it up?

I used the same board and create USB Full Speed MSC using MCU's RAM and the USB enumeration happened as soon as I plugged the USB in the PC host.

15 REPLIES 15
Jtron.11
Senior

Thank you. I will give it a try and let you know

Jtron.11
Senior

Walid,

Just a side question, do you know if STM32H7 is able to support the USB's hub when I configure STM32 it to USB Host?

Jtron.11
Senior

Hi Walid,

Unfortunately, changing the sise of the MSC_MEDIA_PACKET won't work, I think the 512 bytes is coupling with uSD's sector size. This is just my guess. I don't know if that is correct. So I dial down from 8*1024 till 512 and only 512 for MSC_MEDIA_PACKET is working.

Instead of uSD, I used RAM to be the storage and I don't see this delay USB enumeration. Is the problem laying with SDMMC communications?

Hello @Jtron.1​ ,

MSC_MEDIA_PACKET is used to adjust the MSC class Data buffer this is not coupled with uSD sector size at all.

If you use dynamic allocation, you have to adjust the heap size.

Since the RAM size is too small, it is normal to have zero latency! Even in FS mode.

BeST Regards,

Walid

Jtron.11
Senior

Hello @Walid ZRELLI​ ,

Thank you for additional info. What would I should do next for trouble shoot this issue? You now have exactly source code, could you please, if it is possible, using my source code and run on the eval and external uS module.

This is the external uSD module that I am using https://www.adafruit.com/product/4682

Thank you for your helps.

Jtron.11
Senior

Hello@Walid

May I ask if you have any chance to run my code to see the problem?