emUSBH + emFS + emOS - low speed in USBH (MSD)

This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

  • emUSBH + emFS + emOS - low speed in USBH (MSD)

    Hello!
    I downloaded
    Segger Eval Software (emFile, emWin, embOS/IP, embOS, emUSB-Device, emUSB-Host) for Keil MDK (tested with V4.50), install and run examples. I need use emUSBH + emFS + emOS for read and write some information on USB Stick (Mass Storage Device). I runed example OS_USBH_MSD.c and tested functionality this library. Test board KEIL MCB1700(LPC176).

    I don't know why, when I write some text information in file TestFile.txt on USB stick it takes a lot time (about 7 seconds for 100 rows - 3kbyte).

    Example code

    Source Code

    1. static void _CreateFile(const char * sPath) {
    2. FS_FILE * pFile;
    3. char ac[40];
    4. sprintf(&ac[0], "%s\\TestFile.txt", sPath);
    5. printf("\nCreating file %s...", ac);
    6. pFile = FS_FOpen(&ac[0], "w");
    7. if (pFile) {
    8. sprintf(ac, "1-2-3-4-5-6-7-8-9-0\r\n");
    9. for (i=0;i<100;i++) {
    10. FS_Write(pFile, ac, strlen(ac));
    11. }
    12. FS_FClose(pFile);
    13. printf("Ok\n");
    14. } else {
    15. printf("Failed. Could not create file\n");
    16. }
    17. }
    Display All




    I think it must be more fast than 7 seconds. How set high speed? What i do incorrect?
  • speed write in file with USBH + embOS + emFS

    Hello!



    I found in documentation function FS_SetFileWriteMode(FS_WRITEMODE_FAST). With this function write in file is faster then without this function (about 4 sec = 1Mb). But it also not fast. In documentation write that speed must be about 800kb/sec (32 - bit CPU running 72MHz). But I have only 256 kbyte/sec whith CPU lpc1768 100MHz.

    What can I do for send by USB in high speed? What settings I need set in embOS or USBH or emFS?

    Help, please.

    Thanks!