This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

LCDKC6748: write performance on usb pendrive

Hi all,

I'm working on LCDKC6748 and I need to save some log files on a pendrive. The pendrive is connected on the USB OTG port.

My log files are about 30/40 Mbytes, and a lot of time (about 4 minutes) are needed to save them.

Write performance are about 145 KB/s.

I'm using starterware 1.20.04.01.

Do you have any suggestion to speed up the writing process?

Thank you for your help.

Regards,

Paolo

  • Hi,
    Please make sure that DMA support has been enabled in code.
    How did you save the log files in USB, any command or code etc., ?
  • Hi,

    in my project I use the library usblib.lib, available in starterware 1.20.04.01.

    The project related to this library is usblib_c674x_c6748 and it has a predefine symbol DMA_MODE.

    Also my project uses the predefined symbol DMA_MODE.

    To save my log file, I send a command to LCDK via serial port.

    Regards,
    Paolo
  • Hi,
    Thanks for confirming that you have enabled DMA mode.

    To save my log file, I send a command to LCDK via serial port.

    Which command did you send and how ?
    So that I can also reproduce the problem.
  • Hi Titus,

    thank you for your quick reply.

    I wrote a serial protocol to communicate between PC and LCDK. But, in the end, to save the log file I call the f_write() routine in the fat file system available in the Starterware.
    So, In my project I included the fat file system (source code is in C6748_StarterWare_1_20_04_01\third_party\fatfs\src) and fat_usbmsc.c (available in C6748_StarterWare_1_20_04_01\third_party\fatfs\port).
    To mount the pendrive I use the code available in usb_host_msc.c; this file is in C6748_StarterWare_1_20_04_01\examples\lcdkC6748\usb_host_msc.
    The easiest way to reproduce the problem is to work in debug mode, create a buffer in memory and call f_write() to save the file on the pendrive. writing in steps of 512 bytes.

    Regards,
    Paolo
  • No one nave some suggestions? I'm not familiar with USB driver, so it's very difficult for me understand which parte try to modify.
    Thanks in advance,
    Paolo