Regarding SD card write speed

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Regarding SD card write speed

3,655 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Ajay Thallapalli on Tue Apr 14 03:06:25 MST 2015
Hi,

I am using NGX-NXP LPC4330 board for my project. I am using SD card for read and write operation, but even though LPC4330 having higher clock rates and Dual core writing speed is very slow I don't know why it happens almost the writing speed is 0.8MB/S.

Can any one help me why it is too slow and what I will do if  I want to increase speed?
0 Kudos
Reply
3 Replies

3,441 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by emh203 on Sat Apr 25 12:21:09 MST 2015


You *MUST*  write in very large chunks to get anywhere near advertised performance speeds.    Most SD cards has a 32k or 64k erase sector size.   This means you should be writting that much data at a time to maximize performance.

Also,    my applications is USB0 as a mass storage class interface to the SD card.     The only way I could get reasonable write speeds was to implement a write cache.   You cannot write in 64 or 512byte chunks.

Since my application required a great deal of memory,  I found that a 4KByte write cache was a decent tradeoff between performance and memory usage.
0 Kudos
Reply

3,441 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by bavarian on Thu Apr 16 04:50:48 MST 2015
The LPCOpen 1.03 based example for the LPC4330 Xplorer board can be found here:

http://www.lpcware.com/content/project/Dual-USB-Host-Device-solution

We have modified this example to improve the read/write speed of the SD card.

These are the changes:
[list]
  [*]  Identification and enabling of the high speed mode capabilities of an SD card. This was simply not implemented in the example.
  [*]  Fixed a bug in the calculation of the divider for the SDIO clock output
  [*]  Increased the I/O buffer size from 4kbytes to 16kbyte. Depending on the available SRAM memory, this could be even set to 32kbyte)
[/list]

Raw througput tests are promising:   SDIO clock = 51MHz, CPU frequency = 204MHz

Sandisk Ultra 32 GiB, Class 10 UHS-1
Unbranded Noname 32 GiB, Class 10

Read speed for a 544 MiB file:
Sandisk:  18.0 MiB/s
Noname:  14.5 MiB/s

Write speed for a 476 MiB file:
Sandisk:  8.76 MiB/s
Noname:  8.44 MiB/s


When you have a software which is realizing a mass storage device, then you can use this tool:

http://www.chip.de/downloads/ATTO-Disk-Benchmark_41802004.html


On top of the raw throughput there comes some delay for USB handling and for the file system activities, but in principle the results for mass storage on SD card are in the same region as for the raw throughput.

Regards,
NXP Support Team.
0 Kudos
Reply

3,441 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by cfb on Tue Apr 14 15:22:09 MST 2015
Download a copy of the NXP Application Note AN11070 - "Accessing SDC/MMC card using SPI/SSP on LPC1700". If you follow the instructions there you could expect to get write speeds up to about 900 kB / sec.
0 Kudos
Reply