jomjol / AI-on-the-edge-device

Easy to use device for connecting "old" measuring units (water, power, gas, ...) to the digital world
https://jomjol.github.io/AI-on-the-edge-device-docs/
5.67k stars 612 forks source link

Problem mit SD karte #169

Closed stener2009 closed 3 years ago

stener2009 commented 3 years ago

Hallo, Bis jetzt lief bei mir alles Problemlos fast ein Jahr lang. vor ein paar tagen hatten wir einen Stromausfall und danach war der Wasserzähler nicht mehr erreichbar. Ich habe einen neue ESP32 aufgesetzt, die alte SD Karte hinein gesteckt und alles wider eingebaut. Das erste Foto war natürlich unscharf da ich den Focus nicht eingestellt habe, also alles ausbauen und Focus einstellen. Danach ging nichts mehr. Bisherige System war bei mir mit einer 32GB SD-Karte, ja es lief die ganze zeit ohne irgendwelche Problem. Um es auszuschließen das es an der SD-Karte liegt, habe ich eine 2GB SD-Karte genommen und es war der selbe Effekt.

grafik

wenn ich jetzt die SD-Karte aus dem laufenden System herausziehe und wieder einstecke boote es normal bis zum nächsten Neustart.

hat jemand eine Idee?

jomjol commented 3 years ago

Es gibt einige SD-Karten, die seit einer Änderung sehr empfindlich reagieren. Ich habe gerade eine neue Version (v6.6.0) hochgeladen, die einen verbesserten Zugriff auf die SD-Karte hat. Bitte teste diese Mal, ob das dein Problem, wie bei anderen Usern auch, löst. Wenn nicht, bitte gerne einen Screenshot vom Bootvorgang.

Danke und Gruß, jomjol

stener2009 commented 3 years ago

Habe die Version 6.60 getestet. Bei einem kaltstart (Spannungsversorgung einschalten) startet das System fehlerfrei. Macht man aber eine Reset per Software oder Taster bleibt das System in einer endlos schleife hängen.

Ich habe mir mal das SD-Card interface angesen und mir ist aufgefallen das der Pull-Up Widerstand an der Data 2 Leitung nicht bestückt ist. Nutzt du die SD-Card im SPI Modus oder mit den 4 Datenbit im SD Modus?

I (91614) server_ota: !!! System will restart within 5 sec!!! E (96634) TRANS_TCP: tcp_poll_read select error 113, errno = Software caused connection abort, fd = 57 I (96634) gpio: GPIO[33]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 E (96634) MQTT_CLIENT: Poll read error: 0, aborting connection I (96644) interface_mqtt: MQTT_EVENT_DISCONNECTED ets Jun 8 2016 00:22:57

