espressif / esp-adf

Espressif Audio Development Framework
Other
1.55k stars 687 forks source link

Running the wwe example on ESP32-LyraT V4.3 keeps rebooting(在ESP32-LyraT V4.3上运行wwe示例不断重启) (AUD-4094) #888

Closed chenjingyuanku closed 2 years ago

chenjingyuanku commented 2 years ago

Environment

Problem Description

// Detailed problem description goes here.

Expected Behavior

Run the wwe example program correctly

Actual Behavior

The program crashes when it reaches multinet->set_speech_commands(model_data, esp_mn_root)(esp_mn_commands_update function in esp_mn_speech_commands.c).

Steps to Reproduce

  1. Copy esp-adf\examples\speech_recognition\wwe to workspace.
  2. Use sdkconfig.defaults.esp32 to replace sdkconfig.defaults.
  3. Open menuconfig (Vscode ESP-IDF plugin gear icon on status bar).
  4. Set Audio Board to ESP32-Lyrat V4.3.
  5. Enable use multinet.
  6. Set Chinese Speech Commands Model to chinese single recognition(mn2_cn).

image

Debug Logs

ets Jun  8 2016 00:22:57

rst:0xc (SW_CPU_RESET),boot:0x1f (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:1
load:0x3fff0030,len:6960
load:0x40078000,len:15520
load:0x40080400,len:4492
0x40080400: _init at ??:?

entry 0x400806b4
I (27) boot: ESP-IDF v4.4.1-dirty 2nd stage bootloader
I (27) boot: compile time 19:20:29
I (27) boot: chip revision: 1
I (30) boot_comm: chip revision: 1, min. bootloader chip revision: 0
I (37) qio_mode: Enabling default flash chip QIO
I (43) boot.esp32: SPI Speed      : 80MHz
I (47) boot.esp32: SPI Mode       : QIO
I (52) boot.esp32: SPI Flash Size : 4MB
I (56) boot: Enabling RNG early entropy source...
I (62) boot: Partition Table:
I (65) boot: ## Label            Usage          Type ST Offset   Length
I (73) boot:  0 nvs              WiFi data        01 02 00009000 00004000
I (80) boot:  1 otadata          OTA data         01 00 0000d000 00002000
I (88) boot:  2 phy_init         RF data          01 01 0000f000 00001000
I (95) boot:  3 ota_0            OTA app          00 10 00010000 00300000
I (103) boot:  4 flash_tone       Unknown data     01 27 00310000 00032000
I (110) boot: End of partition table
I (114) boot_comm: chip revision: 1, min. application chip revision: 0
I (122) esp_image: segment 0: paddr=00010020 vaddr=3f400020 size=179818h (1546264) map
I (556) esp_image: segment 1: paddr=00189840 vaddr=3ffb0000 size=0294ch ( 10572) load
I (560) esp_image: segment 2: paddr=0018c194 vaddr=40080000 size=03e84h ( 16004) load
I (567) esp_image: segment 3: paddr=00190020 vaddr=400d0020 size=79each (499372) map
I (708) esp_image: segment 4: paddr=00209ed4 vaddr=40083e84 size=0fa9ch ( 64156) load
I (729) esp_image: segment 5: paddr=00219978 vaddr=50000000 size=00010h (    16) load
I (739) boot: Loaded app from partition at offset 0x10000
I (739) boot: Disabling RNG early entropy source...
I (752) psram: This chip is ESP32-D0WD
I (752) spiram: Found 64MBit SPI RAM device
I (752) spiram: SPI RAM mode: flash 80m sram 80m
I (755) spiram: PSRAM initialized, cache is in low/high (2-core) mode.
I (762) cpu_start: Pro cpu up.
I (766) cpu_start: Starting app cpu, entry point is 0x400816e4
0x400816e4: call_start_cpu1 at D:/Espressif/frameworks/esp-idf-v4.4.1/components/esp_system/port/cpu_start.c:160

I (759) cpu_start: App cpu up.
I (1245) spiram: SPI SRAM memory test OK
I (1253) cpu_start: Pro cpu start user code
I (1253) cpu_start: cpu freq: 240000000
I (1253) cpu_start: Application information:
I (1256) cpu_start: Project name:     example_wwe
I (1261) cpu_start: App version:      1
I (1266) cpu_start: Compile time:     Sep 16 2022 19:20:12
I (1272) cpu_start: ELF file SHA256:  22f2a9a7ab3785ba...
I (1278) cpu_start: ESP-IDF:          v4.4.1-dirty
I (1283) heap_init: Initializing. RAM available for dynamic allocation:
I (1291) heap_init: At 3FFAE6E0 len 00001920 (6 KiB): DRAM
I (1297) heap_init: At 3FFB49C0 len 0002B640 (173 KiB): DRAM
I (1303) heap_init: At 3FFE0440 len 00003AE0 (14 KiB): D/IRAM
I (1309) heap_init: At 3FFE4350 len 0001BCB0 (111 KiB): D/IRAM
I (1316) heap_init: At 40093920 len 0000C6E0 (49 KiB): IRAM
I (1322) spiram: Adding pool of 4095K of external SPI memory to heap allocator
I (1331) spi_flash: detected chip: generic
I (1335) spi_flash: flash io: qio
I (1340) cpu_start: Starting scheduler on PRO CPU.
I (0) cpu_start: Starting scheduler on APP CPU.
I (1350) spiram: Reserving pool of 32K of internal memory for DMA/internal allocations
W (1360) AUIDO_MEM: Can't support stack on external memory due to ESP32 chip is 1
I (1370) gpio: GPIO[36]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:3 
I (1380) gpio: GPIO[39]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:3
I (1390) gpio: GPIO[19]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:3 
W (1410) PERIPH_TOUCH: _touch_init
E (1410) gpio: gpio_install_isr_service(449): GPIO isr service already installed
I (1420) gpio: GPIO[21]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0 
I (1420) ES8388_DRIVER: init,out:02, in:00
W (1430) AUDIO_BOARD: The board has already been initialized!
W (1440) AUIDO_MEM: Can't support stack on external memory due to ESP32 chip is 1

----------------------------- ESP Audio Platform -----------------------------
|                                                                            |
|                       ESP_AUDIO-v1.7.1-4717e99-42c05f5                     |
|                     Compile date: Aug 24 2022-06:30:53                     |
------------------------------------------------------------------------------
I (1480) LYRAT_V4_3: I2S0, MCLK output by GPIO0
I (1490) wwe_example: Func:setup_player, Line:142, MEM Total:4426215 Bytes, Inter:308419 Bytes, Dram:259659 Bytes

I (1500) wwe_example: esp_audio instance is:0x3f800b44

E (1500) I2S: register I2S object to platform failed
I (1520) LYRAT_V4_3: I2S0, MCLK output by GPIO0
W (1520) AUIDO_MEM: Can't support stack on external memory due to ESP32 chip is 1
I (1530) wwe_example: Recorder has been created
I (1530) AFE_SR: afe interface for speech recognition

I (1530) AFE_SR: AFE version: SR_V220727

I (1540) AFE_SR: Initial auido front-end, total channel: 2, mic num: 1, ref num: 1

I (1540) AFE_SR: aec_init: 0, se_init: 1, vad_init: 1

I (1550) AFE_SR: wakenet_init: 1

Deprecated Quantized wakenet5: wakeNet5_v1_hilexin_5_0.95_0.90, mode:0 (Aug 17 2022 20:20:31)
Please switch to ESP32-S3 and wakenet9 !
I (1670) AFE_SR: wake num: 1, mode: 1, (Aug 17 2022 20:20:31)

SINGLE_RECOGNITION: v2; (Aug 17 2022 20:20:31)
W (1670) MN: MultiNet may cause WatchDog on ESP32 sometimes!
esp_mn_commands_update_from_sdkconfig
I (1690) MN_COMMAND: ---------------------SPEECH COMMANDS---------------------
I (1690) MN_COMMAND: Command ID0, phrase ID0: da kai kong tiao
I (1690) MN_COMMAND: Command ID1, phrase ID1: guan bi kong tiao
I (1700) MN_COMMAND: Command ID2, phrase ID2: zeng da feng su
I (1700) MN_COMMAND: Command ID3, phrase ID3: jian xiao feng su
I (1710) MN_COMMAND: Command ID4, phrase ID4: sheng gao yi du
I (1720) MN_COMMAND: Command ID5, phrase ID5: jiang di yi du
I (1720) MN_COMMAND: Command ID6, phrase ID6: zhi re mo shi
I (1740) MN_COMMAND: Command ID7, phrase ID7: zhi leng mo shi
I (1740) MN_COMMAND: Command ID8, phrase ID8: song feng mo shi
I (1740) MN_COMMAND: Command ID9, phrase ID9: jie neng mo shi
I (1750) MN_COMMAND: Command ID10, phrase ID10: chu shi mo shi
I (1750) MN_COMMAND: Command ID11, phrase ID11: jian kang mo shi
I (1760) MN_COMMAND: Command ID12, phrase ID12: shui mian mo shi
I (1770) MN_COMMAND: Command ID13, phrase ID13: da kai lan ya
I (1770) MN_COMMAND: Command ID14, phrase ID14: guan bi lan ya
I (1790) MN_COMMAND: Command ID15, phrase ID15: kai shi bo fang
I (1790) MN_COMMAND: Command ID16, phrase ID16: zan ting bo fang
I (1790) MN_COMMAND: Command ID17, phrase ID17: ding shi yi xiao shi
I (1800) MN_COMMAND: Command ID18, phrase ID18: da kai dian deng
I (1810) MN_COMMAND: Command ID19, phrase ID19: guan bi dian deng
I (1810) MN_COMMAND: ---------------------------------------------------------

Guru Meditation Error: Core  0 panic'ed (InstructionFetchError). Exception was unhandled.

Core  0 register dump:
PC      : 0x3f40eca8  PS      : 0x00060430  A0      : 0x800f076a  A1      : 0x3ffb77c0
A2      : 0x3f81c7a8  A3      : 0x3ffc97a0  A4      : 0x3f40e86c  A5      : 0x3f40e954  
A6      : 0x00000003  A7      : 0xff000000  A8      : 0x800f041d  A9      : 0x3f40ef78
A10     : 0x3ffc97a0  A11     : 0x3f81c7a8  A12     : 0x3f40e98c  A13     : 0x00000712  
A14     : 0x3f40e86c  A15     : 0x3ffb7780  SAR     : 0x00000004  EXCCAUSE: 0x00000002  
EXCVADDR: 0x3f40eca8  LBEG    : 0x40089e81  LEND    : 0x40089e91  LCOUNT  : 0xfffffffd
0x40089e81: strlen at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/newlib/newlib/libc/machine/xtensa/strlen.S:84

0x40089e91: strlen at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32-elf/src/newlib/newlib/libc/machine/xtensa/strlen.S:96

Backtrace:0x3f40eca5:0x3ffb77c0 |<-CORRUPTED

ELF file SHA256: 22f2a9a7ab3785ba
jason-mao commented 2 years ago

@chenjingyuanku Thanks for your report, let us check then reply.

harryoceana commented 2 years ago

LyraT-mini v1.2 我也遇到了这个问题,错误位置也是这个 Guru Meditation Error: Core 0 panic'ed (InstructionFetchError). Exception was unhandled.

Core 0 register dump: PC : 0x3f40f440 PS : 0x00060930 A0 : 0x800f06aa A1 : 0x3ffb7810
A2 : 0x3f81f9d0 A3 : 0x3ffe27a0 A4 : 0x3f40ef94 A5 : 0x3f40f07c
A6 : 0x00000003 A7 : 0xff000000 A8 : 0x800f0331 A9 : 0x3f40f708
A10 : 0x3ffe27a0 A11 : 0x3f81f9d0 A12 : 0x3f40f0b4 A13 : 0x000008de
A14 : 0x3f40ef94 A15 : 0x3ffb77d0 SAR : 0x00000004 EXCCAUSE: 0x00000002
EXCVADDR: 0x3f40f440 LBEG : 0x40089cc9 LEND : 0x40089cd9 LCOUNT : 0xfffffffd
**0x40089cc9: strlen at /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/src/newlib/newlib/libc/machine/xtensa/strlen.S:84

0x40089cd9: strlen at /builds/idf/crosstool-NG/.build/xtensa-esp32-elf/src/newlib/newlib/libc/machine/xtensa/strlen.S:96**

Backtrace: 0x3f40f43d:0x3ffb7810 |<-CORRUPTED ELF file SHA256: 118d9bbe78e0880c