Page 1 of 1

ESP32-Wroom-32e-N8R2 SPI communication error

Posted: Sat Mar 16, 2024 9:17 pm
by benjamin97
I have interfaced an SD card reading module using SPI with the ESP32-WROOM-32E-N8R2 module. I am unable to detect the SD card and write data onto the SD card. I am using a generic code from the SD.h library example that is used to interface the SD Card.

Parallely, I have flashed the same code on a ESP32-Wroom-32E Devkit-V4 which has the 4MB flash storage. This setup worked fine when i connected the SD card reading module with the same pin connection as i did before, and it was able to detect and write data on the SD card.

Kindly advice if I am missing any point that is making the ESP32-WROOM-32E-N8R2 module unable to communicate with the SD card reading module using SPI.

Re: ESP32-Wroom-32e-N8R2 SPI communication error

Posted: Sun Mar 17, 2024 11:09 am
by liaifat85
Have you tried a different SD card?

Re: ESP32-Wroom-32e-N8R2 SPI communication error

Posted: Sun Mar 17, 2024 7:40 pm
by benjamin97
yes. I did try a different SD card. I also ensured that the SD card is formatted in FAT32 format. The same SD card was operational when interfaced with the ESP32-wroom-32e devkit-v4.

Re: ESP32-Wroom-32e-N8R2 SPI communication error

Posted: Mon Mar 18, 2024 12:50 am
by cdollar
By chance are you using IO16 as one of your SPI pins? According to the data sheet (page 24, figure 7):
In module variants that have embedded QSPI PSRAM, i.e., that embed ESP32-D0WDR2-V3, IO16 should be pulled-up and can not be used for other funtion

Re: ESP32-Wroom-32e-N8R2 SPI communication error

Posted: Tue Mar 19, 2024 10:46 pm
by bacaneriaslocas
I don't know if this helps, but I have encountered with a similar problem while designing a custom borad with the ESP32-WROOM-32D. On a previous pcb were I used an atmega328PB I was able to use an SD car, but with my custom esp pcb I have not been able. By analizing the signal with my osciloscope I have seen that the shape of the wave is not square and is far from regular (note: I have been able to use other devices like de bmp 388). My conclusion is that there migth be something wrong with the routing of the pcb or that it may be some noise coming from another signal with the lack of a capacitor somewere. Hope this hepls.