rst:0xc (SW_CPU_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:2 load:0x3fff0030,len:4 load:0x3fff0034,len:7248 ho 0 tail 12 room 4 load:0x40078000,len:13856 load:0x40080400,len:4052 entry 0x40080688 I (31) boot: ESP-IDF 3.40100.200827 2nd stage bootloader I (31) boot: compile time 20:53:43 I (31) boot: chip revision: 1 I (34) boot_comm: chip revision: 1, min. bootloader chip revision: 0 I (41) boot.esp32: SPI Speed : 40MHz I (46) boot.esp32: SPI Mode : DIO I (51) boot.esp32: SPI Flash Size : 4MB I (55) boot: Enabling RNG early entropy source... I (61) boot: Partition Table: I (64) boot: ## Label Usage Type ST Offset Length I (71) boot: 0 nvs WiFi data 01 02 00009000 00004000 I (79) boot: 1 otadata OTA data 01 00 0000d000 00002000 I (86) boot: 2 phy_init RF data 01 01 0000f000 00001000 I (94) boot: 3 ota_0 OTA app 00 10 00010000 001db000 I (101) boot: 4 ota_1 OTA app 00 11 001f0000 001db000 I (109) boot: End of partition table I (113) boot_comm: chip revision: 1, min. application chip revision: 0 I (120) esp_image: segment 0: paddr=0x001f0020 vaddr=0x3f400020 size=0x4cddc (314844) map I (266) esp_image: segment 1: paddr=0x0023ce04 vaddr=0x3ffb0000 size=0x03214 ( 12820) load I (272) esp_image: segment 2: paddr=0x00240020 vaddr=0x400d0020 size=0x15f8f4 (1439988) map I (896) esp_image: segment 3: paddr=0x0039f91c vaddr=0x3ffb3214 size=0x01f2c ( 7980) load I (900) esp_image: segment 4: paddr=0x003a1850 vaddr=0x40080000 size=0x00404 ( 1028) load I (903) esp_image: segment 5: paddr=0x003a1c5c vaddr=0x40080404 size=0x1ee40 (126528) load I (990) boot: Loaded app from partition at offset 0x1f0000 I (991) boot: Disabling RNG early entropy source... I (991) psram: This chip is ESP32-D0WD I (997) spiram: Found 64MBit SPI RAM device I (1000) spiram: SPI RAM mode: flash 40m sram 40m I (1006) spiram: PSRAM initialized, cache is in low/high (2-core) mode. I (1013) cpu_start: Pro cpu up. I (1017) cpu_start: Application information: I (1022) cpu_start: Project name: esp32cam-server-only I (1028) cpu_start: App version: 0.0.9.3 I (1033) cpu_start: Compile time: Mar 28 2021 20:09:35 I (1039) cpu_start: ELF file SHA256: c0935a69ab1cdc19... I (1045) cpu_start: ESP-IDF: 3.40100.200827 I (1051) cpu_start: Starting app cpu, entry point is 0x40081c2c I (1042) cpu_start: App cpu up. I (1943) spiram: SPI SRAM memory test OK I (1943) heap_init: Initializing. RAM available for dynamic allocation: I (1943) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM I (1949) heap_init: At 3FFC2B00 len 0001D500 (117 KiB): DRAM I (1956) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM I (1962) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM I (1969) heap_init: At 4009F244 len 00000DBC (3 KiB): IRAM I (1975) cpu_start: Pro cpu start user code I (1980) spiram: Adding pool of 4096K of external SPI memory to heap allocator I (2005) spi_flash: detected chip: generic I (2006) spi_flash: flash io: dio I (2006) cpu_start: Starting scheduler on PRO CPU. I (0) cpu_start: Starting scheduler on APP CPU. I (2014) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations Do Reset Camera I (2024) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 Init Camera I (4034) gpio: GPIO[5]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (4034) gpio: GPIO[18]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (4034) gpio: GPIO[19]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (4044) gpio: GPIO[21]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (4054) gpio: GPIO[22]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (4064) gpio: GPIO[23]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (4074) gpio: GPIO[25]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (4084) gpio: GPIO[34]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (4094) gpio: GPIO[35]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (4104) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (4114) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0 I (4124) sccb: pin_sda 26 pin_scl 27

I (4124) gpio: GPIO[32]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 I (4274) camera: Detected OV2640 camera I (4274) camera: Allocating 1 frame buffers (150 KB total) I (4294) camera: Allocating 150 KB frame buffer in OnBoard RAM I (4894) server-main: Using SDMMC peripheral E (4914) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107 E (4914) server-main: Failed to initialize the card (ESP_ERR_TIMEOUT). Make sure SD card lines have pull-up resistors in place. I (4924) server_ota: Start CheckOTAUpdateCheck ... Start CheckOTAUpdateCheck ... I (4944) server_ota: SHA-256 for the partition table: : 9d4a2809ae90fb20709a8ca3dd3ac3462e1e73286bcd31b689060c91de06fa3a I (5004) server_ota: SHA-256 for bootloader: : 50bdcb197ae5082dd07104add70b14ad7a8df62c91351926958e1fabeb7e5894 I (5734) server_ota: SHA-256 for current firmware: : d9ec16189fc6579401d4e429e6f0d7b6fa93cbd194120b812bfb65856236c6f8 CheckOTAUpdate Partition: ESP_OK File is locked: /sdcard/wlan.ini - wait for 1 Logfile opened: /sdcard/▒;▒?2021-04-01.txt ▒K▒?H▒▒?▒:▒?T▒;▒?▒K▒?H▒▒?T▒@▒:▒?▒▒E!▒0;▒?▒K▒?▒A?-01.txt CORRUPT HEAP: multi_heap.c:194 detected at 0x3ffc3a80 abort() was called at PC 0x4009343e on core 0

ELF file SHA256: c0935a69ab1cdc19

Backtrace: 0x4008e3d5:0x3ffc3f50 0x4008e771:0x3ffc3f70 0x4009343e:0x3ffc3f90 0x400939b5:0x3ffc3fb0 0x40085146:0x3ffc3fd0 0x40096bed:0x3ffc3ff0 0x401625ed:0x3ffc4010 0x400f5971:0x3ffc4030 0x400f4b79:0x3ffc40e0 0x400ddebe:0x3ffc4190 0x400d2e97:0x3ffc49a0 0x400e5940:0x3ffc4a80 0x4008fd59:0x3ffc4aa0

Rebooting...

stener2009 commented 3 years ago

Nachtrag: 2GB SD Card habe den Pullup Widerstand (R7) an der SD-Card nachbestückt, ohne Erfolg, der Fehler bleibt. habe ebenfalls einen 470µF Elko an die 5V als auch an die 3,3V angeschlossen, bringt leider auch keine Verbesserung.

32GB SD Card hier hat der Pull up und der 470µF Elko an der 5V geholfen, das System startet nach einem Software-Reset problemlos

jomjol commented 3 years ago

Ich verwende den 1-line Modus, da einige Nutzer den GPIO12 und 13 noch für andere Dinge benötigen.

stener2009 commented 3 years ago

Ok dann wird der Pullup Widerstand erst mal nicht viel ausmachen. Für die 32GB SD wird dann die bessere Versorgungsspannung entscheiden sein.

stener2009 commented 3 years ago

Eine allgemeine Frage an alle..

was halltet Ihr davon wenn es eine optimale Hardware gibt? ich bin am überlegen eine zu entwickeln

was gibt es sonst noch für wünsche?

jomjol commented 3 years ago

Gute Idee - aber es muss halt sehr einfach und günstig zu bekommen sein, auch für User, die nicht löten wollen. Die ESP32-CAM mit SD-Karte und OV2640 bekomme ich für ca. 5 EUR in China momentan.

stener2009 commented 3 years ago

Na ja, 5€ aus China werden ich nicht mit hinkommen. Wenn das ganze eine ordentliches Stromversorgung bekommt, zwei Relais die auch mal 230V schalten können ein eMMC und mehr RAM.... werden wir so zwischen 10 - 20€ liegen je nachdem wie viele und ob Fertigung in DE oder CN

Das ganze wird dann eine fertige Baugruppe so wie es das ESP32-CAM nur optimal für unsere Anwendung.

lass uns einfach mal Ideen sammeln...

jomjol commented 3 years ago

Klar - lass uns mal sammeln. Willst du nicht einen neuen Issue mit passendem Titel starten?

Dann wird es auch besser gefunden