Fehler beim booten (SD Karte wird nicht erkannt)

und…

#ifndef ESPUINO_SETTINGS_LOLIN_D32_PRO_H
#define ESPUINO_SETTINGS_LOLIN_D32_PRO_H
#include „Arduino.h“

//######################### INFOS ####################################
/* This is a PCB-specific config-file for *Wemos Lolin32 D32 pro with port-expander PCA9555PW and SD_MMC*.
PCB: t.b.a.
Forum: https://forum.espuino.de/t/espuino-minid32-pro-lolin-d32-pro-mit-sd-mmc-und-port-expander-smd/866
Infos: https://www.wemos.cc/en/latest/d32/d32_pro.html
Schematics Lolin D32 pro: https://www.wemos.cc/en/latest/_static/files/sch_d32_pro_v2.0.0.pdf
Schematics PCB: t.b.a.
Caveats: GPIO35 (battery monitoring) + don't use internal SD-slot as it's to capable of SD_MMC because of its pin-layout!
Status:
    tested with PN5180 + SD_MMC (by biologist79)
*/

//################## GPIO-configuration ##############################
// Please note: GPIOs 34, 35, 36, 39 are input-only and don't have internal pullup-resistors.
// So if connecting a button to these, make sure to add a 10k-pullup-resistor for each button.
// Further infos: https://randomnerdtutorials.com/esp32-pinout-reference-gpios/
// GPIOs 16+17 are not available for D32 pro as they're used to internal purposes (PSRAM).
// All GPIOs >=100 and <= 115 are connected to a port-expander
#ifdef SD_MMC_1BIT_MODE
    //  (MOSI)    15  CMD
    //  (SCK)     14  SCK
    //  (MISO)     2  D0
#else
    // SPI-SD IS NOT SUPPORTED BY THIS PCB - DON'T USE INTERNAL SD-READER!
    #define SPISD_CS                    99          // GPIO for chip select (SD)
    #ifndef SINGLE_SPI_ENABLE
        #define SPISD_MOSI              99          // GPIO for master out slave in (SD) => not necessary for single-SPI
        #define SPISD_MISO              99          // GPIO for master in slave ou (SD) => not necessary for single-SPI
        #define SPISD_SCK               99          // GPIO for clock-signal (SD) => not necessary for single-SPI
    #endif
#endif

// RFID (via SPI)
#define RST_PIN                         99          // Used as dummy for RC522
#define RFID_CS                         21          // GPIO for chip select (RFID)
#define RFID_MOSI                       23          // GPIO for master out slave in (RFID)
#define RFID_MISO                       19          // GPIO for master in slave out (RFID)
#define RFID_SCK                        18          // GPIO for clock-signal (RFID)

#ifdef RFID_READER_TYPE_PN5180
    #define RFID_BUSY                   33          // PN5180 BUSY PIN
    #define RFID_RST                    22          // PN5180 RESET PIN
    #define RFID_IRQ                    99          // Depending on your configuration this needs to be adjusted to 32.
#endif

// I2S (DAC)
#define I2S_DOUT                        25          // Digital out (I2S)
#define I2S_BCLK                        27          // BCLK (I2S)
#define I2S_LRC                         26          // LRC (I2S)

// Rotary encoder
#ifdef USEROTARY_ENABLE
    //#define REVERSE_ROTARY                        // To reverse encoder's direction; switching CLK / DT in hardware does the same
    #define ROTARYENCODER_CLK           34          // rotary encoder's CLK
    #define ROTARYENCODER_DT            39          // 39 = 'VN'; rotary encoder's DT
#endif

// Amp enable (optional)
#define GPIO_PA_EN                      108         // To enable/disable amp for loudspeaker; connected to port-expander

// Control-buttons
#define NEXT_BUTTON                     102         // Next-Button: connected to port-expander
#define PREVIOUS_BUTTON                 100         // Prev-Button: connected to port-expander
#define PAUSEPLAY_BUTTON                101         // Pplay-Button: connected to port-expander
#define ROTARYENCODER_BUTTON            103         // Set to 99 to disable the button; connected to port-expander
#define BUTTON_4                        104         // Button 4: connected to port-expander
#define BUTTON_5                        105         // Button 5: connected to port-expander

//#define BUTTONS_LED                   114         // Powers the LEDs of the buttons. Make sure the current consumed by the LEDs can be handled by the used GPIO

// Channels of port-expander can be read cyclic or interrupt-driven. It's strongly recommended to use the interrupt-way!
// Infos: https://forum.espuino.de/t/einsatz-des-port-expanders-pca9555/306
#ifdef PORT_EXPANDER_ENABLE
    #define PE_INTERRUPT_PIN            36          // GPIO that is used to receive interrupts from port-expander + to wake up ESP32
