Code: Select all
SPIClass myspi(HSPI);
SPI.begin(43, 39, 44, 42); // SCK, MISO, MOSI, SS
pinMode(45, OUTPUT);
digitalWrite(45, LOW); // SD_PWRn for MicroSD power
SD.begin(42, myspi);Code: Select all
SPIClass myspi(HSPI);
SPI.begin(43, 39, 44, 42); // SCK, MISO, MOSI, SS
pinMode(45, OUTPUT);
digitalWrite(45, LOW); // SD_PWRn for MicroSD power
SD.begin(42, myspi);// Use GPIOs 36 or lower on the P4 DevKit to avoid LDO power issues with high numbered GPIOs.
Code: Select all
SPI.begin(43, 39, 44, 42); // SCK, MISO, MOSI, SS
SD.begin(42);
Are you trying to use on board SD card slot or connect own?I can't get the MicroSD card slot to work on the ESP32-P4-EV board. I've tried:
but it still won't read an SD card. Any suggestions would be greatly appreciated!Code: Select all
SPIClass myspi(HSPI); SPI.begin(43, 39, 44, 42); // SCK, MISO, MOSI, SS pinMode(45, OUTPUT); digitalWrite(45, LOW); // SD_PWRn for MicroSD power SD.begin(42, myspi);
I've tried:there is no need to create a new SPI object.
I'm trying to use the on-board MicroSD slot.Are you trying to use on board SD card slot or connect own?
In the pins_arduino.h file it's defined as:Are you sure pin 45 is inverted? How are you gating the power?
Code: Select all
void setup() {
Serial.begin(115200);
#ifdef REASSIGN_PINS
//pinMode(46, OUTPUT);
//digitalWrite(46, LOW);
//SPI.begin(sck, miso, mosi); //, cs);
pinMode(45, OUTPUT);
digitalWrite(45, LOW);
SPI.begin(43, 39, 44,42); // SCK, MISO, MOSI, SS
if (!SD.begin()) {
#else
if (!SD.begin()) {
#endif
Serial.println("Card Mount Failed");
return;
}
Users browsing this forum: No registered users and 3 guests