2021-10-04 11:16 PM
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.
2021-10-19 03:06 AM
Hello @Jtron.1 ,
Can you try using another wire and let me know if that solves your problem?
Thanks in advance.
BeST Regards,
Walid
2021-10-19 07:52 AM
Walid,
Thank you for your reply. "Another wire" meaning another USB cable? I tried different cables and the behavior is the same. The behavior is already coming from the first day when I tried the Evaluation board to connect to the external uSD. I thought the problem from the cables wiring from Nucleo eval to external uSD module. But when I have my PCBA done, the issue is still exist.
2021-10-19 08:44 AM
Hello @Jtron.1
Could you please provide your project so that we can reproduce your issue?
Thanks in advance.
BeST Regards,
Walid
2021-10-19 08:59 AM
Could you please tell me how can I send you the message privately?
2021-10-21 11:46 AM
Walid,
Can you please let me know if you are able to see the issue from my sent code to you?
Do you have any update for the problem?
2021-10-22 08:48 AM
Hello @Jtron.1
Your issue is under investigation. I will keep you updated as soon as possible.
BeST Regards,
Walid
2021-10-25 02:08 AM
Hello @Jtron.1
Can you please provide the size and the model of µSD used?
BeST Regards,
Walid
2021-10-25 09:15 AM
I have been testing with Kingston 8GB Micro SD, N0538-004 A00LF.
The capacity of the uSD is always correct and read/write to the uSD has no issue.
The only problem is it took very long time for USB to enumerate.
2021-10-25 09:33 AM
Hello @Jtron.1
Improving the USB performance may solve your issue. Setting MSC_MEDIA_PACKET to 8 * 1024U instead of 512U should help:
#define MSC_MEDIA_PACKET 512U -> (8 *1024U)
Heavy read/write operations can also cause latencies. The application is in FS mode (max data rate around 900 KB/s) and FS checks could issue read request to FAT sectors that coincide with the enumeration windows. In this case, latencies are to be expect and enumeration may not work at the first try.
Your feedback on these modifications would be appreciated. Would you please test the above modification and report your results back?
BeST Regards,
Walid