I know that this topic was already created here:
http://e2e.ti.com/support/dsp/c5000/f/109/t/243837
But since that time I don't see any workaround to improve the performance in "CSL_USB_MSC_dmaExample". I got pretty similar results for performance.
I'm using sd card that has 20MB/s and 8MB/s for read and write. But with eZdsp5535 TI HW and "CSL_USB_MSC_dmaExample" project (with turned on "CSL_MMCSD_MULTISECT_TXFER" improvement) I have about 1.3MB/s for read and 1.0MB/s for write.
In the post mentioned above Ming explained that they could achieve about 10MB/s on read in the past. And he said that he could share this project but he didn't.
The similar statement I found here:
http://processors.wiki.ti.com/index.php/C5000_Chip_Support_Library
Here is a quote:
For a 100Mhz CPU, with 50mhz SD clock, with class 4 and class 4 cards, we typically see performance in the 3 to 5Mbps range (CSL version 2.50). To improve performance, consider using raw read/write modes. You may also want to look at modifying the FAT updates to cache the writes to improve performance. In doing such changes, it may be possible to achieve 10Mbps.
I believe they meant not Mbps but MBps. In this case it should have improved the performance in "CSL_USB_MSC_dmaExample" because "write ahead" was implemented there.
1. The first question concerning to the post: why they refused the improved scheme to submit 8kB and kept 512 CDMA transfers? And it looks like they admitted drop of performance with current implementation.
2. The second question. If they tried to improve performance, why they didn't try to use data pipeline? I mean to perform USB read and SD write simultaneously and vice versa, SD read and USB write. It should greatly improve the performance. Actually I tried it and it didn't work. CDMA and SD DMA works fine separately but together they stop working. I saw two case: when SD DMA is working and I'm starting the CDMA operation CDMA stops working after awhile. For example if I had 16 transfer 512 bytes length for CDMA while SD DMA in progress I saw that after 13th transfer it stopped working and there where no interrupts on CDMA. It was a hang in CompleteTransfer() loop. In the second case when CDMA was working and and I started SD DMA operation I saw that both CDMA and SD DMA stopped working.
3. The third question. Assume that we have achieved the performance 10MB/s like it was suggested in the post above and in "wiki" page. Where is a bottleneck? Having SD bus 50MHz we can get about 20MB/s (at least I saw that C5535 reads 32KB block from SD in 1.7-2.1 ms), with USB HS we can get 30MB/s and higher performance. Why 10MB/s was your threshold?
I made the following experiment: I commented out SD Write call in AppWriteMedia() function:
/* mediaError = MMC_writeNSectors(ATALogicalUnit[lunNo].pAtaMediaState,(AtaUint16*)srcptr, LBA, 1); */ mediaError = ATA_ERROR_NONE;
And I checked the speed of write with fictive SD operation. I got 10MB/s!
Analyzing the USB traffic I see that most of 512 bytes USB transaction takes about 30-40 us. Quite rare - 10 us. Using a few cardreaders that I have I see 10 us for the most USB transactions.
So it looks like USB is a bottleleck.
The maximum performance that I could achieve for eZdsp5535 was 4MB/s on write and 7MB/s on read.
Any hope to consider C5535 as a candidate for Low-power cardreader?
Thanks,
Denis