Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SD card init failed #3459

Closed
gwgittrash opened this issue Dec 29, 2024 · 10 comments
Closed

SD card init failed #3459

gwgittrash opened this issue Dec 29, 2024 · 10 comments

Comments

@gwgittrash
Copy link

The Problem

I try to install the AI on the Edge Software on my ESP 32. Sadly I always have a problem with die ini-process of the SD Card, ends up in "SD card init failed. Check if SD card is properly inserted into SD card slot or try another card"
I tried 3 different SD Cards, all with 8GB. All formated as FAT32, one partition. I also checked to Note here:
https://jomjol.github.io/AI-on-the-edge-device-docs/Installation/
And followed the discussion here: #2858
I tried manual installation of [16.0.0-RC5], [15.7.0] and [15.4.0] as also the automated installation of 15.7.0....
What can I do?

Version

15.7.0

Logfile

rst:0x1 (POWERON_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:3540
load:0x40078000,len:14712
load:0x40080400,len:4
load:0x40080404,len:3096
entry 0x40080584
I (569) quad_psram: This chip is ESP32-D0WD
I (569) esp_psram: Found 8MB PSRAM device
I (569) esp_psram: Speed: 40MHz
I (569) esp_psram: PSRAM initialized, cache is in low/high (2-core) mode.
W (575) esp_psram: Virtual address not enough for PSRAM, map as much as we can. 4MB is mapped
I (583) cpu_start: Multicore app
I (1467) esp_psram: SPI SRAM memory test OK
I (1476) cpu_start: Pro cpu start user code
I (1476) cpu_start: cpu freq: 160000000 Hz
I (1476) app_init: Application information:
I (1476) app_init: Project name:     AI-on-the-edge
I (1481) app_init: App version:      v16.0.0-RC5
I (1485) app_init: Compile time:     Dec  5 2024 00:08:47
I (1490) app_init: ELF file SHA256:  a94a67001...
I (1495) app_init: ESP-IDF:          5.3.1
I (1498) efuse_init: Min chip rev:     v0.0
I (1502) efuse_init: Max chip rev:     v3.99 
I (1506) efuse_init: Chip rev:         v3.0
I (1511) heap_init: Initializing. RAM available for dynamic allocation:
I (1517) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (1522) heap_init: At 3FFBB4F8 len 00024B08 (146 KiB): DRAM
I (1527) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1533) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1538) heap_init: At 4009AC60 len 000053A0 (20 KiB): IRAM
I (1544) esp_psram: Adding pool of 4081K of PSRAM memory to heap allocator
I (1552) spi_flash: detected chip: gd
I (1553) spi_flash: flash io: dio
W (1558) i2c: This driver is an old driver, please migrate your application code to adapt `driver/i2c_master.h`
I (1578) main_task: Started on CPU0
I (1588) esp_psram: Reserving pool of 40K of internal memory for DMA/internal allocations
I (1588) main_task: Calling app_main()
I (1588) MAIN: 



================ Start app_main =================
E (1628) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
E (1628) vfs_fat_sdmmc: sdmmc_card_init failed (0x107).
E (1628) MAIN: SD card init failed. Check if SD card is properly inserted into SD card slot or try another card
E (1638) MAIN: Device init aborted!
I (1648) main_task: Returned from app_main()

Expected Behavior

No response

Screenshots

No response

Additional Context

No response

@gwgittrash gwgittrash added the bug Something isn't working label Dec 29, 2024
@gwgittrash
Copy link
Author

Additional Info...
It is an ESP32-CAM developer board (Link)
I also tried it with and without connected camera...

@SybexX
Copy link
Collaborator

SybexX commented Dec 29, 2024

It looks like an external 10k pullup is missing. There should be five pullups, but only four can be seen in the pictures.
if you want, you can try the following firmware: https://github.com/SybexX/AI-on-the-edge-device/actions/runs/12534732809
I added a little delay when initializing the SD, maybe that will help you.

@gwgittrash
Copy link
Author

Hi and thank you for your support.
Flashing was successful but the error is still the same
image

`ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_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:3540
load:0x40078000,len:14712
load:0x40080400,len:4
load:0x40080404,len:3096
entry 0x40080584
I (570) quad_psram: This chip is ESP32-D0WD
I (570) esp_psram: Found 8MB PSRAM device
I (571) esp_psram: Speed: 40MHz
I (571) esp_psram: PSRAM initialized, cache is in low/high (2-core) mode.
W (576) esp_psram: Virtual address not enough for PSRAM, map as much as we can. 4MB is mapped
I (584) cpu_start: Multicore app
I (1467) esp_psram: SPI SRAM memory test OK
I (1476) cpu_start: Pro cpu start user code
I (1477) cpu_start: cpu freq: 160000000 Hz
I (1477) app_init: Application information:
I (1477) app_init: Project name: AI-on-the-edge
I (1481) app_init: App version: d1e1c67
I (1485) app_init: Compile time: Dec 29 2024 10:49:50
I (1491) app_init: ELF file SHA256: bb2fd2bdc...
I (1495) app_init: ESP-IDF: 5.3.1
I (1499) efuse_init: Min chip rev: v0.0
I (1503) efuse_init: Max chip rev: v3.99
I (1507) efuse_init: Chip rev: v3.0
I (1511) heap_init: Initializing. RAM available for dynamic allocation:
I (1517) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (1522) heap_init: At 3FFBB530 len 00024AD0 (146 KiB): DRAM
I (1528) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1533) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1539) heap_init: At 4009AC60 len 000053A0 (20 KiB): IRAM
I (1545) esp_psram: Adding pool of 4081K of PSRAM memory to heap allocator
I (1552) spi_flash: detected chip: gd
I (1554) spi_flash: flash io: dio
W (1558) i2c: This driver is an old driver, please migrate your application code to adapt driver/i2c_master.h
I (1579) main_task: Started on CPU0
I (1589) esp_psram: Reserving pool of 40K of internal memory for DMA/internal allocations
I (1589) main_task: Calling app_main()
I (1589) MAIN:

================ Start app_main =================
E (1729) sdmmc_common: sdmmc_init_ocr: send_op_cond (1) returned 0x107
E (1729) vfs_fat_sdmmc: sdmmc_card_init failed (0x107).
E (1729) MAIN: SD card init failed. Check if SD card is properly inserted into SD card slot or try another card
E (1739) MAIN: Device init aborted!
I (1749) main_task: Returned from app_main()`

