Skip to content
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

when detected voice,wwe_example will crash in esp32p4 board. (AUD-5862) #1317

Open
GeneKong opened this issue Nov 14, 2024 · 1 comment
Open

Comments

@GeneKong
Copy link

GeneKong commented Nov 14, 2024

Environment

  • Audio development kit: [ESP32P4]

Problem Description

  • When testing the wwe_example case, the system restarts whenever sound is detected, without any additional log output. I noticed that the test case description mentions that it will trigger a WDT (Watchdog Timer) issue, but it does not describe how to resolve it. What principles should be followed to solve this kind of problem?

Debug Logs

I (16795) wwe_example: rec_engine_cb - REC_EVENT_WAKEUP_START
I (16805) wwe_example: wakeup: vol -44.331940, mod idx 1, word idx 1
I (16805) CODEC_ELEMENT_HELPER: The element is 0x4800385c. The reserve data 2 is 0x0.
ESP-ROM:esp32p4-eco1-20240205
Build:Feb  5 2024
rst:0x7 (HP_SYS_HP_WDT_RESET),boot:0x30f (SPI_FAST_FLASH_BOOT)
Core0 Saved PC:0x4ff00108
--- 0x4ff00108: _panic_handler at D:/RD/TEST/esp32p4/esp-adf/esp-idf/components/riscv/vectors.S:134

Core1 Saved PC:0x4ff00138
--- 0x4ff00138: _panic_handler at D:/RD/TEST/esp32p4/esp-adf/esp-idf/components/riscv/vectors.S:134

