espressif / esp-skainet

Espressif intelligent voice assistant
Other
589 stars 134 forks source link

esp32-s3-korvo-2加密的模组multinet有问题 (AIS-854) #45

Closed LiTongXue98 closed 1 year ago

LiTongXue98 commented 2 years ago
环境
硬件:esp32-s3-korvo-2  
esp-skainet: dev2.0 Commit: 5aec971862b
esp-sr:   dev2.0  Commit: c873a359e7d
我现在的问题是在同样的工程代码(都是使用的cn_speech_commands_recognition的例程),在未加密的模组可以正常进行语音唤醒和识别,但是在另外一块已经加密的模组上,运行multinet->create(&MULTINET_COEFF, 5760);后就无法继续运行了,可以帮忙查看一下是什么问题导致的吗,万分感谢!下面是运行的一些log信息

未加密的模组可以正常运行

I (25) boot: ESP-IDF v4.4-beta1-50-g5e13980e99-dirty 2nd stage bootloader
I (25) boot: compile time 10:03:07
I (25) boot: chip revision: 0
I (30) boot.esp32s3: Boot SPI Speed : 80MHz
I (33) boot.esp32s3: SPI Mode       : DIO
I (38) boot.esp32s3: SPI Flash Size : 8MB
I (43) boot: Enabling RNG early entropy source...
W (48) bootloader_random: RNG for ESP32-S3 not currently supported
I (55) boot: Partition Table:
I (59) boot: ## Label            Usage          Type ST Offset   Length
I (66) boot:  0 factory          factory app      00 00 00010000 00200000
I (73) boot:  1 model            Unknown data     01 82 00210000 0050c000
I (81) boot: End of partition table
I (85) esp_image: segment 0: paddr=00010020 vaddr=3c080020 size=c3310h (799504) map
I (237) esp_image: segment 1: paddr=000d3338 vaddr=3fc9a2a0 size=028dch ( 10460) load
I (239) esp_image: segment 2: paddr=000d5c1c vaddr=40374000 size=0a3fch ( 41980) load
I (252) esp_image: segment 3: paddr=000e0020 vaddr=42000020 size=706ech (460524) map
I (335) esp_image: segment 4: paddr=00150714 vaddr=4037e3fc size=0be98h ( 48792) load
I (346) esp_image: segment 5: paddr=0015c5b4 vaddr=50000000 size=00010h (    16) load
I (354) boot: Loaded app from partition at offset 0x10000
I (355) boot: Disabling RNG early entropy source...
W (355) bootloader_random: RNG for ESP32-S3 not currently supported
Initializing SPIFFS
Partition size: total: 4857101, used: 3457023
model_name: xiaoaitongxue7 model_data: /srmodel/xiaoaitongxue7/wn7_data
MC Quantized wakeNet7: wakeNet7_v1_xiaoaitongxue_6_0.97_0.92, mode:2, p:3, (Feb  9 2022 16:22:38)
------------detect start------------
wakeword detected
-----------listening-----------
TOP 1, command_id: 0, phrase_id: 0, prob: 0.905920
TOP 2, command_id: 18, phrase_id: 18, prob: 0.375519
-----------listening-----------

