hd_eeprom example dose not work in my ESP8684-DevKitC-02

kwakabayashiss
Posts: 2
Joined: Tue Oct 03, 2023 6:52 am

hd_eeprom example dose not work in my ESP8684-DevKitC-02

Postby kwakabayashiss » Wed Oct 04, 2023 2:38 am

Hi all.

I'm tring to use external SPI flash memory from ESP8684-DevKitC-02.
So I tried hd_eeprom example(https://github.com/espressif/esp-idf/tr ... /hd_eeprom), but error occurred in executing.

I made pins to connect forrowing below sample code.

Code: Select all

#  define PIN_NUM_MISO 2
#  define PIN_NUM_MOSI 7
#  define PIN_NUM_CLK  6
#  define PIN_NUM_CS   10
Is other operation needed before using spi flash from ESP8684-DevKitC-02?
Have you any idea to solve error?

Device : ESP8684-DevKitC-02
SPI flash memory : AT25SF161
ESP-IDF ver : v5.1.1
IDE : VScode v1.82.3
Espressif IDF extention ver : v1.6.4
Output log :

Code: Select all

I (32) boot: ESP-IDF v5.1.1 2nd stage bootloader
I (32) boot: compile time Oct  4 2023 11:07:30
I (32) boot: chip revision: v1.0
I (37) boot.esp32c2: MMU Page Size  : 32K
I (44) boot.esp32c2: SPI Speed      : 60MHz
I (51) boot.esp32c2: SPI Mode       : DIO
I (59) boot.esp32c2: SPI Flash Size : 2MB
I (66) boot: Enabling RNG early entropy source...
I (74) boot: Partition Table:
I (80) boot: ## Label            Usage          Type ST Offset   Length
I (91) boot:  0 nvs              WiFi data        01 02 00009000 00006000
I (102) boot:  1 phy_init         RF data          01 01 0000f000 00001000
I (114) boot:  2 factory          factory app      00 00 00010000 00100000
I (126) boot: End of partition table
I (132) esp_image: segment 0: paddr=00010020 vaddr=3c010020 size=08298h ( 33432) map
I (153) esp_image: segment 1: paddr=000182c0 vaddr=3fcac720 size=017d8h (  6104) load
I (160) esp_image: segment 2: paddr=00019aa0 vaddr=40380000 size=06578h ( 25976) load
I (178) esp_image: segment 3: paddr=00020020 vaddr=42000020 size=0d550h ( 54608) map
I (197) esp_image: segment 4: paddr=0002d578 vaddr=40386578 size=061a0h ( 24992) load
I (207) boot: Loaded app from partition at offset 0x10000
I (208) boot: Disabling RNG early entropy source...
I (232) cpu_start: Unicore app
I (233) cpu_start: Pro cpu up.
I (244) cpu_start: Pro cpu start user code
I (244) cpu_start: cpu freq: 120000000 Hz
I (244) cpu_start: Application information:
I (249) cpu_start: Project name:     spi_eeprom
I (257) cpu_start: App version:      1
I (264) cpu_start: Compile time:     Oct  4 2023 11:07:18
I (273) cpu_start: ELF file SHA256:  324ef739ad7bcd9a...
I (282) cpu_start: ESP-IDF:          v5.1.1
I (290) cpu_start: Min chip rev:     v1.0
I (297) cpu_start: Max chip rev:     v1.99
I (305) cpu_start: Chip rev:         v1.0
I (312) heap_init: Initializing. RAM available for dynamic allocation:
I (323) heap_init: At 3FCAEDB0 len 0002DDC0 (183 KiB): D/IRAM
I (333) heap_init: At 3FCDCB70 len 0000294C (10 KiB): STACK/DRAM
I (344) spi_flash: detected chip: gd
I (350) spi_flash: flash io: dio
W (356) spi_flash: Detected size(4096k) larger than the size in the binary image header(2048k). Using the size in the binary image header.
I (376) sleep: Configure to isolate all GPIO pins in sleep state
I (386) sleep: Enable automatic switching of GPIO sleep configuration
I (397) app_start: Starting scheduler on CPU0
I (405) main_task: Started on CPU0
I (405) main_task: Calling app_main()
I (415) main: Initializing bus SPI2...
I (425) main: Initializing device...
I (425) gpio: GPIO[10]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (445) main: Write: Hello World!
ESP_ERROR_CHECK failed: esp_err_t 0x107 (ESP_ERR_TIMEOUT) at 0x42005654
0x42005654: app_main at C:/Users/kwakabayashi_smartsh/source/esp/hd_eeprom/main/spi_eeprom_main.c:123 (discriminator 1)

file: "./main/spi_eeprom_main.c" line 123
func: app_main
expression: ret

abort() was called at PC 0x403866e7 on core 0
0x403866e7: _esp_error_check_failed at C:/Users/kwakabayashi_smartsh/esp/esp-idf/components/esp_system/esp_err.c:50

Core  0 register dump:
MEPC    : 0x403804ee  RA      : 0x403866f2  SP      : 0x3fcb1570  GP      : 0x3fcacf20
0x403804ee: panic_abort at C:/Users/kwakabayashi_smartsh/esp/esp-idf/components/esp_system/panic.c:452

0x403866f2: __ubsan_include at C:/Users/kwakabayashi_smartsh/esp/esp-idf/components/esp_system/ubsan.c:313

TP      : 0x3fca954c  T0      : 0x37363534  T1      : 0x7271706f  T2      : 0x33323130
S0/FP   : 0x00000004  S1      : 0x3fcb15d4  A0      : 0x3fcb159c  A1      : 0x3fcb15d2
A2      : 0x00000000  A3      : 0x3fcb15c9  A4      : 0x00000001  A5      : 0x3fcaf000
A6      : 0x00000000  A7      : 0x76757473  S2      : 0x00000000  S3      : 0x00000000
S4      : 0x00000000  S5      : 0x00000000  S6      : 0x00000000  S7      : 0x00000000
S8      : 0x00000000  S9      : 0x00000000  S10     : 0x00000000  S11     : 0x00000000
T3      : 0x6e6d6c6b  T4      : 0x6a696867  T5      : 0x66656463  T6      : 0x62613938
MSTATUS : 0x00001881  MTVEC   : 0x40380001  MCAUSE  : 0x00000007  MTVAL   : 0x00000000
0x40380001: _vector_table at ??:?

MHARTID : 0x00000000

Stack memory:
3fcb1570: 0x3c012d58 0x42005658 0x3fcb15d0 0x4038aea0 0x00000000 0x3fcdd460 0x3fcdd584 0x3fcad840
0x42005658: app_main at C:/Users/kwakabayashi_smartsh/source/esp/hd_eeprom/main/spi_eeprom_main.c:127

0x4038aea0: abort at C:/Users/kwakabayashi_smartsh/esp/esp-idf/components/newlib/abort.c:35 (discriminator 3)

3fcb1590: 0x3fcb15d4 0x3fcad85c 0x3fcb15d0 0x726f6261 0x20292874 0x20736177 0x6c6c6163 0x61206465
3fcb15b0: 0x43502074 0x34783020 0x36383330 0x20376536 0x63206e6f 0x2065726f 0x00000030 0x00000000
3fcb15d0: 0x3fcd0030 0x38333034 0x37653636 0x00000000 0x00000000 0x00000000 0x00000000 0x403866ea
0x403866ea: esp_system_abort at C:/Users/kwakabayashi_smartsh/esp/esp-idf/components/esp_system/port/esp_system_chip.c:83

3fcb15f0: 0x00000000 0x00000000 0x00000000 0x42005658 0x00000000 0x00000000 0x00000000 0x00000000
0x42005658: app_main at C:/Users/kwakabayashi_smartsh/source/esp/hd_eeprom/main/spi_eeprom_main.c:127

3fcb1610: 0x00000000 0x00000000 0x00000000 0x3fcb167c 0x3c0124a8 0x3c012428 0x6c6c6548 0x6f57206f
3fcb1630: 0x21646c72 0x00000000 0x3fcdd444 0x00000001 0x0000000a 0x00000002 0x00000001 0x00000007
3fcb1650: 0x00000002 0x00000006 0xffffffff 0xffffffff 0x00000000 0x00000000 0x00000000 0x00000000
3fcb1670: 0x00000020 0x00000000 0x00000000 0x00000000 0x3c012428 0x00000000 0x3c012000 0x4200cefa
0x4200cefa: main_task at C:/Users/kwakabayashi_smartsh/esp/esp-idf/components/freertos/app_startup.c:209 (discriminator 13)

3fcb1690: 0x00000000 0x00001388 0x00000001 0x00000000 0x00000000 0x00000000 0x00000000 0x403889e2
0x403889e2: vPortTaskWrapper at C:/Users/kwakabayashi_smartsh/esp/esp-idf/components/freertos/FreeRTOS-Kernel/portable/riscv/port.c:205

3fcb16b0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fcb16d0: 0x00000000 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0x00000154 0x3fcb14d0 0x00000006
3fcb16f0: 0x3fcae0f4 0x3fcae0f4 0x3fcb16e8 0x3fcae0ec 0x00000018 0x3fcdd6e4 0x3fcdd6e4 0x3fcb16e8
3fcb1710: 0x00000000 0x00000001 0x3fcb08e4 0x6e69616d 0x8c3c1300 0x6d96d9ea 0x00215653 0x00000000
3fcb1730: 0x3fcb16e0 0x00000001 0x00000000 0x00000000 0x00000000 0x00000000 0x3fcaf634 0x3fcaf69c
3fcb1750: 0x3fcaf704 0x00000000 0x00000000 0x00000001 0x00000000 0x00000000 0x00000000 0x4005e58e
3fcb1770: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fcb1790: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fcb17b0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fcb17d0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fcb17f0: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fcb1810: 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000
3fcb1830: 0x00000000 0x00000000 0x3f000000 0x00000600 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fcb1850: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fcb1870: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fcb1890: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fcb18b0: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fcb18d0: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fcb18f0: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fcb1910: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fcb1930: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5
3fcb1950: 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5 0xa5a5a5a5



ELF file SHA256: 324ef739ad7bcd9a

Rebooting...
ESP-ROM:esp8684-api2-20220127
Build:Jan 27 2022
rst:0xc (RTC_SW_CPU_RST),boot:0xc (SPI_FAST_FLASH_BOOT)
Saved PC:0x403806a6
0x403806a6: esp_restart_noos at C:/Users/kwakabayashi_smartsh/esp/esp-idf/components/esp_system/port/soc/esp32c2/system_internal.c:96 (discriminator 1)

SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5c80,len:0x16bc
load:0x403acb70,len:0x974
load:0x403aeb70,len:0x293c
entry 0x403acb70
I (36) boot: ESP-IDF v5.1.1 2nd stage bootloader
I (36) boot: compile time Oct  4 2023 11:07:30
I (36) boot: chip revision: v1.0
I (41) boot.esp32c2: MMU Page Size  : 32K
I (48) boot.esp32c2: SPI Speed      : 60MHz
Thank you.

kwakabayashiss
Posts: 2
Joined: Tue Oct 03, 2023 6:52 am

Re: hd_eeprom example dose not work in my ESP8684-DevKitC-02

Postby kwakabayashiss » Mon Oct 16, 2023 9:35 am

I somehow understood the cause.

The sample was created for the AT932C46D flash memory, and the command system is different to my flash memory, so it may not work as intended.

Who is online

Users browsing this forum: No registered users and 106 guests