I find it useful to run this program which lists the default SPI and I2C pins
/*
Rui Santos
Complete project details at https://RandomNerdTutorials.com/esp32-spi-communication-arduino/
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files.
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
*/
//Find the default SPI pins for your board
//Make sure you have the right board selected in Tools > Boards
void setup() {
// put your setup code here, to run once:
Serial.begin(115200);
delay(3000);
Serial.print("MOSI: ");
Serial.println(MOSI);
Serial.print("MISO: ");
Serial.println(MISO);
Serial.print("SCK: ");
Serial.println(SCK);
Serial.print("SS: ");
Serial.println(SS);
Serial.print("SDA: ");
Serial.println(SDA);
Serial.print("SCL: ");
Serial.println(SCL);
}
void loop() {
// put your main code here, to run repeatedly:
}
e.g. using a ESP32S3 Zero Mini with Tools>Board selecting ESP32S3 Dev Module I get
MOSI: 11
MISO: 13
SCK: 12
SS: 10
SDA: 8
SCL: 9
enables you to check the IDE defaults agree with a pinout disgram
I see from post 1 the 5V SD reader works OK (mat damage the 3.3V logic of the XIAO)
it is the 3.3V which fails
possibility the XIAO 3.3V power supply does not have the capacity to power the SD reader?
have any other ESP32 series microcontrollers you could test it with?