-----------awaits to be waken up-----------
加密模组运行到75行multinet->create(&MULTINET_COEFF, 5760);就挂掉了
I (29) boot: ESP-IDF v4.4-beta1-50-g5e13980e99-dirty 2nd stage bootloader
I (30) boot: compile time 10:03:07
I (30) boot: chip revision: 0
I (33) boot.esp32s3: Boot SPI Speed : 80MHz
I (38) boot.esp32s3: SPI Mode       : DIO
I (43) boot.esp32s3: SPI Flash Size : 8MB
I (48) boot: Enabling RNG early entropy source...
W (53) bootloader_random: RNG for ESP32-S3 not currently supported
I (60) boot: Partition Table:
I (63) boot: ## Label            Usage          Type ST Offset   Length
I (71) boot:  0 factory          factory app      00 00 00010000 00200000
I (78) boot:  1 model            Unknown data     01 82 00210000 0050c000
I (86) boot: End of partition table
I (90) esp_image: segment 0: paddr=00010020 vaddr=3c080020 size=c3310h (799504) map
I (257) esp_image: segment 1: paddr=000d3338 vaddr=3fc9a2a0 size=028dch ( 10460) load
I (260) esp_image: segment 2: paddr=000d5c1c vaddr=40374000 size=0a3fch ( 41980) load
I (273) esp_image: segment 3: paddr=000e0020 vaddr=42000020 size=7067ch (460412) map
I (365) esp_image: segment 4: paddr=001506a4 vaddr=4037e3fc size=0be98h ( 48792) load
I (377) esp_image: segment 5: paddr=0015c544 vaddr=50000000 size=00010h (    16) load
I (386) boot: Loaded app from partition at offset 0x10000
I (386) boot: Disabling RNG early entropy source...
W (386) bootloader_random: RNG for ESP32-S3 not currently supported
Initializing SPIFFS
Partition size: total: 4857101, used: 3457023
model_name: xiaoaitongxue7 model_data: /srmodel/xiaoaitongxue7/wn7_data
MC Quantized wakeNet7: wakeNet7_v1_xiaoaitongxue_6_0.97_0.92, mode:2, p:3, (Feb  9 2022 16:22:38)

assert failed: spinlock_release spinlock.h:140 (core_id == lock->owner)

Backtrace:0x40375cea:0x3fcac9700x40381cf5:0x3fcac990 0x40388105:0x3fcac9b0 0x40384ec7:0x3fcacad0 0x40382120:0x3fcacaf0 0x40382d1f:0x3fcacb10 0x4202a595:0x3fcacb50 0x4202a65a:0x3fcacb70 0x4037bf61:0x3fcacb90 0x4037ce31:0x3fcacbb0 0x4037ce3d:0x3fcacbd0 0x4037fcd9:0x3fcacbf0 0x4037caf9:0x3fcacc10 0x4203087d:0x3fcacc50 0x42025a95:0x3fcacc80 0x42029537:0x3fcacca0 0x4202716f:0x3fcaccd0 0x42028946:0x3fcacd10 0x42026084:0x3fcacd50 0x42025865:0x3fcacd80 0x420039b9:0x3fcacda0 0x420519c6:0x3fcacdc0 0x42051a69:0x3fcacdf0 0x420082aa:0x3fcace10 0x42008452:0x3fcace30 0x42016614:0x3fcace50 0x42016977:0x3fcacfc0 0x42006fdf:0x3fcacff0 0x40384cd6:0x3fcad020
0x40375cea: panic_abort at C:/esp-idf/components/esp_system/panic.c:402

0x40381cf5: esp_system_abort at C:/esp-idf/components/esp_system/esp_system.c:121

0x40388105: __assert_func at C:/esp-idf/components/newlib/assert.c:85

0x40384ec7: spinlock_release at C:/esp-idf/components/esp_hw_support/include/soc/spinlock.h:140
 (inlined by) vPortCPUReleaseMutex at C:/esp-idf/components/freertos/port/xtensa/include/freertos/portmacro.h:568
 (inlined by) vPortExitCritical at C:/esp-idf/components/freertos/port/xtensa/port.c:298

0x40382120: prvIsQueueEmpty at C:/esp-idf/components/freertos/queue.c:2474

0x40382d1f: xQueueSemaphoreTake at C:/esp-idf/components/freertos/queue.c:1667

0x4202a595: esp_ipc_call_and_wait at C:/esp-idf/components/esp_ipc/src/esp_ipc.c:150

0x4202a65a: esp_ipc_call at C:/esp-idf/components/esp_ipc/src/esp_ipc.c:162

0x4037bf61: spi_flash_disable_interrupts_caches_and_other_cpu at C:/esp-idf/components/spi_flash/cache_utils.c:163

0x4037ce31: cache_disable at C:/esp-idf/components/spi_flash/spi_flash_os_func_app.c:70

0x4037ce3d: spi1_start at C:/esp-idf/components/spi_flash/spi_flash_os_func_app.c:99

0x4037fcd9: spiflash_start_default at C:/esp-idf/components/spi_flash/esp_flash_api.c:128

0x4037caf9: esp_flash_read at C:/esp-idf/components/spi_flash/esp_flash_api.c:821

