使用IDF版本v4.4.2.因为业务代码涉及内容比较多不方便升级,只能使用这个版本了。
硬件版本使用ESP32S3-N8R2模组。
问题,在app_main函数第一行调用 esp_log_level_set("*", ESP_LOG_WARN); 如果日志级别是INFO的时候没有问题可以正常运行。如果日志设置为WARN以上级别的时候在一个task函数函数中调用 gpio_isr_handler_add(KEY_SW1_PIN, gpio_isr_handler, (void*) KEY_SW1_PIN);注册一个按键中断的时候导致CPU Panic。
同时在之前测试的时候遇到过在配置页面,关闭ROM log也会导致Panic。麻烦给看一下吧。
日志如下:
--- WARNING: GDB cannot open serial ports accessed as COMx
--- Using \.COM3 instead...
--- idf_monitor on \.COM3 115200 ---
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H ---
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x1 (POWERON),boot:0x8 (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fce3808,len:0x39c
load:0x403c9700,len:0x9b8
load:0x403cc700,len:0x27a8
SHA-256 comparison failed:
Calculated: dbaa43c6dc03c8f7a001d74784a6dac40d082488b735a931f22b1d088515d4c3
Expected: 15d1901f36454b1f49ebff6c2a67f681da1cce81d35fb313b9179e27e99f3fee
Attemp
ting to boot anyway...
entry 0x403c98c0
Guru Meditation Error: Core 0 panic'ed (LoadProhibited). Exception was unhandled.
Core 0 register dump:
PC : 0x4207edbf PS : 0x00060033 A0 : 0x82054c88 A1 : 0x3fcb2380
0x4207edbf: esp_intr_get_cpu at D:/software/Espressif/frameworks/esp-idf-v4.4.2/components/esp_hw_support/intr_alloc.c:704
A2 : 0x00000000 A3 : 0x3fc9e7e4 A4 : 0x3fc9e7e4 A5 : 0x00060023
A6 : 0x00060020 A7 : 0x00000001 A8 : 0x00000000 A9 : 0x3fcb2360
A10 : 0x3fc9bc98 A11 : 0x0000000d A12 : 0x0000000d A13 : 0x3fca6960
A14 : 0x02c9bc84 A15 : 0x00ffffff SAR : 0x00000013 EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
Backtrace:0x4207edbc:0x3fcb23800x42054c85:0x3fcb23a0 0x4037ba96:0x3fcb23c0
0x4207edbc: esp_intr_get_cpu at D:/software/Espressif/frameworks/esp-idf-v4.4.2/components/esp_hw_support/intr_alloc.c:703
0x42054c85: gpio_isr_handler_add at D:/software/Espressif/frameworks/esp-idf-v4.4.2/components/driver/gpio.c:473
0x4037ba96: sw1_key_handler_task at E:/ALIC/code/MountainVIew/Firmware/components/alic_peripherals/key_sw1.c:92