#endif

// I2C-configuration (necessary for PCA9555)
#ifdef I2C_2_ENABLE
    #define ext_IIC_CLK                 4           // i2c-SCL (clock)
    #define ext_IIC_DATA                13          // i2c-SDA (data)
#endif

// Wake-up button => this also is the interrupt-pin if port-expander is enabled!
// Please note: only RTC-GPIOs (0, 4, 12, 13, 14, 15, 25, 26, 27, 32, 33, 34, 35, 36, 39, 99) can be used! Set to 99 to DISABLE.
// Please note #2: this button can be used as interrupt-pin for port-expander. If so, all pins connected to port-expander can wake up ESPuino.
#define WAKEUP_BUTTON                   36          // Defines the button that is used to wake up ESPuino from deepsleep; set to 99 to disable

// Power-control
#define POWER                           115         // GPIO used to drive transistor-circuit, that switches off peripheral devices while ESP32-deepsleep
#ifdef POWER
    #define INVERT_POWER                          // If enabled, use inverted logic for POWER circuit, that means peripherals are turned off by writing HIGH
#endif

// (optional) Neopixel
#define LED_PIN                         12          // GPIO for Neopixel-signaling

// (optinal) Headphone-detection
#ifdef HEADPHONE_ADJUST_ENABLE
    //#define DETECT_HP_ON_HIGH                      // Per default headphones are supposed to be connected if HT_DETECT is LOW. DETECT_HP_ON_HIGH will change this behaviour to HIGH.
    #define HP_DETECT                   107          // GPIO that detects, if there's a plug in the headphone jack or not; connected to port-expander
#endif

// (optional) Monitoring of battery-voltage via ADC
#ifdef MEASURE_BATTERY_VOLTAGE
    #define VOLTAGE_READ_PIN            35          // GPIO used to monitor battery-voltage. Don't change, it's built in
    constexpr float referenceVoltage = 3.30;        // Voltage between 3.3V and GND-pin at the develboard in battery-mode (disconnect USB!)
    constexpr float offsetVoltage = 0.1;            // If voltage measured by ESP isn't 100% accurate, you can add an correction-value here
#endif

// (optional) For measuring battery-voltage a voltage-divider is already onboard. Connect a LiPo and use it!
#ifdef MEASURE_BATTERY_VOLTAGE
    constexpr uint16_t rdiv1 = 100;                 // Don't change, it's built in
    constexpr uint16_t rdiv2 = 100;                 // Don't change, it's built in
#endif

// (optional) hallsensor. Make sure the GPIO defined doesn't overlap with existing configuration. Please note: only user-support is provided for this feature.
#ifdef HALLEFFECT_SENSOR_ENABLE
    #define HallEffectSensor_PIN        32  	// GPIO that is used for hallsensor (ADC); user-support: https://forum.espuino.de/t/magnetische-hockey-tags/1449/35
#endif

// (Optional) remote control via infrared
#ifdef IR_CONTROL_ENABLE
    #define IRLED_PIN                   5               // GPIO where IR-receiver is connected (only tested with VS1838B)
    #define IR_DEBOUNCE                 200             // Interval in ms to wait at least for next signal (not used for actions volume up/down)

    // Actions available. Use your own remote control and have a look at the console for "Command=0x??". E.g. "Protocol=NEC Address=0x17F Command=0x68 Repeat gap=39750us"
    // Make sure to define a hex-code not more than once as this will lead to a compile-error
    // https://forum.espuino.de/t/neues-feature-fernsteuerung-per-infrarot-fernbedienung/265
    #define RC_PLAY                     0x68            // command for play
    #define RC_PAUSE                    0x67            // command for pause
    #define RC_NEXT                     0x6b            // command for next track of playlist
    #define RC_PREVIOUS                 0x6a            // command for previous track of playlist
    #define RC_FIRST                    0x6c            // command for first track of playlist
    #define RC_LAST                     0x6d            // command for last track of playlist
    #define RC_VOL_UP                   0x1a            // Command for volume up (one step)
    #define RC_VOL_DOWN                 0x1b            // Command for volume down (one step)
    #define RC_MUTE                     0x1c            // Command to mute ESPuino
    #define RC_SHUTDOWN                 0x2a            // Command for deepsleep
    #define RC_BLUETOOTH                0x72            // Command to enable/disable bluetooth
    #define RC_FTP                      0x65            // Command to enable FTP-server
#endif

#endif

ich bin über jeden hinweis dankbar und danke schon mal im voraus

Ist die Karte mit fat32 (und nicht mit exfat) formatiert?

ja fat32 mit mac osx festplatten dienstprogramm formatiert