SPI mode:DIO, clock div:1
load:0x4ff33ce0,len:0x1954
load:0x4ff2abd0,len:0xdf0
load:0x4ff2cbd0,len:0x30d4
entry 0x4ff2abda
I (33) boot: ESP-IDF v5.3.1-3-ga901d7410f 2nd stage bootloader
I (33) boot: compile time Nov 14 2024 21:07:22
I (34) boot: Multicore bootloader
I (38) boot: chip revision: v0.1
I (41) qio_mode: Enabling default flash chip QIO
I (46) boot.esp32p4: SPI Speed      : 80MHz
I (51) boot.esp32p4: SPI Mode       : QIO
I (56) boot.esp32p4: SPI Flash Size : 16MB
W (61) boot.esp32p4: CPU has been reset by WDT.
I (66) boot: Enabling RNG early entropy source...
I (71) boot: Partition Table:
I (75) boot: ## Label            Usage          Type ST Offset   Length
I (82) boot:  0 nvs              WiFi data        01 02 00009000 00004000
I (90) boot:  1 otadata          OTA data         01 00 0000d000 00002000
I (97) boot:  2 phy_init         RF data          01 01 0000f000 00001000
I (105) boot:  3 ota_0            OTA app          00 10 00010000 00290000
I (112) boot:  4 model            Unknown data     01 82 002a0000 00500000
I (120) boot:  5 flash_tone       Unknown data     01 27 007a0000 00032000
I (128) boot: End of partition table
I (132) esp_image: segment 0: paddr=00010020 vaddr=400b0020 size=3da08h (252424) map
I (178) esp_image: segment 1: paddr=0004da30 vaddr=30100000 size=00020h (    32) load
I (180) esp_image: segment 2: paddr=0004da58 vaddr=30100020 size=0003ch (    60) load
I (185) esp_image: segment 3: paddr=0004da9c vaddr=4ff00000 size=0257ch (  9596) load
I (195) esp_image: segment 4: paddr=00050020 vaddr=40000020 size=ad66ch (710252) map
I (307) esp_image: segment 5: paddr=000fd694 vaddr=4ff0257c size=0f548h ( 62792) load
I (319) esp_image: segment 6: paddr=0010cbe4 vaddr=4ff11b00 size=04d34h ( 19764) load
I (328) boot: Loaded app from partition at offset 0x10000
I (329) boot: Disabling RNG early entropy source...
I (341) hex_psram: vendor id    : 0x0d (AP)
I (341) hex_psram: Latency      : 0x01 (Fixed)
I (341) hex_psram: DriveStr.    : 0x00 (25 Ohm)
I (345) hex_psram: dev id       : 0x03 (generation 4)
I (350) hex_psram: density      : 0x07 (256 Mbit)
I (356) hex_psram: good-die     : 0x06 (Pass)
I (361) hex_psram: SRF          : 0x02 (Slow Refresh)
I (366) hex_psram: BurstType    : 0x00 ( Wrap)
I (372) hex_psram: BurstLen     : 0x03 (2048 Byte)
I (377) hex_psram: BitMode      : 0x01 (X16 Mode)
I (382) hex_psram: Readlatency  : 0x04 (14 cycles@Fixed)
I (388) hex_psram: DriveStrength: 0x00 (1/1)
I (394) MSPI DQS: tuning success, best phase id is 2
I (577) MSPI DQS: tuning success, best delayline id is 12
I (578) esp_psram: Found 32MB PSRAM device
I (578) esp_psram: Speed: 200MHz
I (581) hex_psram: psram CS IO is dedicated
I (585) cpu_start: Multicore app
I (1495) esp_psram: SPI SRAM memory test OK
W (1504) clk: esp_perip_clk_init() has not been implemented yet
I (1511) cpu_start: Pro cpu start user code
I (1511) cpu_start: cpu freq: 360000000 Hz
I (1511) app_init: Application information:
I (1514) app_init: Project name:     example_wwe
I (1519) app_init: App version:      1
I (1524) app_init: Compile time:     Nov 14 2024 21:07:12
I (1530) app_init: ELF file SHA256:  84d7d92c3...
I (1535) app_init: ESP-IDF:          v5.3.1-3-ga901d7410f
I (1541) efuse_init: Min chip rev:     v0.1
I (1546) efuse_init: Max chip rev:     v0.99
I (1551) efuse_init: Chip rev:         v0.1
I (1556) heap_init: Initializing. RAM available for dynamic allocation:
I (1563) heap_init: At 4FF18BF0 len 000223D0 (136 KiB): RAM
I (1569) heap_init: At 4FF3AFC0 len 00004BF0 (18 KiB): RAM
I (1575) heap_init: At 4FF40000 len 00060000 (384 KiB): RAM
I (1582) heap_init: At 50108080 len 00007F80 (31 KiB): RTCRAM
I (1588) heap_init: At 3010005C len 00001FA4 (7 KiB): TCM
I (1594) esp_psram: Adding pool of 32768K of PSRAM memory to heap allocator
I (1603) spi_flash: detected chip: generic
I (1607) spi_flash: flash io: qio
I (1611) host_init: ESP Hosted : Host chip_ip[18]
I (1644) H_API: ESP-Hosted starting. Hosted_Tasks: prio:23, stack: 5120 RPC_task_stack: 5120
sdio_mempool_create free:33721852 min-free:33721852 lfb-def:33030144 lfb-8bit:33030144

I (1651) gpio: GPIO[18]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1660) gpio: GPIO[19]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1669) gpio: GPIO[14]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1678) gpio: GPIO[15]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1688) gpio: GPIO[16]| InputEn: 0| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:0
I (1697) gpio: GPIO[17]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
I (1707) H_API: ** add_esp_wifi_remote_channels **
I (1712) transport: Add ESP-Hosted channel IF[1]: S[0] Tx[0x4000bf3a] Rx[0x40017d6a]
--- 0x4000bf3a: transport_drv_sta_tx at O:/esp32p4/wwe/managed_components/espressif__esp_hosted/host/drivers/transport/transport_drv.c:211
0x40017d6a: esp_wifi_remote_channel_rx at O:/esp32p4/wwe/managed_components/espressif__esp_wifi_remote/esp_wifi_remote_net.c:19

I (1720) transport: Add ESP-Hosted channel IF[2]: S[0] Tx[0x4000be80] Rx[0x40017d6a]
--- 0x4000be80: transport_drv_ap_tx at O:/esp32p4/wwe/managed_components/espressif__esp_hosted/host/drivers/transport/transport_drv.c:241
0x40017d6a: esp_wifi_remote_channel_rx at O:/esp32p4/wwe/managed_components/espressif__esp_wifi_remote/esp_wifi_remote_net.c:19