@SybexX
Copy link
Collaborator

SybexX commented Dec 29, 2024

Do you have a wiring diagram for the board to see if the pinouts even match, I couldn't quickly find one online.

@gwgittrash
Copy link
Author

No, I don't have a wiring diagram. But I made some better pictures for you. maybe that helps?
20241229_124553
20241229_124537

@SybexX
Copy link
Collaborator

SybexX commented Dec 29, 2024

It looks like the gpios are assigned differently, since I found several for the same board and I don't know which one is right, you have to contact the seller or find out by trying around^^
https://github.com/SybexX/AI-on-the-edge-device/actions/runs/12535662398

@gwgittrash
Copy link
Author

I tried the version fron above, but still the same error. In the meandtime I asked the seller to provide a wiring diagram but I also found this thread: https://community.home-assistant.io/t/esp32-camera-ov5640/507409
Could that be helpful?

@gwgittrash
Copy link
Author

Additional Information:
The chip is an ESP32-DOWDQ6-V3, here you will finde the datasheet:
https://www.alldatasheet.com/datasheet-pdf/view/1243004/ESPRESSIF/ESP32-DOWDQ6-V3.html
Which pins are relevant? maybe I could find out more...

@gwgittrash
Copy link
Author

Still no success.. Tried with three 8GB cards.. :(

`ets Jul 29 2019 12:21:46

rst:0x1 (POWERON_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:3540
load:0x40078000,len:14712
load:0x40080400,len:4
load:0x40080404,len:3096
entry 0x40080584
I (570) quad_psram: This chip is ESP32-D0WD
I (570) esp_psram: Found 8MB PSRAM device
I (571) esp_psram: Speed: 40MHz
I (571) esp_psram: PSRAM initialized, cache is in low/high (2-core) mode.
W (576) esp_psram: Virtual address not enough for PSRAM, map as much as we can. 4MB is mapped
I (584) cpu_start: Multicore app
I (1468) esp_psram: SPI SRAM memory test OK
I (1477) cpu_start: Pro cpu start user code
I (1477) cpu_start: cpu freq: 160000000 Hz
I (1477) app_init: Application information:
I (1477) app_init: Project name: AI-on-the-edge
I (1482) app_init: App version: 1482a55
I (1486) app_init: Compile time: Dec 29 2024 15:17:04
I (1491) app_init: ELF file SHA256: 9253d8ded...
I (1495) app_init: ESP-IDF: 5.3.1
I (1499) efuse_init: Min chip rev: v0.0
I (1503) efuse_init: Max chip rev: v3.99
I (1507) efuse_init: Chip rev: v3.0
I (1511) heap_init: Initializing. RAM available for dynamic allocation:
I (1517) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (1523) heap_init: At 3FFBB530 len 00024AD0 (146 KiB): DRAM
I (1528) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1533) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1539) heap_init: At 4009AC60 len 000053A0 (20 KiB): IRAM
I (1545) esp_psram: Adding pool of 4081K of PSRAM memory to heap allocator
I (1552) spi_flash: detected chip: gd
I (1554) spi_flash: flash io: dio
W (1559) i2c: This driver is an old driver, please migrate your application code to adapt driver/i2c_master.h
I (1579) main_task: Started on CPU0
I (1589) esp_psram: Reserving pool of 40K of internal memory for DMA/internal allocations
I (1589) main_task: Calling app_main()
I (1589) MAIN:

================ Start app_main =================
E (1709) vfs_fat_sdmmc: slot init failed (0x102).
E (1709) MAIN: SD card init failed. Check error code or try another card
E (1709) MAIN: Device init aborted!
I (1709) main_task: Returned from app_main()`

@SybexX
Copy link
Collaborator

SybexX commented Dec 29, 2024

https://github.com/SybexX/AI-on-the-edge-device/actions/runs/12537536722

It's about these GPIOs, either something doesn't fit or because the IP5306 is connected to the two GPIOs.
IO-Configuration2

https://docs.espressif.com/projects/esp-idf/en/stable/esp32/api-reference/error-codes.html

@caco3 caco3 removed the bug Something isn't working label Dec 29, 2024
Repository owner locked and limited conversation to collaborators Dec 29, 2024
@caco3 caco3 converted this issue into discussion #3461 Dec 29, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants