Closed derbmann closed 2 years ago
Are you re-using pin 14 - camera and sd?
I'll have to compare the schematics to see which data pins the sd uses in 1-bit mode. The unused pins could be left hanging to prevent interaction. I think gpio4, 12, 13 are the unsed pins on the esp32-cam ai-thinker module sd card connection and gpio2 is the 1-bit.
So I think you are also using gpio2 for the data0, and your data1 and data2 are disconnected from the sd connector (the red X). And cd/data3 was gpio15 and is now disconnected.
You could disconnect 14 and 15 and try it. The camera might be turning on 14, which is disturbing the sd card.
gpio14 is h2s_clk, spi_clk, MTMS?
You probably need that one, so you would have to tell sd_mmc to use another gpio for that one, as I don't imagine you could move a gpio from the camera connector to use another pin for the gpio14 on the camera.
Sry for the late response, i was busy the last few days...
Since GPIO14 is a clock signal and the board comes wired like that, I don't think that's the issue. The sd_mmc test works fine but i somehow get the feeling that my ghetto wiring is the issue.
I meanwhile found out that you can use the sd_mmc in the spi mode. I reverted back the sd card slot to the original spi mode and now try to get the sd_mmc test in the spi mode working. After that ill try to implement it in your program.
Ill response if I got success or not.
thanks
When using the camera gpio14 is an input to the esp32 (y4 - data line), when using the sdcard gpio14 is an output (sclk clock) so independently they will work, but not at the same time.
You are absolutely right, I did ask waveshare about it and they confirmed it. What a great product...
I guess I could add a external sd card module but I'm done with it. I just order a proper esp32 cam module.
Thank you for your help.
Hi,
I got the Waveshare ESP32 One and i wanted to use your program on it. Sadly i got a bit of trouble with it, most likely because I'm a beginner...
I did change the camera pins to.:
(Because the CameraWebServer example works with these settings.)
But the actual problem is now the SD card. The card reader is connected to.:
This means its connected to SPI in the HSDPI pinout. Since i got the SD_Test sketch working ill think I'm right to this point.
But since you are using the sd_mmc i can't use the card reader with it, right?
Just for testing purpose I desoldered the card reader and connected the following pins to it.:
The SDMMC_Test sketch is working with these connected pins in the 1-bit mode SD_MMC.begin("/cdcard", true);. And after adding pinMode(2, PULLUP); to line ~1457 at static esp_err_t init_sdcard() your program finally was able to read the sd card but fails later again with some sd error on the startup.
Startup-Log & Settings: startup.txt TimeLapseAviA1x.ino.txt settings.h.txt
I'm now at the end of my knowledge and need your/someones help pls. What did I wrong or need to change to get it working?
Thank you, derbmann