ESP32 internal MAC ethernet + IP101GRI conflicts with SDSPI (IDFGH-11070) #12245
Labels
Awaiting Response
awaiting a response from the author
Resolution: NA
Issue resolution is unavailable
Status: Done
Issue is done internally
Environment
Development Kit: custom bord (very similar to ESP32-Ethernet-Kit)
Module or chip used: ESP32-WROOM32D
IDF version : v4.4.4
Build System: CMake
Operating System: Windows
Using an IDE?: Eclipse
Power Supply: USB 5V-1A -> LDO 1A-3.3V
Problem Description
SD card connection via SDSPI is used.
When read and write operations are performed periodically (at random times and with random frequency), errors occur on the CMD17, CMD18, CMD24, CMD25 commands (this is what I was able to track, there may be others, but these are the most used when reading and writing large amounts of data), as a rule, these are errors 0x107, 0x108, 0x109.
This behavior is observed only after starting ethernet, regardless of whether we transmit data over ethernet or not. Ethernet is organized in the same way as on the ESP32-Ethernet-Kit board.
It seems that there are problems with hardware, with the implementation of the board. But if do not run ethernet, or use Wi-Fi instead of ethernet, then there are no problems with the SD card, everything works without reading or writing errors.
Experiments and results
There is no dependence on the type and volume of the SD card used
I tried changing the clock frequency of the card from 20 to 10 Mhz. Errors appear much less frequently, but they are there.
I also did some experiments to find out the influence of the components of the board, including the 50 Mhz Ethernet clocking signal. But did not reveal any dependencies.
And most importantly, if I switch from SPI to SDIO (1 bit mode, default 20 Mhz) interface to work with the card, errors disappear. I.e. when using the SDIO interface (1 bit mode) on the same ESP 32 pins, there are no errors when working with the card.
Question:
Are there any hidden problems in ESP32 with simultaneous use of SDSPI and internal MAC ethernet?
How to properly connect and work with an SD card in ESP32 if an internal MAC eternet is used?
The text was updated successfully, but these errors were encountered: