arduino / arduino/ArduinoCore-mbed
Portenta H7 /GIGA R1– SPI write to SD card stuck at ≈1.3 MB/s. Any easy way to speed it up?
- Dominant language
- C
- Stars
- 411
- Forks
- 225
- PR merge metrics
- No merged PRs in 30d
Description
Hi,
I am storing data to an SD-card over SPI with Portenta H7. Running the SdFat “bench” example I only reach about 1.3 MB/s write speed.
I expected more: e.g. the Arduino Due in the SdFat README shows ≈3.9 MB/s, and a forum post in 2023 reports the same ceiling (1763.56KB/Sec) on the GIGA R1 (link:https://forum.arduino.cc/t/sdfat-tests-on-giga-r1/1198629/1).
Test setup
•Arduino Mbed Portenta Boards 4.3.1
• Arduino IDE 2.3.5
• Library: SdFat 2.3.0 (via Library Manager)
• Sketch : SdFat → examples → bench (edits in SdFatConfig.h →#define USE_SPI_ARRAY_TRANSFER 1
#define ENABLE_DEDICATED_SPI 1)
• SPI clock : tried 50 MHz and 60 MHz – speed barely changes
• SD card : 32 GB “Raspberry Pi” (Class 10, U3, V30, A2)
Questions:
Is there a simple configuration change (like enabling DMA) that can improve the SPI write speed?
Is this a documented limitation of Mbed OS's SPI implementation?
As I have limited experience with embedded systems, so step-by-step instructions or links would be greatly appreciated.
Thank you for your time and assistance!
Best regards
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by running the SdFat bench example with the stated SdFatConfig.h settings on the Portenta H7 or GIGA R1 and compare the 50 MHz and 60 MHz results. Inspect the ArduinoCore-mbed SPI implementation and Mbed OS documentation for DMA or transfer limits; done means identifying a supported configuration or documenting and reproducing the limitation with measured speed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- embedded-iot, performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100