At 02:29 PM 11/27/2005, Bertrik Sikken wrote: >Your were right about the optimisations and the throughput >limitations. > >First of all, I realised thath the results above were obtained >with code compiled for thumb, so I changed that to arm. > >Also I added a dummy write test, which basically just writes >4 million bytes of value 0xFF (a NOP command for the card). >The theoretical transfer time for sending it over a 7.5 MHz >SPI link is just 4.5 sec. However, this took 11 seconds. >It turns out that the code I was using, calls a subroutine for >every byte transfered. This subroutine selects the SPI slave >and transfers just one byte over SPI, then deselects. >I changed this to do the SPI slave (de)select only once for each >block and then transfer a block without calling any subroutines. > >Finally, I tried a different memory card: an "A-DATA SD 60x 256". >This card claims 7 MB/s write speed. In my card reader, I got >3.3 MB/sec. > >My results are now (seconds per 4 MB transfered): > A-Data Kingston >dummy 6 6 >read 8 8 >write single 9 10 >write multi 7 8 Well, you're up to 680KB/sec for the A-Data dummy mode, whereas your computer gets 825KB/sec. I'm assuming that the 3.3MB/sec is operating in SD 4-bit mode, so assuming scaling down to 1-bit mode is 1/4 the speed. If the theoretical max is 4.5 sec and you're getting 6, that's not too bad. If it was heavily assembler optimized you could probably squeeze out 20-30% more speed to be at the max, but really those speeds aren't bad. >The dummy write time is still a bit above the theoretical maximum, >but it is a large improvement over the original 11 seconds. > >My conclusions so far: >* multiple block write is indeed faster than single block write >* but not by much, because most of the time is spent in SPI0 transfer >* SPI0 transfer is a bit disappointing because of the 7.5 MHz max speed. Have you considered trying to use the SSP bus instead of SPI? I think the SSP bus can operate much faster than PCLK/8, no? -- Sean
Message
Re: [lpc2000] Re: MMC filesystem speed
2005-11-28 by Sean
Attachments
- No local attachments were found for this message.