element14 Community
element14 Community
    Register Log In
  • Site
  • Search
  • Log In Register
  • Members
    Members
    • Benefits of Membership
    • Achievement Levels
    • Members Area
    • Personal Blogs
    • Feedback and Support
    • What's New on element14
  • Learn
    Learn
    • Learning Center
    • eBooks
    • STEM Academy
    • Webinars, Training and Events
    • Learning Groups
  • Technologies
    Technologies
    • 3D Printing
    • FPGA
    • Industrial Automation
    • Internet of Things
    • Power & Energy
    • Sensors
    • Technology Groups
  • Challenges & Projects
    Challenges & Projects
    • Design Challenges
    • element14 presents
    • Project14
    • Arduino Projects
    • Raspberry Pi Projects
    • Project Groups
  • Products
    Products
    • Arduino
    • Dev Tools
    • Manufacturers
    • Raspberry Pi
    • RoadTests & Reviews
    • Avnet Boards Community
    • Product Groups
  • Store
    Store
    • Visit Your Store
    • Choose Another Store
      • Europe
      •  Austria (German)
      •  Belgium (Dutch, French)
      •  Bulgaria (Bulgarian)
      •  Czech Republic (Czech)
      •  Denmark (Danish)
      •  Estonia (Estonian)
      •  Finland (Finnish)
      •  France (French)
      •  Germany (German)
      •  Hungary (Hungarian)
      •  Ireland
      •  Israel
      •  Italy (Italian)
      •  Latvia (Latvian)
      •  
      •  Lithuania (Lithuanian)
      •  Netherlands (Dutch)
      •  Norway (Norwegian)
      •  Poland (Polish)
      •  Portugal (Portuguese)
      •  Romania (Romanian)
      •  Russia (Russian)
      •  Slovakia (Slovak)
      •  Slovenia (Slovenian)
      •  Spain (Spanish)
      •  Sweden (Swedish)
      •  Switzerland(German, French)
      •  Turkey (Turkish)
      •  United Kingdom
      • Asia Pacific
      •  Australia
      •  China
      •  Hong Kong
      •  India
      •  Korea (Korean)
      •  Malaysia
      •  New Zealand
      •  Philippines
      •  Singapore
      •  Taiwan
      •  Thailand (Thai)
      • Americas
      •  Brazil (Portuguese)
      •  Canada
      •  Mexico (Spanish)
      •  United States
      Can't find the country/region you're looking for? Visit our export site or find a local distributor.
  • Translate
  • Profile
Raspberry Pi
  • Products
  • More
Raspberry Pi
Blog RP2040 SD Card SPI Benchmark Revisited
  • Blog
  • Forum
  • Documents
  • Events
  • Members
  • Mentions
  • Sub-Groups
  • Tags
  • More
  • Cancel
  • New
Raspberry Pi requires membership for participation - click to join
Blog Post Actions
  • Subscribe by email
  • More
  • Cancel
  • Share
  • Subscribe by email
  • More
  • Cancel
Group Actions
  • Group RSS
  • More
  • Cancel
Engagement
  • Author Author: ralphjy
  • Date Created: 26 Mar 2022 10:13 PM Date Created
  • Views 1159 views
  • Likes 7 likes
  • Comments 2 comments
Related
Recommended
  • sparkfun_rp2040_mikroBUS_dev_board
  • spi
  • sd_card
  • rp2040
  • xiao_rp2040

RP2040 SD Card SPI Benchmark Revisited

ralphjy
ralphjy
26 Mar 2022

For Pi Day, I tried benchmarking the SD card interface on a new SparkFun RP2040 mikroBUS Development Board that I had just gotten - RP2040 SD Card SPI Benchmark.

I was somewhat disappointed in the results - around 140KB/Sec Write and Read.

LeScherd commented that he had been able to achieve around 2MB/Sec using a Pi Pico with a hand wired interface to an SD card socket.  I had used the benchmark example that was included with the SDFat library and he had used a somewhat customized program that tweaked the SPI clock frequency and the processor voltage.  He gave me a copy to try and while my results improved, they were still far short of his.  With this program I got around 250KB/Sec.

Of course there are quite a few variables in play.  I am using a SanDisk Ultra 16GB SD card and he is using a SanDisk Extreme Plus 32GB.  I would not have expected my card to be the limiting factor and he also got over 1.5MB/Sec using a ONN (Walmart brand) 32GB card.

The boards are certainly different - The SparkFun board uses SPI1 for the SD card and Bill used SPI0 in his setup.  Maybe I need some extra configuration?

I realized that I have another SD card setup, a Xiao expansion board, and I also happen to have a Xiao RP2040 that I haven't tried.  I checked the schematic and the expansion board uses SPI0 for the SD card.

So, time for some experiments...

Here's the expansion board setup.

image

And the results.  I included a standard Xiao (SamD21 - M0) on the same expansion board for reference.

Board Processor Bench Test  SPI interface Write KB/s  Read KB/s SD Card
Pi Pico RP2040 Modified 0 2010 2100 Sandisk Extreme Plus 32GB
Sparkfun MikroBus RP2040 Stock 1 143 143 SanDisk Ultra 16GB
Sparkfun MikroBus RP2040 Modified 1 255 255 SanDisk Ultra 16GB
Xiao + Expansion SamD21 Stock 0 369 355 SanDisk Ultra 16GB
Xiao RP2040 + Expansion RP2040 Stock 0 476 479 SanDisk Ultra 16GB
Xiao RP2040 + Expansion RP2040 Modified 0 769 768 SanDisk Ultra 16GB

I guess it just shows me that if it really mattered, I should test the SD card speeds in a specific configuration.  I should probably try some other SD cards in my RP2040 configurations (I don't have an Extreme Plus).  Maybe I should try to wire an SD socket to a Pico and see if I can reproduce Bill's results Relaxed.

  • Sign in to reply
  • mp2100
    mp2100 over 1 year ago

    You really have to read the spec sheets, with all the marketing names, you can't figure out the speed.  Ultra is slower than Extreme Plus?  How fast is Extreme?  Crazy.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
  • DAB
    DAB over 1 year ago

    An interesting range of values for a simple IO device.

    Clearly you need to test and verify SD card performance for you application.

    • Cancel
    • Vote Up 0 Vote Down
    • Sign in to reply
    • More
    • Cancel
element14 Community

element14 is the first online community specifically for engineers. Connect with your peers and get expert answers to your questions.

  • Members
  • Learn
  • Technologies
  • Challenges & Projects
  • Products
  • Store
  • About Us
  • Feedback & Support
  • FAQs
  • Terms of Use
  • Privacy Policy
  • Legal and Copyright Notices
  • Sitemap
  • Cookies

An Avnet Company © 2023 Premier Farnell Limited. All Rights Reserved.

Premier Farnell Ltd, registered in England and Wales (no 00876412), registered office: Farnell House, Forge Lane, Leeds LS12 2NE.

ICP 备案号 10220084.

Follow element14

  • Facebook
  • Twitter
  • linkedin
  • YouTube