Hast du das passende Profil ausgewählt? Siehe Bild am unteren Rand (env…):
Profil

auch das ja

Um den Fehler einzugrenzen: Miss mal am ext-Konnektor mal mit einem Multimeter zwischen den Pins 2 und 10 wenn diese Fehlermeldung erscheint. Weil da sollten 3.3 V sein.
Ist es initial denn bei dir gelaufen bevor du geflasht hast? Ich schicke ja nur vorgeflashte Develboards hier raus.

ok, das werde ich morgen früh mal machen und berichten,

ich habe jedoch lediglich die mini4layer platine von dir, das wemos lolin d32 pro habe ich bei ali express bestellt -link aus dem forum-

ich habe gerade mal gemessen, da liegben 3,26 V. soweit stimmt auch dies.

Ok, also das heißt zumindest, dass Spannung auf den SD-Slot geschaltet wird. Das ist schon mal gut.
a) Hast du vielleicht noch eine dritte Karte (vielleicht ne alte 2 GB oder so), die du testen kannst?
b) Kannst du mal schauen, ob der SD-Slot sauber gelötet ist? Ich hatte das bei einer einzigen Platine (auf knapp 300) mal, dass JLCPCB den SD-Slot nicht sauber eingelötet hat. Wobei aber ein Stück weit dagegen spricht, dass du die mini4L ja gelötet von mir bekommen hast und ich sie erfolgreich getestet habe. Ich teste hier immer mit einer 32 GB-Karte von Sandisk.

leider gleiches spiel, ich habe es mit einer 1gb sandisk, einer 2gb hama und einer 1tb sandian(aliexp.) probiert.
die lötstellen sehen vernüftig aus.

