Hi,
I’m working on a device which has an STM32F407, a USB connector (not OTG) and an SD card. I want to have both HID (for communication with a PC software) and MSC (to retrieve the data recorded on the SD card through USB).
I use Keil v4.60, RTX, RL_FFS and RL_USB.
My problem is that as soon as I have a few Mb on the 4Gb cards, copying files from SD card to PC becomes very difficult and takes forever. The copy works for 1-2 seconds at 60kB/sec, then the copy is suspended for about 1 minute, reworks for 1-2 seconds, and pauses again, etc... Even mounting the disk sometimes takes minutes to appear on the PC when it doesn’t simply returns a “unknown USB device” warning.
Stopping code execution while the USB is in this suspended state, the STM32 is peacefully in os_idle_task. I’ve tried to adjust the threads priorities, suspecting some kind of deadlock, but didn’t succeed to find a combination that works correctly.
Main task priority is 100, USB task priority is 10. There are 5 other USB tasks that seems to be generated by the RL_USB lib but I have no information on them.
Is it some known problem? Are there recommendations for threads priority that I am not compliant with?
Thank you for your help,
Regards
Contact Keil support and do not forget to attach your project
Thank you for your suggestion, I'll give it a try.