SparkFun IoT RedBoard - RP2350 - Development Board

Regarding the board: SparkFun IoT RedBoard - RP2350 - Arduino R4 kompatibles development board - SparkFun WRL-27708

The internal SD card module can’t get initialized. When I insert the SD card and try to execute SD.begin I always get a failed message. Can someone help me resolving this? Which pin is the correct one for that board and is the SD.h library the correct one? Or can someone come up even with an example?

Note Hardware Overview - SparkFun IoT RedBoard - RP2350 Hookup Guide

Can you try a different SD card? What is the failed msg? Paste more info here

I already tried other SD cards.

I just use SD.h and therefore I don’t get an error message, it just fails. My .ino code looks like this:

void setup() {
Serial.begin(9600);
while (!Serial);

Wire.begin();

// Init SD-Karte
if (!SD.begin(chipSelect)) {
Serial.println(“SD card not initialized”);
while (1);
}
}

I also used the example codes and it also couldn’t get initialized. Which one is the correct chip select?

Does someone have an answer or needs other information to help me? I am really clueless right now…

Hi there,

The IoT RedBoard - RP2350 uses SPI1 for the SD card, not the default SPI. The CardInfo example demonstrates how to utilize either SPI bus, plus additional information you can get from the card. To work on this board, you just have to change the SPI pins to:

const int _MISO = 8;  // AKA SPI RX
const int _MOSI = 11;  // AKA SPI TX
const int _CS = 9;
const int _SCK = 10;

Here’s minimal code based on the CardInfo example that works on my end:

const int _MISO = 8;  // AKA SPI RX
const int _MOSI = 11;  // AKA SPI TX
const int _CS = 9;
const int _SCK = 10;

#include <SPI.h>
#include <SD.h>

void setup() {
  Serial.begin(115200);

  while (!Serial) {
    delay(1);
  }

  Serial.println("Initializing...");

  bool sdInitialized = false;
  SPI1.setRX(_MISO);
  SPI1.setTX(_MOSI);
  SPI1.setSCK(_SCK);
  sdInitialized = SD.begin(_CS, SPI1);

  if (!sdInitialized) {
    Serial.println("Fail");
  } else {
    Serial.println("Success");
  }
}

void loop(void) {
}

Hope this helps!

2 Likes