I (1729) esp_core_dump_uart: Init core dump to UART
I (1735) main_task: Started on CPU0
I (1745) esp_psram: Reserving pool of 32K of internal memory for DMA/internal allocations
I (1745) main_task: Calling app_main()
I (1755) gpio: GPIO[26]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:3
I (1765) gpio: GPIO[32]| InputEn: 1| OutputEn: 0| OpenDrain: 0| Pullup: 1| Pulldown: 0| Intr:3
W (1775) i2c_bus_v2: I2C master handle is NULL, will create new one
I (1775) gpio: GPIO[7]| InputEn: 1| OutputEn: 1| OpenDrain: 1| Pullup: 1| Pulldown: 0| Intr:0
I (1785) gpio: GPIO[8]| InputEn: 1| OutputEn: 1| OpenDrain: 1| Pullup: 1| Pulldown: 0| Intr:0
I (1805) DRV8311: ES8311 in Slave mode
I (1815) gpio: GPIO[53]| InputEn: 0| OutputEn: 1| OpenDrain: 0| Pullup: 0| Pulldown: 0| Intr:0
W (1815) AUDIO_BOARD: The board has already been initialized!

----------------------------- ESP Audio Platform -----------------------------
|                                                                            |
|                 ESP_AUDIO-v1.8.0-10-g0cdd7ac-017893b-58c87be               |
|                     Compile date: Sep 27 2024-03:11:16                     |
------------------------------------------------------------------------------
W (1855) i2s_common: dma frame num is adjusted to 320 to align the dma buffer with 64, bufsize = 1280
I (1865) wwe_example: Func:setup_player, Line:141, MEM Total:34025024 Bytes, Inter:518563 Bytes, Dram:518563 Bytes, Dram largest free:385024Bytes

I (1875) wwe_example: esp_audio instance is:0x480023f8

W (1885) i2s_common: dma frame num is adjusted to 320 to align the dma buffer with 64, bufsize = 1280
W (1895) i2s_common: dma frame num is adjusted to 320 to align the dma buffer with 64, bufsize = 1280
I (1905) wwe_example: Recorder has been created
I (1905) MODEL_LOADER: The storage free size is 64576 KB
I (1915) MODEL_LOADER: The partition size is 5120 KB
I (1915) MODEL_LOADER: Successfully load srmodels
I (1925) RECORDER_SR: The first wakenet model: wn9_hilexin

I (1935) AFE_SR: afe interface for speech recognition
I (1935) AFE_SR: AFE version: SR_V220727
I (1945) AFE_SR: Initial auido front-end, total channel: 2, mic num: 1, ref num: 1
I (1945) AFE_SR: aec_init: 1, se_init: 1, vad_init: 1

I (1955) AFE_SR: wakenet_init: 1

MC Quantized wakenet9: wakenet9_v1h24_嗨,乐鑫_3_0.608_0.615, tigger:v3, mode:0, p:0, (Nov  5 2024 15:58:20)
I (3025) AFE_SR: wake num: 1, mode: 0, (Nov  5 2024 16:02:00)

Build fst from commands.
Quantized MultiNet7:rnnt_ctc_2.0, name:mn7_cn, (Nov  5 2024 16:02:00)
Quantized MultiNet7 search method: 2, time out:5.8 s
I (3835) main_task: Returned from app_main()
@github-actions github-actions bot changed the title when detected voice,wwe_example will crash in esp32p4 board. when detected voice,wwe_example will crash in esp32p4 board. (AUD-5862) Nov 14, 2024
@JosephTang
Copy link
Contributor

Hi @GeneKong

Please fetch the latest master branch of ESP-ADF, run the ./install.sh and . ./export.sh scripts in the folder, remove the build folder and sdkconfig file from this example, set the target to P4, and then build again. This example was tested using these steps, and no crashes were reproduced. And the audio board: esp32-p4 function_ev_board v1.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants