esp32s3语音识别 afe_handle->feed(afe_data, audio_buffer); 出现看门狗超时

q81679
Posts: 3
Joined: Thu Jun 29, 2023 2:58 am

esp32s3语音识别 afe_handle->feed(afe_data, audio_buffer); 出现看门狗超时

Postby q81679 » Wed Jun 19, 2024 9:39 am

esp-sr version: 1.4.2
  1. Guru Meditation Error: Core  0 panic'ed (Interrupt wdt timeout on CPU0).
  2.  
  3. Core  0 register dump:
  4. PC      : 0x40380439  PS      : 0x00050134  A0      : 0x4037fd74  A1      : 0x3fca1e90
  5. 0x40380439: i2c_isr_handler_default at D:/ESPIDF/5.2.1/v5.2.1/esp-idf/components/driver/i2c/i2c.c:520
  6. 0x4037fd74: _xt_lowint1 at D:/ESPIDF/5.2.1/v5.2.1/esp-idf/components/xtensa/xtensa_vectors.S:1240
  7.  
  8. A2      : 0x3c3d118c  A3      : 0x3fca166c  A4      : 0x00000001  A5      : 0x00000008
  9. A6      : 0x00000010  A7      : 0x3fca165c  A8      : 0x00000000  A9      : 0x00000001
  10. A10     : 0x60027000  A11     : 0x3fca1ea0  A12     : 0x3fcb307c  A13     : 0x00000001
  11. A14     : 0x3fcb318c  A15     : 0x3fcb307c  SAR     : 0x0000001e  EXCCAUSE: 0x00000005
  12. EXCVADDR: 0x00000000  LBEG    : 0x40056f5c  LEND    : 0x40056f72  LCOUNT  : 0xffffffff
  13. 0x40056f5c: memcpy in ROM
  14. 0x40056f72: memcpy in ROM
  15.  
  16. Core  0 was running in ISR context:
  17. EPC1    : 0x403805f9  EPC2    : 0x4037fd6b  EPC3    : 0x4038042b  EPC4    : 0x40380439
  18. 0x403805f9: i2c_isr_handler_default at D:/ESPIDF/5.2.1/v5.2.1/esp-idf/components/driver/i2c/i2c.c:580
  19. 0x4037fd6b: _xt_lowint1 at D:/ESPIDF/5.2.1/v5.2.1/esp-idf/components/xtensa/xtensa_vectors.S:1240
  20. 0x4038042b: i2c_ll_get_intr_mask at D:/ESPIDF/5.2.1/v5.2.1/esp-idf/components/hal/esp32s3/include/hal/i2c_ll.h:254
  21.  (inlined by) i2c_isr_handler_default at D:/ESPIDF/5.2.1/v5.2.1/esp-idf/components/driver/i2c/i2c.c:515
  22. 0x40380439: i2c_isr_handler_default at D:/ESPIDF/5.2.1/v5.2.1/esp-idf/components/driver/i2c/i2c.c:520
  23.  
  24.  
  25.  
  26. Backtrace: 0x40380436:0x3fca1e90 0x4037fd71:0x3fca1ed0 0x403805f6:0x3fcc7550 0x4203c268:0x3fcc7560 0x420392e2:0x3fcc75c0 0x4203949c:0x3fcc75e0 0x4200dc09:0x3fcc7600
  27. 0x40380436: i2c_isr_handler_default at D:/ESPIDF/5.2.1/v5.2.1/esp-idf/components/driver/i2c/i2c.c:522
  28. 0x4037fd71: _xt_lowint1 at D:/ESPIDF/5.2.1/v5.2.1/esp-idf/components/xtensa/xtensa_vectors.S:1240
  29. 0x403805f6: i2c_ll_read_rxfifo at D:/ESPIDF/5.2.1/v5.2.1/esp-idf/components/hal/esp32s3/include/hal/i2c_ll.h:612 (discriminator 1)
  30.  (inlined by) i2c_isr_handler_default at D:/ESPIDF/5.2.1/v5.2.1/esp-idf/components/driver/i2c/i2c.c:558 (discriminator 1)
  31. 0x4203c268: esp_bss_hps16fft_process at /home/sunxiangyu/workspace/esp_sr_lib/build/../components/esp_audio_processor/microphone_array_speech_enhancement/esp_bss_hps16fft.c:218 (discriminator 3)
  32. 0x420392e2: afe_feed_aec_init_false at /home/sunxiangyu/workspace/esp_sr_lib/build/../components/esp_audio_front_end/esp_afe_sr.c:535
  33. 0x4203949c: afe_feed at /home/sunxiangyu/workspace/esp_sr_lib/build/../components/esp_audio_front_end/esp_afe_sr.c:605
  34. 0x4200dc09: audio_feed_task at D:/VsCodeProgram/esp32-s3-lcd-ev-board/examples/86HF_Screen_Sr/main/app/app_sr.c:154
  35.  
  36.  
  37.  
  38. Core  1 register dump:
  39. PC      : 0x403822d6  PS      : 0x00060434  A0      : 0x820037d1  A1      : 0x3fcaafb0
  40. 0x403822d6: esp_cpu_wait_for_intr at D:/ESPIDF/5.2.1/v5.2.1/esp-idf/components/esp_hw_support/cpu.c:145
  41.  
  42. A2      : 0x00000000  A3      : 0x00000001  A4      : 0x8038651a  A5      : 0x3fcaaee0
  43. A6      : 0x00060023  A7      : 0x00000003  A8      : 0x82086b2e  A9      : 0x3fcaaf80
  44. A10     : 0x00000000  A11     : 0x0000abab  A12     : 0x00000000  A13     : 0x3fcab160
  45. A14     : 0x3fca5cf8  A15     : 0x00000001  SAR     : 0x00000000  EXCCAUSE: 0x00000005
  46. EXCVADDR: 0x00000000  LBEG    : 0x00000000  LEND    : 0x00000000  LCOUNT  : 0x00000000
  47.  
  48.  
  49. Backtrace: 0x403822d3:0x3fcaafb0 0x420037ce:0x3fcaafd0 0x403876d4:0x3fcaaff0
  50. 0x403822d3: xt_utils_wait_for_intr at D:/ESPIDF/5.2.1/v5.2.1/esp-idf/components/xtensa/include/xt_utils.h:81
  51.  (inlined by) esp_cpu_wait_for_intr at D:/ESPIDF/5.2.1/v5.2.1/esp-idf/components/esp_hw_support/cpu.c:132
  52. 0x420037ce: esp_vApplicationIdleHook at D:/ESPIDF/5.2.1/v5.2.1/esp-idf/components/esp_system/freertos_hooks.c:59
  53. 0x403876d4: prvIdleTask at D:/ESPIDF/5.2.1/v5.2.1/esp-idf/components/freertos/FreeRTOS-Kernel/tasks.c:4273 (discriminator 1)
  54.  
  55.  
  56.  
  57.  
  58.  
  59. ELF file SHA256: df0455fe8
  1. static void audio_feed_task(void *arg)
  2. {
  3.     size_t bytes_read = 0;
  4.     esp_afe_sr_data_t *afe_data = (esp_afe_sr_data_t *) arg;
  5.     int audio_chunksize = afe_handle->get_feed_chunksize(afe_data);
  6.     int feed_channel = 3;
  7.     ESP_LOGI(TAG, "audio_chunksize=%d, feed_channel=%d", audio_chunksize, feed_channel);
  8.  
  9.     /* Allocate audio buffer and check for result */
  10.     int16_t *audio_buffer = heap_caps_malloc(audio_chunksize * sizeof(int16_t) * feed_channel, MALLOC_CAP_INTERNAL | MALLOC_CAP_8BIT);
  11.     if (NULL == audio_buffer) {
  12.         esp_system_abort("No mem for audio buffer");
  13.     }
  14.     g_sr_data->afe_in_buffer = audio_buffer;
  15.  
  16.     while (true) {
  17.         if (NEED_DELETE && xEventGroupGetBits(g_sr_data->event_group)) {
  18.             xEventGroupSetBits(g_sr_data->event_group, FEED_DELETED);
  19.             vTaskDelete(NULL);
  20.         }
  21.  
  22.         /* Read audio data from I2S bus */
  23.         bsp_extra_i2s_read((char *)audio_buffer, audio_chunksize * I2S_CHANNEL_NUM * sizeof(int16_t), &bytes_read, portMAX_DELAY);
  24.  
  25.         /* Save audio data to file if record enabled */
  26.         if (g_sr_data->b_record_en && (NULL != g_sr_data->fp)) {
  27.             fwrite(audio_buffer, 1, audio_chunksize * I2S_CHANNEL_NUM * sizeof(int16_t), g_sr_data->fp);
  28.         }
  29.  
  30.         /* Channel Adjust */
  31.         for (int  i = audio_chunksize - 1; i >= 0; i--) {
  32.             audio_buffer[i * 3 + 2] = 0;
  33.             audio_buffer[i * 3 + 1] = audio_buffer[i * 2 + 1];
  34.             audio_buffer[i * 3 + 0] = audio_buffer[i * 2 + 0];
  35.         }
  36.  
  37.         /* Feed samples of an audio stream to the AFE_SR */
  38.         afe_handle->feed(afe_data, audio_buffer);
  39.     }
  40. }

Who is online

Users browsing this forum: No registered users and 14 guests