WROVER resetting with SDMMC_HOST_SLOT_0

czyskows
Posts: 8
Joined: Wed Nov 08, 2017 6:52 am

WROVER resetting with SDMMC_HOST_SLOT_0

Postby czyskows » Sun Oct 21, 2018 1:37 am

I built a board that uses the HS1 pins (SDMMC_HOST_SLOT_0) for an sd card. I'm setting SLOT_0 with:

Code: Select all

void app_main(void)
{
    ESP_LOGI(TAG, "Initializing SD card");

#ifndef USE_SPI_MODE
    ESP_LOGI(TAG, "Using SDMMC peripheral");
    sdmmc_host_t host = SDMMC_HOST_DEFAULT();
    host.slot = SDMMC_HOST_SLOT_0;
    
in sd_card_example_main.c
But every time I do that, I get:

Code: Select all

␛[0;32mI (282) cpu_start: Starting scheduler on PRO CPU.␛[0m
␛[0;32mI (0) cpu_start: Starting scheduler on APP CPU.␛[0m
␛[0;32mI (284) example: Initializing SD card␛[0m
␛[0;32mI (284) example: Using SDMMC peripheral␛[0m
Guru Meditation Error: Core  0 panic'ed (IllegalInstruction). Exception was unhandled.
Core 0 register dump:
PC      : 0x400d1bc0  PS      : 0x00060030  A0      : 0x800d1d4f  A1      : 0x3ffc64b0
A2      : 0x0000000b  A3      : 0x3ff4905c  A4      : 0x00000000  A5      : 0x3ffc85b4
A6      : 0x3ffc2028  A7      : 0x3ffc85c0  A8      : 0x800d1310  A9      : 0x3ffc6490
A10     : 0x0000000b  A11     : 0x00000000  A12     : 0x3ffc8618  A13     : 0x00000000
A14     : 0x00000001  A15     : 0x00000000  SAR     : 0x00000013  EXCCAUSE: 0x00000000
EXCVADDR: 0x00000000  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0xffffffff

Backtrace: 0x400d1bc0:0x3ffc64b0 0x400d1d4c:0x3ffc64e0 0x400d2395:0x3ffc6500 0x400d40ac:0x3ffc6550 0x400d0e29:0x3ffc65a0 0x400d2df
0:0x3ffc6690

Rebooting...
ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x33 (SPI_FAST_FLASH_BOOT)
I'm pretty sure none of the pins I'm in HS1 are used for bootstrapping pins or any type of reset pin. I have 10k pull-ups on all of the HS1 pins. I can't think of what could be wrong. Any ideas?

Thanks!

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: WROVER resetting with SDMMC_HOST_SLOT_0

Postby WiFive » Sun Oct 21, 2018 1:45 am

They are used for the flash chip. The app executes from the flash chip. Already told you that here https://esp32.com/viewtopic.php?f=12&t= ... 347#p32394

czyskows
Posts: 8
Joined: Wed Nov 08, 2017 6:52 am

Re: WROVER resetting with SDMMC_HOST_SLOT_0

Postby czyskows » Sun Oct 21, 2018 2:16 am

Ah - I see. Sorry about that. I guess I'm confused about the discrepancy between functions of the two slots and why they have those pins as SDMMC pins if you can't use them for that purpose. Am I missing something obvious?

Thanks again, and sorry for the repeat question.

"The only stupid questions are the ones not asked and the ones asked twice."

WiFive
Posts: 3529
Joined: Tue Dec 01, 2015 7:35 am

Re: WROVER resetting with SDMMC_HOST_SLOT_0

Postby WiFive » Sun Oct 21, 2018 3:53 am

It is possible to use HS1 for sd/mmc if you put the flash on other pins. The SD_ pin labels are for sdio slave mode in which case you wouldn't have a flash chip. It is definitely not ideal.

czyskows
Posts: 8
Joined: Wed Nov 08, 2017 6:52 am

Re: WROVER resetting with SDMMC_HOST_SLOT_0

Postby czyskows » Sun Oct 21, 2018 4:13 am

I see. It sounds like a redesign is called for. Thanks for the help and the clarification!

Who is online

Users browsing this forum: No registered users and 73 guests