Closed zamby closed 8 months ago
Are the pin numbers correctly connected to the SD card?
Please provide a pointer to "the standard ESP examples" so we know exactly what you mean, along with any extra SDK configuration files that you used, and information about the compilation environment that you used with those examples.
Arduino test:
/** This program tests the SD card module is working */
#include <Arduino.h>
#include <SPI.h>
#include <SD.h>
/** The clock select pin for the SD card module */
#define CS_PIN 5
void setup() {
// Initialize the Serial (it'll tell us if the program runned correctly)
Serial.begin(115200);
while (!Serial) { }
// Check the module is connected
if (!SD.begin(CS_PIN)) {
Serial.println("Error, SD Initialization Failed");
return;
}
File testFile = SD.open("/SDTest.txt", FILE_WRITE);
if (testFile) {
testFile.println("Hello ESP32 SD");
testFile.close();
Serial.println("Success, data written to SDTest.txt");
} else {
Serial.println("Error, couldn't not open SDTest.txt");
}
}
// Do nothing, sd card operations run on setup()
void loop() {}
Serial Debug
rst:0x10 (RTCWDT_RTC_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 0, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:1 load:0x3fff0018,len:4 load:0x3fff001c,len:1044 load:0x40078000,len:10124 load:0x40080400,len:5856 entry 0x400806a8 Success, data written to SDTest.txt
It's Work!
Reinstall FluidNC
install e load config.yaml
> install-wifi.bat
> install-fs.bat
Select a COM port 0: COM1 (\Device\Serial0) 1: COM7 (\Device\Silabser0) Choice: 1 FluidNC v1.2.0 using COM7 Exit: Ctrl-C, Ctrl-Q or Ctrl-], Clear screen: CTRL-W Upload: Ctrl-U, Reset ESP32: Ctrl-R, Send Override: Ctrl-O FluidNC filename [config.yaml]: XModem Upload C:\Users\zamby\Documents\config.yaml config.yaml $Xmodem/Receive=config.yaml [MSG:INFO: Received 1759 bytes to file /spiffs/config.yaml] ok $Config/Filename=config.yaml ok
reboot...
FluidNC v1.2.0 using COM7
Exit: Ctrl-C, Ctrl-Q or Ctrl-], Clear screen: CTRL-W
Upload: Ctrl-U, Reset ESP32: Ctrl-R, Send Override: Ctrl-O
$Alarm/Disable
[MSG:INFO: Caution: Unlocked]
ok
$SD/Status
E (579883) sdmmc_sd: sdmmc_init_sd_if_cond: send_if_cond (1) returned 0x108
[MSG:ERR: sdmmc_card_init failed code 0x108]
No SD card
error:60
------------------------ REMOVE CARD
$SD/Status
[MSG:ERR: sdmmc_card_init failed code 0x107]
No SD card
error:60
------------------------ INSERT CARD
$SD/Status
E (607094) sdmmc_sd: sdmmc_init_sd_if_cond: send_if_cond (1) returned 0x108
[MSG:ERR: sdmmc_card_init failed code 0x108]
No SD card
error:60
Not Working.
What size is the card, and is it SD or MMC?
Both SD 1GB and 16GB not working.
I ordered one of those adapter cards. When it arrives I will look into the problem.
Oh thanks. I didn't want you to spend money!
I ordered it some time ago. My time is much more valuable than the cost of the adapter card. Did you want me to spend that instead?
This is mod will work with this SD adapter. I think it is becouse too hight frequency SPI in new builds. I connect directly without buffer chip and 3.3 voltage regulator.
This is mod will work with this SD adapter. I think it is becouse too hight frequency SPI in new builds. I connect directly without buffer chip and 3.3 voltage regulator.
You can also power VCC of the SD adapter using VIN or 5+.
Controller Board
WEMOS ESP32 LOLIN
Machine Description
I am only testwith board ESP32.
Input Circuits
No response
Configuration file
Startup Messages
User Interface Software
No response
What happened?
I configured a LOLIN ESP32 board with the SdCard (Micro SD TF Card Memory Shield Module SPI Micro SD Adapter) From Web interface I only see NO SDCARD, or from terminal: [MSG:ERR: sdmmc_card_init failed code 0x107]
I tested the SD card with the standard ESP examples and it works fine. Am I doing something wrong?
Thanks.
Other Information
No response