This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Suspended state with RTX + RL_FFS + RL_USB (HID+MSC)

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

Parents
  • Hi,

    Some additional informations on this:

    I made several attempt to slice the code, in order to isolate the problem.

    Even with no HID activated or with no other tasks (spi communications with several other chips, GUI...), there is no improvement.

    I've tried with several OS (win 7, 8, 8.1, 10...), no improvement either.

    What can be the cause of that ? What other tests can I carry out to understand what's going on?

    Thank you,

    Regards

Reply
  • Hi,

    Some additional informations on this:

    I made several attempt to slice the code, in order to isolate the problem.

    Even with no HID activated or with no other tasks (spi communications with several other chips, GUI...), there is no improvement.

    I've tried with several OS (win 7, 8, 8.1, 10...), no improvement either.

    What can be the cause of that ? What other tests can I carry out to understand what's going on?

    Thank you,

    Regards

Children