mittlerweiler hat der upload bzw. der bootvorgang einmal funktioniert bei der 2gb hama und mit deaktiviertem neopixel. (da ich diesen auch noch nicht habe und ich weiter oben gelesen hatte, dass dies anscheinend auch einfluss haben kann.
jedoch scheint der boot vorgang auch nicht stabil bzw. wird er durch die fehlermeldungen immer unterbrochen

so siehts im terminal aus

E (20388) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
E (20389) vfs_fat_sdmmc: sdmmc_card_init failed (0x107).
[ 20393][E][SD_MMC.cpp:148] begin(): Failed to initialize the card (0x107). Make sure SD card lines have pull-up resistors in place.
E [20404] SD-Karte konnte nicht gemountet werden.
E [20915] Bootgang wegen SD fehlgeschlagen. Gehe in Deepsleep…
ets Jul 29 2019 12:21:46

rst:0x5 (DEEPSLEEP_RESET),boot:0x17 (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:2
load:0x3fff0030,len:1344
load:0x40078000,len:14464
load:0x40080400,len:3652
entry 0x400805f0
E (55) esp_core_dump_flash: No core dump partition found!
E (55) esp_core_dump_flash: No core dump partition found!
I [139] Maximale Inaktivitätszeit wurde aus NVS geladen: 10 Minuten
D [190] RFID-Tags koennen jetzt gescannt werden…
N [191] Port-expander gefunden
N [192] Interrupt für Port-Expander aktiviert
I [193] Zyklus für Batteriemessung fuer Neopixel-Anzeige aus NVS geladen: 10 Minuten
I [205] Unterer Spannungslevel (Batterie) fuer Neopixel-Anzeige aus NVS geladen: 3.00V
I [217] Oberer Spannungslevel (Batterie) fuer Neopixel-Anzeige aus NVS geladen: 4.20V
I [218] Spannungslevel (Batterie) fuer Niedrig-Warnung via Neopixel aus NVS geladen: 3.40V
I [229] Spannungslevel (Batterie) fuer Kritisch-Warnung via Neopixel aus NVS geladen: 3.10V
E [232] Lautstärke vor dem letzten Shutdown wird wiederhergestellt. Dies überschreibt die Einstellung der initialen Lautstärke aus der GUI.
I [242] Initiale Lautstärke wurde aus NVS geladen: 3
E [253] Maximale Lautstärke für Lautsprecher wurde ins NVS geschrieben.
E [254] Maximale Lautstärke für Kopfhörer wurde ins NVS geschrieben.
N [264] Lautsprecher ausgeschaltet
I [265] Maximale Lautstärke wurde gesetzt auf: 11
E (1350) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
E (1351) vfs_fat_sdmmc: sdmmc_card_init failed (0x107).
[ 1355][E][SD_MMC.cpp:148] begin(): Failed to initialize the card (0x107). Make sure SD card lines have pull-up resistors in place.
E [1366] SD-Karte konnte nicht gemountet werden.

E (13729) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
E (13730) vfs_fat_sdmmc: sdmmc_card_init failed (0x107).
[ 13734][E][SD_MMC.cpp:148] begin(): Failed to initialize the card (0x107). Make sure SD card lines have pull-up resistors in place.
E [13745] SD-Karte konnte nicht gemountet werden……

Das könnte auch mein(e) Problem/ Beobachtung sein.

Ich habe das aber nicht weiter verfolgt, weil mit Ring ging es ja und ich war scheinbar der Einzige mit den Auffälligkeiten.

Jetzt habe ich leider keinen Lolin D32 pro hier, mit dem ich das testen könnte. Mit einem FePo-Develboard (ich gebe zu, das habe ich vorher nie getestet) klappt das Booten auch ohne Neopixel mit einer 32 GB-Karte von Sandisk.

@fts: Teste es bitte nochmal, wenn dein Neopixel da ist.

ich habe den neopixel erhalten und mal angeschlossen. das problem bleibt bestehen, jedoch ist mir zufällig aufgefallen, dass die sd gemounted wird, wenn ich mit dem finger gegenhalte, also an der sd leicht drücke. auch dies jedoch unzuverlässig bzw. nicht nachhaltig. daher würde ich jetzt von einem hardware felhler beim sd reader ausgehen.

Hallo,
ich habe leider ein ähnliches Problem.
Ich konnte vorgestern den ESP flashen und konnte auch auf die Web Oberfläche zugreifen. Ich war sehr froh, dass das soweit geklappt hat.
Dann wollte ich testweise über die Web-Oberfläche eine MP3 starten, danach kam immer wieder der Fehler „SD-Karte konnte nicht gemountet werden.“
Ich habe alles mögliche probiert und auch mal die Spannung zwischen Pin 10,2 gemessen (0,7V).
Ich habe eigentlich nichts angeschlossen (außer die Boxen). Ich dachte erst, dass mein USB Port zu wenig Leistung bringt und bin dann auf ein Handyladergerät umgestiegen mit über 2A Leistung. Aber wie gesagt, da war es wohl schon defekt.

Ich habe auch bereits den PORT_EXPANDER_ENABLE aktiviert und Board Nummer 7 ausgewählt, gestartet bin ich mit Board 1, und habe einfach alles unberührt gelassen… Vll. war das auch der Fehler.
Erase Flash habe ich auch schon druchgeführt.
SD-Karte nochmal auf Fat32 formatiert habe ich auch nochmal gemacht.

Nach dem ersten Flashen war die SD Karte mit Daten geschrieben, das passiert jetzt nicht mehr.
Dei Frage ist, was ist kaputt, was kann ich noch probieren.

Und die restlichen Settings? Mit PORT_EXPANDER_ENABLE ist es nicht getan.

Was sind Board 7 und 1?

Passt nicht, da müssen 3,3 V sein.

Sorry für meine schlechte Ausführung.
bei Board meinte ich in der setting.h Datei, dass ich bei #define HAL erst 1 jetzt 7 aktiviert habe.
Erst habe ich nichts in an der Software geändert, wie gesagt, da konnte ich wenigstens alles flashen nur beim abspielen, ist dann alles zusammengebrochen.

Aktuell habe ich nur den Neopixel deaktiviert und PORT_EXPANDER_ENABLE aktiviert. Sonst ist alles wie im Vorlageprojekt. Ich habe euch die setting.h Datei mal abgelegt.

Vielen Dank für jede Unterstützung. Ich fühle mich aber ehrlich gesagt ein bisschen planlos, wie man die setting.h Datei einzustellen hat.
Ist es wichtig, die Hardware zu deaktiviere, wenn man keine angeschlossen hat, oder ist es erstmal egal und die Web Oberfläche funktioniert trotzdem.
Wie gesagt, aktuell ist nichts angeschlossen, außer kurzzeitig der Lautsprecher.

Dass die 0.7V nicht passen, was kann ich dann weiter checken?
Auf dem ESP Board, liegen am Pin 3,3V auch wirklich 3,3V an. Das habe ich auch mal gemessen.

aktuelle setting.h.txt (21,5 KB)

OK, ich habe nun die noch diese zwei Punkte angepasst, jetzt scheint es wieder zu funktionieren.

  1. In settings-lolin_d32_pro_sdmmc_pe.h muss POWER von 32 auf 115 geändert werden.
  2. In settings-lolin_d32_pro_sdmmc_pe.h muss INVERT_POWER aktiviert werden.

Danke

2 „Gefällt mir“

den Wert den du da als HAL definiert wird bei Nutzung von VsCode mit PIO ignoriert.

Daher ist die Zeile so leicht dunkler…

Was steht unten alles in der Zeile bei VS Code?

Welchen SD Karten Modus ist ausgewählt?