Comments (17)
Change this line
Line 1816 in 6d08a10
to
if(card && fs) {
and the guru should keep meditating.
If you get the Failed to initialize SD card message when a formatted card is inserted then check your wiring as well.
from esp32.
yes. now
[MSG:Warning: Failed to initialize SD card]
error:60 - SD Card mount failed.
I have tested, the wiring work well using this sketch
#include "FS.h"
#include "SD.h"
#define SD_CS 5
void listDir(fs::FS &fs, const char * dirname, uint8_t levels){
Serial.printf("Listing directory: %s\n", dirname);
File root = fs.open(dirname);
if(!root){
Serial.println("Failed to open directory");
return;
}
if(!root.isDirectory()){
Serial.println("Not a directory");
return;
}
File file = root.openNextFile();
while(file){
if(file.isDirectory()){
Serial.print(" DIR : ");
Serial.println(file.name());
if(levels){
listDir(fs, file.name(), levels -1);
}
} else {
Serial.print(" FILE: ");
Serial.print(file.name());
Serial.print(" SIZE: ");
Serial.println(file.size());
}
file = root.openNextFile();
}
}
void setup(){
Serial.begin(115200);
SD.begin(SD_CS);
if (!SD.begin(SD_CS)) {
Serial.println("failed");
return;
}
uint8_t cardType = SD.cardType();
if (cardType == CARD_NONE) {
Serial.println("No sdcard");
return;
}
Serial.println("Reading SD...");
listDir(SD, "/", 0);
}
void loop(){
}
from esp32.
Your test program is using the same pins for communicating with the card as grblHAL does?
Which board map are you using - there could be pin conflicts?
from esp32.
Yes, it is using the same pins. 8GB microsd and bdring v4
from esp32.
I left all settings as default except CMakeLists.txt. I changed it on line 33 from OFF to ON
from esp32.
Which version of the SDK are you using? You can use $I
to check:
...
[DRIVER OPTIONS:v4.3.1-dirty]
...
from esp32.
[FIRMWARE:grblHAL]
[NVS STORAGE:*FLASH]
[DRIVER:ESP32]
[DRIVER VERSION:220726]
[DRIVER OPTIONS:v4.3.2-dirty]
[BOARD:BDRING v4]
from esp32.
I have now tested with the same board map as you and it works for me. A bug/regression/breaking change in the IDF framework?
Anyway here is the binary that works for me:
app-template.zip
from esp32.
I have tried compiling the sd_card example program from esp-idf which also doesn't work. I'm confused, it's working on arduino ide with a libraries that also made by Espressif.
Using library FS at version 2.0.0 in folder: C:\Users\DASHA\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\libraries\FS
Using library SD at version 2.0.0 in folder: C:\Users\DASHA\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\libraries\SD
Using library SPI at version 2.0.0 in folder: C:\Users\DASHA\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.3\libraries\SPI
So, the problem is coming from my hardware or isp idf on my computer. I will try other hardware after buying it.
from esp32.
Now it works with grblhal after I removed the LVC125A IC and connected it directly to the eps32 pin. Still working with the Arduino IDE sketch above.
Hope this helps all of you who are having the same problem.
from esp32.
after I removed the LVC125A IC
On which hardware? The schematic I have for for the V4.1 board do not show any pin buffering.
from esp32.
this sdcard module that I use.
where can i get the schematic for v4.1?
from esp32.
this sdcard module that I use.
ok, so the buffer is on module - I have not seen that before. It needs 5V VCC? This since there is a regulator on the module, did you supply that?
where can i get the schematic for v4.1?
I believe I found it here.
from esp32.
Hmm - maybe this module is not suited for the ESP32 as, IIRC, it is not 5V tolerant. If supplied with 5V it will fry the ESP32 inputs?
from esp32.
Yes, I'm supplying this with 5v connected to v-in pin of esp32. The AMS117 is 3.3V. so i think it's safe.
I also use this module for stm32f103. the miso, mosi, clk and cs pins are connected to the controller via the LVC12SA ic.
from esp32.
Most STM32F103 pins are 5v tolerant, not sure about the ESP32 - the MISO pin is an input to the MCU.
from esp32.
Closing as I've had hours upon hours of successful SD card streaming with the ESP32 recently.
from esp32.
Related Issues (20)
- Flashed xPRO V5 Only communicating with X axis driver HOT 2
- QUESTION? what sender is needed for embroidery mode? HOT 1
- slittamento foto toni di grigio con lightburn HOT 1
- coordinate not update in candle HOT 4
- Spindle encoder HOT 3
- Maximum Angular Position HOT 11
- Q: Flashing XPro V5 HOT 1
- Webbuilder - VFD + Diode laser HOT 4
- Erratic step output lathe mode HOT 4
- Failed to initialize SD card HOT 3
- typo in vscode ini files HOT 3
- How to use UART1? HOT 7
- Difficult to compile ESP32 Project! HOT 2
- "Task watchdog got triggered." when WEBSOCKET_ENABLE or TELNET_ENABLE HOT 6
- Web Builder - auto square HOT 3
- Build image not working HOT 21
- Changing pin mapping - MKS Tinybee HOT 4
- Limits override cannot save. HOT 1
- How to invert motor fault pin? HOT 2
- E-stop (Reset) no pullup? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from esp32.