Pages: [1]   Go Down
Author Topic: arduino/maple SPI/SD performance  (Read 1072 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Jr. Member
**
Karma: 9
Posts: 80
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

ran some simple 1000-byte unconnected SPI performance tests on both Arduino and Maple (plus DMA), and then tested Arduino SD/RTC shield block read/write performance.  SD read/write uses readBlock()/writeBlock() (512 byte blocks). summary below.  your mileage may vary  smiley

Code:
unconnected SPI performance (transfer 1000 bytes)

             maple spi       maple spi/dma
SPI clock   read/write         read/write
1.125MHz     .85mbs               1.125mbs
2.25MHz     1.35mbs               2.25mbs
4.5MHz      1.8mbs                4.5mbs
9MHz        2.2mbs                8.9mbs
18MHz       2.2mbs               17.8mbs


  SD/SPI block (512 bytes) read/write Arduino SD/RTC shield

             maple spi        maple spi/dma
SPI clock   read    write     read      write
1.125MHz    0.75mbs 0.64mbs    1mbs     0.84mbs
2.25MHz     1.1mbs  0.91mbs    1.86mbs  1.36mbs
4.5MHz      1.4mbs  1.2mbs     3.19mbs  2.0mbs
9MHz        1.6mbs  1.25mbs    5.1mbs   2.6mbs
18MHz       1.6mbs  1.3mbs     7.1mbs   3.06mbs



                    arduino  avr328/16MHz
               SPI         SD (with OPTIMIZE_HARDWARE_SPI)
SPI clock   read/write     read    write
2MHz          1.57mbs      1.4mbs  1.2mbs
4MHz          2.6 mbs      2.3mbs  1.7mbs
8MHz          3.8mbs       3.4mbs  2.1mbs

Logged

North Queensland, Australia
Offline Offline
Edison Member
*
Karma: 76
Posts: 2247
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I've been looking at getting an Olimex version of the maple, but I will wait a little longer for the DUE seeing as it has had some recent action.

Back on topic: I notice you have the 16Mhz avr328 running SPI @ 8MHz gives 3.8mbs for R/W, do you know why the maple has a throughput of only 2.2mbs @ 18Mhz. I can see the speed-up of using DMA, just 2.2mbs seems slow considering the maple clock is 4.5 times faster than arduino's
Logged


nr Bundaberg, Australia
Offline Offline
Tesla Member
***
Karma: 130
Posts: 8620
Scattered showers my arse -- Noah, 2348BC.
View Profile
WWW
 Bigger Bigger  Smaller Smaller  Reset Reset

I was thinking that the interface is largely IO bound so the difference in CPU speed is less important.

But DMA/non-DMA figures indicate that it is not IO bound because removing the processor overhead makes a huge difference.

______
Rob
Logged

Rob Gray aka the GRAYnomad www.robgray.com

Pages: [1]   Go Up
Jump to: