{"id":5348,"date":"2026-08-30T16:10:42","date_gmt":"2026-08-30T07:10:42","guid":{"rendered":"https:\/\/donguri3.net\/server-tech\/rp2350-compatible-sd-card-spi-benchmark-2\/"},"modified":"2026-08-30T16:10:43","modified_gmt":"2026-08-30T07:10:43","slug":"rp2350-compatible-sd-card-spi-benchmark","status":"publish","type":"post","link":"https:\/\/donguri3.net\/en\/diy-repair\/electronics-microcontroller\/rp2350-compatible-sd-card-spi-benchmark\/","title":{"rendered":"Verification: Measuring SD Card SPI Write Speeds on RP2350 (Pico 2 Compatible)"},"content":{"rendered":"<p>We acquired an RP2350-equipped development board compatible with the Raspberry Pi Pico 2 and conducted write speed verification tests to an SD card to evaluate its hardware SPI performance.<br \/>\nBy optimizing settings in a standard 4-wire SPI connection, we achieved a speed of 2.30 MB\/s. This article shares detailed verification data, including the impact of allocation unit sizes and buffer sizes on performance.<\/p>\n<p><a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/IMG_2823-e1769694497969.jpg\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-2629\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/IMG_2823-e1769694497969.jpg\" alt=\"Connections\" width=\"553\" height=\"559\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/IMG_2823-e1769694497969.jpg 553w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/IMG_2823-e1769694497969-297x300.jpg 297w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/IMG_2823-e1769694497969-75x75.jpg 75w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/IMG_2823-e1769694497969-100x100.jpg 100w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/IMG_2823-e1769694497969-524x530.jpg 524w\" sizes=\"(max-width: 553px) 100vw, 553px\" \/><\/a><\/p>\n<h2>Verification Environment<\/h2>\n<ul>\n<li>Microcontroller: RP2350 (Generic \/ Raspberry Pi Pico 2)<\/li>\n<li>Library: SdFat (Arduino)<\/li>\n<li>Connection Method: Hardware SPI (SPI0)\n<ul>\n<li>MISO: GP0 (RX)<\/li>\n<li>CS: GP1 (CSn)<\/li>\n<li>SCK: GP2 (SCK)<\/li>\n<li>MOSI: GP3 (TX)<\/li>\n<\/ul>\n<\/li>\n<li>*Implementation: Wires soldered to a spare SD card adapter and connected directly to the RP2350 GPIOs (no bypass capacitors or external pull-up resistors installed).<\/li>\n<\/ul>\n<h2>Verification Results \u2460: Speed Differences by Allocation Unit Size<\/h2>\n<p>First, fixing the SPI clock at 24 MHz, we measured how write speeds varied with different SD card formatting schemes (allocation unit sizes).<br \/>\nThe buffer size (amount of data written per operation) was varied from 512 bytes to 64 KB.<\/p>\n<h3>[Measurement Results: Write Speed (MB\/s)]<\/h3>\n<p>(SPI Clock: Fixed at 24 MHz)<\/p>\n<p><a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/RP2350_write_speed_vs_allocation_unit_size.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-2693\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/RP2350_write_speed_vs_allocation_unit_size.png\" alt=\"RP2350_write_speed_vs_allocation_unit_size_24MHz\" width=\"1000\" height=\"600\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/RP2350_write_speed_vs_allocation_unit_size.png 1000w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/RP2350_write_speed_vs_allocation_unit_size-300x180.png 300w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/RP2350_write_speed_vs_allocation_unit_size-768x461.png 768w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/RP2350_write_speed_vs_allocation_unit_size-530x318.png 530w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/RP2350_write_speed_vs_allocation_unit_size-565x339.png 565w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/RP2350_write_speed_vs_allocation_unit_size-710x426.png 710w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/RP2350_write_speed_vs_allocation_unit_size-725x435.png 725w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/RP2350_write_speed_vs_allocation_unit_size-64x38.png 64w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/a><\/p>\n<table data-path-to-node=\"11\">\n<thead>\n<tr>\n<td><strong>Buffer Size<\/strong><\/td>\n<td><strong>16KB Format<\/strong><\/td>\n<td><strong>32KB Format<\/strong><\/td>\n<td><strong>64KB Format<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><span data-path-to-node=\"11,1,0,0\"><b data-path-to-node=\"11,1,0,0\" data-index-in-node=\"0\">512 B<\/b><\/span><\/td>\n<td><span data-path-to-node=\"11,1,1,0\">0.606<\/span><\/td>\n<td><span data-path-to-node=\"11,1,2,0\">0.605<\/span><\/td>\n<td><span data-path-to-node=\"11,1,3,0\">0.606<\/span><\/td>\n<\/tr>\n<tr>\n<td><span data-path-to-node=\"11,2,0,0\"><b data-path-to-node=\"11,2,0,0\" data-index-in-node=\"0\">1 KB<\/b><\/span><\/td>\n<td><span data-path-to-node=\"11,2,1,0\">0.935<\/span><\/td>\n<td><span data-path-to-node=\"11,2,2,0\">0.932<\/span><\/td>\n<td><span data-path-to-node=\"11,2,3,0\">0.936<\/span><\/td>\n<\/tr>\n<tr>\n<td><span data-path-to-node=\"11,3,0,0\"><b data-path-to-node=\"11,3,0,0\" data-index-in-node=\"0\">4 KB<\/b><\/span><\/td>\n<td><span data-path-to-node=\"11,3,1,0\">1.466<\/span><\/td>\n<td><span data-path-to-node=\"11,3,2,0\">1.450<\/span><\/td>\n<td><span data-path-to-node=\"11,3,3,0\">1.461<\/span><\/td>\n<\/tr>\n<tr>\n<td><span data-path-to-node=\"11,4,0,0\"><b data-path-to-node=\"11,4,0,0\" data-index-in-node=\"0\">8 KB<\/b><\/span><\/td>\n<td><span data-path-to-node=\"11,4,1,0\">1.606<\/span><\/td>\n<td><span data-path-to-node=\"11,4,2,0\">1.592<\/span><\/td>\n<td><span data-path-to-node=\"11,4,3,0\">1.619<\/span><\/td>\n<\/tr>\n<tr>\n<td><span data-path-to-node=\"11,5,0,0\"><b data-path-to-node=\"11,5,0,0\" data-index-in-node=\"0\">16 KB<\/b><\/span><\/td>\n<td><span data-path-to-node=\"11,5,1,0\">1.680<\/span><\/td>\n<td><span data-path-to-node=\"11,5,2,0\">1.668<\/span><\/td>\n<td><span data-path-to-node=\"11,5,3,0\">1.666<\/span><\/td>\n<\/tr>\n<tr>\n<td><span data-path-to-node=\"11,6,0,0\"><b data-path-to-node=\"11,6,0,0\" data-index-in-node=\"0\">32 KB<\/b><\/span><\/td>\n<td><span data-path-to-node=\"11,6,1,0\">1.684<\/span><\/td>\n<td><span data-path-to-node=\"11,6,2,0\">1.708<\/span><\/td>\n<td><span data-path-to-node=\"11,6,3,0\"><b data-path-to-node=\"11,6,3,0\" data-index-in-node=\"0\">1.738<\/b><\/span><\/td>\n<\/tr>\n<tr>\n<td><span data-path-to-node=\"11,7,0,0\"><b data-path-to-node=\"11,7,0,0\" data-index-in-node=\"0\">64 KB<\/b><\/span><\/td>\n<td><span data-path-to-node=\"11,7,1,0\">1.680<\/span><\/td>\n<td><span data-path-to-node=\"11,7,2,0\">1.693<\/span><\/td>\n<td><span data-path-to-node=\"11,7,3,0\">1.727<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Analysis:<\/h3>\n<ul>\n<li>Format Impact: Overall, the 64KB format showed the highest performance. Compared to the 16KB format, it showed about a 3.2% improvement in peak speed.<\/li>\n<li>Buffer Size Impact: Speeds increased as the buffer size grew, but plateaued (saturated) around 32 KB.<\/li>\n<\/ul>\n<h2>Verification Results \u2461: SPI Clock Frequency and Physical Limits<\/h2>\n<p>Next, we fixed the configuration to the best-performing &#8220;64KB format&#8221; and increased the SPI clock frequency to find the speed limit.<\/p>\n<h3>[Measurement Results: Write Speed (MB\/s)]<\/h3>\n<p>(Format: Fixed at 64KB)<\/p>\n<p><a href=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/RP2350_write_speed_vs_SPI_clock_freq_64kb.png\"><img decoding=\"async\" class=\"aligncenter size-full wp-image-2694\" src=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/RP2350_write_speed_vs_SPI_clock_freq_64kb.png\" alt=\"RP2350_write_speed_vs_SPI_clock_freq_64kb\" width=\"1000\" height=\"600\" srcset=\"https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/RP2350_write_speed_vs_SPI_clock_freq_64kb.png 1000w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/RP2350_write_speed_vs_SPI_clock_freq_64kb-300x180.png 300w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/RP2350_write_speed_vs_SPI_clock_freq_64kb-768x461.png 768w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/RP2350_write_speed_vs_SPI_clock_freq_64kb-530x318.png 530w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/RP2350_write_speed_vs_SPI_clock_freq_64kb-565x339.png 565w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/RP2350_write_speed_vs_SPI_clock_freq_64kb-710x426.png 710w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/RP2350_write_speed_vs_SPI_clock_freq_64kb-725x435.png 725w, https:\/\/donguri3.net\/wp-content\/uploads\/2026\/02\/RP2350_write_speed_vs_SPI_clock_freq_64kb-64x38.png 64w\" sizes=\"(max-width: 1000px) 100vw, 1000px\" \/><\/a><\/p>\n<table data-path-to-node=\"16\">\n<thead>\n<tr>\n<td><strong>Buffer Size<\/strong><\/td>\n<td><strong>24 MHz<\/strong><\/td>\n<td><strong>30 MHz<\/strong><\/td>\n<td><strong>32 MHz<\/strong><\/td>\n<td><strong>36 MHz<\/strong><\/td>\n<\/tr>\n<\/thead>\n<tbody>\n<tr>\n<td><span data-path-to-node=\"16,1,0,0\"><b data-path-to-node=\"16,1,0,0\" data-index-in-node=\"0\">512 B<\/b><\/span><\/td>\n<td><span data-path-to-node=\"16,1,1,0\">0.606<\/span><\/td>\n<td><span data-path-to-node=\"16,1,2,0\">0.668<\/span><\/td>\n<td><span data-path-to-node=\"16,1,3,0\">0.668<\/span><\/td>\n<td><span data-path-to-node=\"16,1,4,0\">0.668<\/span><\/td>\n<\/tr>\n<tr>\n<td><span data-path-to-node=\"16,2,0,0\"><b data-path-to-node=\"16,2,0,0\" data-index-in-node=\"0\">1 KB<\/b><\/span><\/td>\n<td><span data-path-to-node=\"16,2,1,0\">0.936<\/span><\/td>\n<td><span data-path-to-node=\"16,2,2,0\">1.073<\/span><\/td>\n<td><span data-path-to-node=\"16,2,3,0\">1.074<\/span><\/td>\n<td><span data-path-to-node=\"16,2,4,0\">1.074<\/span><\/td>\n<\/tr>\n<tr>\n<td><span data-path-to-node=\"16,3,0,0\"><b data-path-to-node=\"16,3,0,0\" data-index-in-node=\"0\">4 KB<\/b><\/span><\/td>\n<td><span data-path-to-node=\"16,3,1,0\">1.461<\/span><\/td>\n<td><span data-path-to-node=\"16,3,2,0\">1.836<\/span><\/td>\n<td><span data-path-to-node=\"16,3,3,0\">1.856<\/span><\/td>\n<td><span data-path-to-node=\"16,3,4,0\">1.821<\/span><\/td>\n<\/tr>\n<tr>\n<td><span data-path-to-node=\"16,4,0,0\"><b data-path-to-node=\"16,4,0,0\" data-index-in-node=\"0\">8 KB<\/b><\/span><\/td>\n<td><span data-path-to-node=\"16,4,1,0\">1.619<\/span><\/td>\n<td><span data-path-to-node=\"16,4,2,0\">2.024<\/span><\/td>\n<td><span data-path-to-node=\"16,4,3,0\">2.025<\/span><\/td>\n<td><span data-path-to-node=\"16,4,4,0\">2.069<\/span><\/td>\n<\/tr>\n<tr>\n<td><span data-path-to-node=\"16,5,0,0\"><b data-path-to-node=\"16,5,0,0\" data-index-in-node=\"0\">16 KB<\/b><\/span><\/td>\n<td><span data-path-to-node=\"16,5,1,0\">1.666<\/span><\/td>\n<td><span data-path-to-node=\"16,5,2,0\">2.196<\/span><\/td>\n<td><span data-path-to-node=\"16,5,3,0\">2.195<\/span><\/td>\n<td><span data-path-to-node=\"16,5,4,0\">2.146<\/span><\/td>\n<\/tr>\n<tr>\n<td><span data-path-to-node=\"16,6,0,0\"><b data-path-to-node=\"16,6,0,0\" data-index-in-node=\"0\">32 KB<\/b><\/span><\/td>\n<td><span data-path-to-node=\"16,6,1,0\">1.738<\/span><\/td>\n<td><span data-path-to-node=\"16,6,2,0\">2.211<\/span><\/td>\n<td><span data-path-to-node=\"16,6,3,0\">2.211<\/span><\/td>\n<td><span data-path-to-node=\"16,6,4,0\">2.265<\/span><\/td>\n<\/tr>\n<tr>\n<td><span data-path-to-node=\"16,7,0,0\"><b data-path-to-node=\"16,7,0,0\" data-index-in-node=\"0\">64 KB<\/b><\/span><\/td>\n<td><span data-path-to-node=\"16,7,1,0\">1.727<\/span><\/td>\n<td><span data-path-to-node=\"16,7,2,0\"><b data-path-to-node=\"16,7,2,0\" data-index-in-node=\"0\">2.301<\/b><\/span><\/td>\n<td><span data-path-to-node=\"16,7,3,0\"><b data-path-to-node=\"16,7,3,0\" data-index-in-node=\"0\">2.301<\/b><\/span><\/td>\n<td><span data-path-to-node=\"16,7,4,0\">2.274<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p>At 40 MHz and above, initialization errors occurred and the system failed to operate.<\/p>\n<h3>Analysis:<\/h3>\n<ul>\n<li>Fastest Setting: A peak speed of 2.301 MB\/s was recorded with a 64KB buffer size at the 30 MHz setting.<\/li>\n<li>Limiting Factor: Speeds were identical between 30 MHz and 32 MHz. This indicates that the bottleneck is not the RP2350 itself, but rather the internal flash memory write speed of the SD card (Bus Efficiency is approximately 61%).<\/li>\n<li>Stability: A drop in speed was observed at 36 MHz, suggesting degradation in signal quality. Considering stability, 30 MHz is the optimal choice.<\/li>\n<\/ul>\n<h2>Analysis: Aiming for High-Speed Operation at 40 MHz and Above<\/h2>\n<p>In this verification, initialization errors occurred at settings of 40 MHz and above. However, this is likely caused by &#8220;electrical signal quality degradation due to wiring&#8221; rather than the inherent limits of the RP2350 or SD card controller.<\/p>\n<p>If aiming for even higher speeds (40 MHz to 50 MHz) or greater reliability, the following hardware countermeasures are expected to be effective:<\/p>\n<ol>\n<li>Addition of Bypass Capacitors\n<ul>\n<li>SD cards draw large peak currents the moment they write (programming flash memory). Placing a 0.1\u00b5F to 10\u00b5F multi-layer ceramic capacitor between the SD card&#8217;s VDD and GND terminals (as close as possible) can prevent instantaneous voltage drops and potentially stabilize high-clock behavior.<\/li>\n<\/ul>\n<\/li>\n<li>Addition of External Pull-Up Resistors\n<ul>\n<li>The RP2350&#8217;s internal pull-up resistors are weak, which can cause signal waveforms to round off (slower rise times) at high speeds of several tens of MHz. Adding external pull-up resistors of around 10k\u03a9 to the signal lines (especially CS, MISO, and MOSI) is expected to clean up the signal waveforms and reduce communication errors.<\/li>\n<\/ul>\n<\/li>\n<\/ol>\n<p>Although this verification used &#8220;minimal wiring,&#8221; implementing these countermeasures might enable pushing past further limits (such as exceeding 2.5 MB\/s).<\/p>\n<h2>Conclusion: The Optimal Solution for RP2350 SPI Connection<\/h2>\n<p>Based on the verification data obtained, the best practices for SD card SPI communication on the RP2350 are as follows:<\/p>\n<ol>\n<li>Wiring: Use the RP2350&#8217;s hardware SPI pins (such as GP0-3).<\/li>\n<li>Format: Set the allocation unit size to 64 KB.<\/li>\n<li>SPI Clock: Set to 30 MHz.<\/li>\n<li>Buffer: Secure 32 KB or 64 KB for the write buffer.<\/li>\n<\/ol>\n<p>With the above configuration, even a simple SPI connection can deliver 2.3 MB\/s write performance, which is more than sufficient for audio recording and high-speed logging.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>We acquired an RP2350-equipped development board compatible with the Raspberry Pi Pico 2 and conducted write s [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":2687,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_locale":"en_US","_original_post":"https:\/\/donguri3.net\/?p=2685","footnotes":""},"categories":[1163],"tags":[463,277,1054,1053,1059,275,270],"class_list":["post-5348","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-electronics-microcontroller","tag-pico","tag-raspberry-pi-pico","tag-raspberry-pi-pico-2","tag-rp2350","tag-sd","tag-275","tag-270","en-US"],"_links":{"self":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/5348","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/comments?post=5348"}],"version-history":[{"count":1,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/5348\/revisions"}],"predecessor-version":[{"id":5351,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/posts\/5348\/revisions\/5351"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/media\/2687"}],"wp:attachment":[{"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/media?parent=5348"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/categories?post=5348"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/donguri3.net\/wp-json\/wp\/v2\/tags?post=5348"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}