Hi everyone. Experienced electronics engineer here but just starting to dip my toe into the Arduino world. Working on a small project that requires logging data to as SD card. I am using a ESP32-WROOM-32UE board:
I have wired this up (correctly I believe) to:
Running through some very basic code I keep getting errors and the card will not initialize (the card is formatted to FAT32). Here is the sample code:
#include <SPI.h>
#include <SD.h>
const int chipSelectPin = 17; // Change to your CS pin
void setup() {
Serial.begin(115200);
pinMode(chipSelectPin, OUTPUT);
if (!SD.begin(chipSelectPin)) {
Serial.println("SD card initialization failed!");
while (1);
}
Serial.println("SD card initialized successfully!");
}
void loop() {
// This loop can be left empty for the test
delay(1000); // Add a delay if desired
}
As I've been going through this project I've learnt a lot about the Arduino ecosystem and overcome so (probably basic for everyone here) issues but this is the first one that has really stumped me.
Well, there is no way to verify this without the actual connections. Please provide a (hand) drawn schematic (Not Frtzing !!) to show us how you have actually wired it up.
An ESP32 has 2 SPI ports, by default VSPI is used, and the usage of the default HSPI pins can cause some issues, but SPI pins can be re-assigned in needed.
That is correct, you don't need level-shifting.
It is giving some error initially, but it does get to the line where
I will get the schematics drawn out in a couple of days when I get back to working on this project. I thought that the level shifting would work even if the board in use already ran off 3V3?
That is possible, but there is no need for level shifting at all, don't provide anything higher than 3.3v to the level-shifter or it may increase the logic HIGH level to that Vcc.
First things first: have you been able to get a basic program example running on the ESP32 board, without the SD module connected? If not, start with a blink LED test.
The "core dump flash" error message is a concern, and probably has nothing to do with the SD module.
Yes, I've had a number of other programs to work (load cell amp, temp sensor, CAN module) working and they still work when I go back to using those specific progrms.
I'm using a custom ESP32-S3 audio board (not using SPI), and I've started getting the core dump flash error message as well. It just started doing so arbitrarily after some upload or the other.
Flashing example sketches doesn't make it go away. For what it's worth, upload seems successful (I see "Hash of data verified" at the end).
Given the recency of this thread, perhaps there is a bug in the new ESP32 Arduino Core version or something?
E (88) esp_core_dump_flash: Core dump data check failed:
Calculated checksum='53805682'
Image checksum='ffffffff'
Sorry if my issue was unrelated, but my problems were likely due to power brown-out during flashing. I enabled the "Erase All Flash Before Upload" option for one upload, and lo and behold, the error is gone.