0x4203087d: esp_partition_read at C:/esp-idf/components/spi_flash/partition.c:415

0x42025a95: spiffs_api_read at C:/esp-idf/components/spiffs/spiffs_api.c:36

0x42029537: spiffs_phys_rd at C:/esp-idf/components/spiffs/spiffs/src/spiffs_cache.c:161

0x4202716f: spiffs_obj_lu_find_entry_visitor at C:/esp-idf/components/spiffs/spiffs/src/spiffs_nucleus.c:166

0x42028946: spiffs_object_find_object_index_header_by_name at C:/esp-idf/components/spiffs/spiffs/src/spiffs_nucleus.c:1694

0x42026084: SPIFFS_open at C:/esp-idf/components/spiffs/spiffs/src/spiffs_hydrogen.c:230 (discriminator 2)

0x42025865: vfs_spiffs_open at C:/esp-idf/components/spiffs/esp_spiffs.c:479

0x420039b9: esp_vfs_open at C:/esp-idf/components/vfs/vfs.c:407 (discriminator 3)

0x420519c6: _fopen_r at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32s3-elf/src/newlib/newlib/libc/stdio/fopen.c:129

0x42051a69: fopen at /builds/idf/crosstool-NG/.build/HOST-x86_64-w64-mingw32/xtensa-esp32s3-elf/src/newlib/newlib/libc/stdio/fopen.c:168

0x420082aa: get_file_length at /home/wangwangwang/workspace/ai_vnc/728_support/esp_sr_lib_vnc_1/build/../components/hufzip/hufzip_model.c:80

0x42008452: dl_matrixq_copy_to_psram_spiffs at /home/wangwangwang/workspace/ai_vnc/728_support/esp_sr_lib_vnc_1/build/../components/hufzip/hufzip_model.c:232

0x42016614: model_create at /home/wangwangwang/workspace/ai_vnc/728_support/esp_sr_lib_vnc_1/build/../components/multinet/multinet4_single_quantized_cn.c:795

0x42016977: model_init at /home/wangwangwang/workspace/ai_vnc/728_support/esp_sr_lib_vnc_1/build/../components/multinet/multinet4_single_quantized_cn.c:1826

0x42006fdf: detect_Task at c:\esp-skainet\examples\en_speech_commands_recognition\build/../main/main.c:75

0x40384cd6: vPortTaskWrapper at C:/esp-idf/components/freertos/port/xtensa/port.c:130
LiTongXue98 commented 2 years ago

@feizi 请问一下,我发现的这个问题,你们测试的时候有发现吗,是我的工程配置有问题吗😥

feizi commented 2 years ago

你好,有加密模组的详细型号吗?

LiTongXue98 commented 2 years ago

esp32-s3-wroom-1 D2N8R8(就是在官方淘宝店购买的esp32s3-korvo-2 v3.0) @feizi

LiTongXue98 commented 2 years ago

秘钥设置的是这个00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 01

LiTongXue98 commented 2 years ago

@feizi 请问一下有什么新发现吗?运行NS/AEC/WAKENET都是OK的,multinet就失败了😂

LiTongXue98 commented 2 years ago

目前这个问题还困扰着我,我手上加密的esp32s3已经无法解密了,导致有一些程序测试在加密模组无法正常运行,在没有加密的模组就可以正常运行,我不知道是不是和我的menuconfig配置有关系,我也不太敢把另外一块模组加密,那样就真的没有模组用来做对比了

feizi commented 2 years ago

应该是 multinet的参数比较大,而且是单独烧写在flash上,加密可能导致这部分参数越界而无法正确初始化。 暂时还没有定位到具体出错地方,你暂时不要加密你的另一块模组。

LiTongXue98 commented 2 years ago

请问一下,有什么新发现吗,后面这个的esp-sr库会解决这个问题吗

feizi commented 2 years ago

目前上海疫情,大家都居家隔离,暂时无法解决该问题。

LiTongXue98 commented 2 years ago

目前上海疫情,大家都居家隔离,暂时无法解决该问题。

好的,注意防护,有进展了也请您及时回复我

feizi commented 1 year ago

如果有问题请重新提问