v4.0.3 使用蓝牙导致系统重启
Posted: Mon Jul 26, 2021 6:07 am
你好。
我从github上下载最新的esp-idf v4.0.3代码,最后的commit id是03fc307e21ac0dc5aed2ba95dbebe409eb9cb750。
然后在该代码中加入我自己的代码以及应用程序。
使用的芯片是ESP32-D0WD,并且使用外部RAM芯片(ESP-PSRAM64H)。
参考示例代码bluetooth\bluedroid\ble\ble_throughput\throughput_server,芯片端作为server模式,每隔20秒推送一次数据,数据量大概1500字节。手机使用BLE调试助手软件连接,接收芯片传过来的数据。
运行一段时间后,发现芯片重启了,重启日志如下:
ASSERT_PARAM(-218959118 0), in arch_main.c at line 343
Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0)
Core 0 register dump:
PC : 0x4008b391 PS : 0x00060534 A0 : 0x801e0e88 A1 : 0x3ffbf550
A2 : 0x00000001 A3 : 0x00000000 A4 : 0x60008048 A5 : 0x00000000
A6 : 0x00000004 A7 : 0x3ffbdbe8 A8 : 0x8008b38c A9 : 0x3ffbf530
A10 : 0x00000000 A11 : 0x00000037 A12 : 0x00000014 A13 : 0xffffffff
A14 : 0x00000000 A15 : 0xfffffffc SAR : 0x00000004 EXCCAUSE: 0x00000005
EXCVADDR: 0x00000000 LBEG : 0x4008b2c4 LEND : 0x4008b2cb LCOUNT : 0x00000000
Core 0 was running in ISR context:
EPC1 : 0x40009203 EPC2 : 0x4000bff0 EPC3 : 0x00000000 EPC4 : 0x4008b391
ELF file SHA256: b8b028dd6054ad19
Backtrace: 0x4008b38e:0x3ffbf550 0x401e0e85:0x3ffbf570 0x40019fb5:0x3ffbf590 0x40046683:0x3ffbf5c0 0x40047515:0x3ffbf5e0 0x4008e3d9:0x3ffbf600 0x4008e091:0x3ffbf620 0x40090656:0x3ffbf640 0x400918d3:0x3ffbf660 0x40087cf1:0x3ffbf680 0x401e12b1:0x3ffb5ee0 0x401e188d:0x3ffb5f00 0x40096ce1:0x3ffb5f30
Core 1 register dump:
PC : 0x401ffe12 PS : 0x00060334 A0 : 0x800d4a45 A1 : 0x3ffbc3e0
A2 : 0x00000000 A3 : 0x00000001 A4 : 0x80096e2b A5 : 0x3ffbc310
A6 : 0x00000003 A7 : 0x00060023 A8 : 0x800d235a A9 : 0x3ffbc3b0
A10 : 0x00000000 A11 : 0x00000001 A12 : 0x80096e2b A13 : 0x3ffbc2f0
A14 : 0x00000003 A15 : 0x00060023 SAR : 0x00000000 EXCCAUSE: 0x00000005
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
ELF file SHA256: b8b028dd6054ad19
Backtrace: 0x401ffe0f:0x3ffbc3e0 0x400d4a42:0x3ffbc400 0x400981a9:0x3ffbc420 0x40096ce1:0x3ffbc440
Rebooting...
使用addr2line工具查看,发现是蓝牙控制器里面报的错误:
0x00000bac: ?? ??:0
0x4008b38e: r_assert_param at ??:?
0x401e0e85: bta_gattc_add_srvc_to_cache at /home/linux/git/esp-idf-v4.0.3/components/bt/host/bluedroid/bta/gatt/bta_gattc_cache.c:271 (discriminator 1)
0x40019fb5: ?? ??:0
0x40046683: ?? ??:0
0x40047515: ?? ??:0
0x4008e3d9: r_lld_evt_end at ??:?
0x4008e091: r_lld_evt_end_isr at ??:?
0x40090656: r_rwble_isr at ??:?
0x400918d3: r_rwbtdm_isr_wrapper at intc.c:?
0x40087cf1: _xt_lowint1 at /home/linux/git/esp-idf-v4.0.3/components/freertos/xtensa_vectors.S:1153
0x401e12b1: bta_gattc_update_include_service at /home/linux/git/esp-idf-v4.0.3/components/bt/host/bluedroid/bta/gatt/bta_gattc_cache.c:553 (discriminator 1)
0x401e188d: bta_gattc_disc_res_cback at /home/linux/git/esp-idf-v4.0.3/components/bt/host/bluedroid/bta/gatt/bta_gattc_cache.c:967
0x40096ce1: vPortTaskWrapper at /home/linux/git/esp-idf-v4.0.3/components/freertos/port.c:143
请问这个问题,在蓝牙控制器中是什么原因导致的呢?
我从github上下载最新的esp-idf v4.0.3代码,最后的commit id是03fc307e21ac0dc5aed2ba95dbebe409eb9cb750。
然后在该代码中加入我自己的代码以及应用程序。
使用的芯片是ESP32-D0WD,并且使用外部RAM芯片(ESP-PSRAM64H)。
参考示例代码bluetooth\bluedroid\ble\ble_throughput\throughput_server,芯片端作为server模式,每隔20秒推送一次数据,数据量大概1500字节。手机使用BLE调试助手软件连接,接收芯片传过来的数据。
运行一段时间后,发现芯片重启了,重启日志如下:
ASSERT_PARAM(-218959118 0), in arch_main.c at line 343
Guru Meditation Error: Core 0 panic'ed (Interrupt wdt timeout on CPU0)
Core 0 register dump:
PC : 0x4008b391 PS : 0x00060534 A0 : 0x801e0e88 A1 : 0x3ffbf550
A2 : 0x00000001 A3 : 0x00000000 A4 : 0x60008048 A5 : 0x00000000
A6 : 0x00000004 A7 : 0x3ffbdbe8 A8 : 0x8008b38c A9 : 0x3ffbf530
A10 : 0x00000000 A11 : 0x00000037 A12 : 0x00000014 A13 : 0xffffffff
A14 : 0x00000000 A15 : 0xfffffffc SAR : 0x00000004 EXCCAUSE: 0x00000005
EXCVADDR: 0x00000000 LBEG : 0x4008b2c4 LEND : 0x4008b2cb LCOUNT : 0x00000000
Core 0 was running in ISR context:
EPC1 : 0x40009203 EPC2 : 0x4000bff0 EPC3 : 0x00000000 EPC4 : 0x4008b391
ELF file SHA256: b8b028dd6054ad19
Backtrace: 0x4008b38e:0x3ffbf550 0x401e0e85:0x3ffbf570 0x40019fb5:0x3ffbf590 0x40046683:0x3ffbf5c0 0x40047515:0x3ffbf5e0 0x4008e3d9:0x3ffbf600 0x4008e091:0x3ffbf620 0x40090656:0x3ffbf640 0x400918d3:0x3ffbf660 0x40087cf1:0x3ffbf680 0x401e12b1:0x3ffb5ee0 0x401e188d:0x3ffb5f00 0x40096ce1:0x3ffb5f30
Core 1 register dump:
PC : 0x401ffe12 PS : 0x00060334 A0 : 0x800d4a45 A1 : 0x3ffbc3e0
A2 : 0x00000000 A3 : 0x00000001 A4 : 0x80096e2b A5 : 0x3ffbc310
A6 : 0x00000003 A7 : 0x00060023 A8 : 0x800d235a A9 : 0x3ffbc3b0
A10 : 0x00000000 A11 : 0x00000001 A12 : 0x80096e2b A13 : 0x3ffbc2f0
A14 : 0x00000003 A15 : 0x00060023 SAR : 0x00000000 EXCCAUSE: 0x00000005
EXCVADDR: 0x00000000 LBEG : 0x00000000 LEND : 0x00000000 LCOUNT : 0x00000000
ELF file SHA256: b8b028dd6054ad19
Backtrace: 0x401ffe0f:0x3ffbc3e0 0x400d4a42:0x3ffbc400 0x400981a9:0x3ffbc420 0x40096ce1:0x3ffbc440
Rebooting...
使用addr2line工具查看,发现是蓝牙控制器里面报的错误:
0x00000bac: ?? ??:0
0x4008b38e: r_assert_param at ??:?
0x401e0e85: bta_gattc_add_srvc_to_cache at /home/linux/git/esp-idf-v4.0.3/components/bt/host/bluedroid/bta/gatt/bta_gattc_cache.c:271 (discriminator 1)
0x40019fb5: ?? ??:0
0x40046683: ?? ??:0
0x40047515: ?? ??:0
0x4008e3d9: r_lld_evt_end at ??:?
0x4008e091: r_lld_evt_end_isr at ??:?
0x40090656: r_rwble_isr at ??:?
0x400918d3: r_rwbtdm_isr_wrapper at intc.c:?
0x40087cf1: _xt_lowint1 at /home/linux/git/esp-idf-v4.0.3/components/freertos/xtensa_vectors.S:1153
0x401e12b1: bta_gattc_update_include_service at /home/linux/git/esp-idf-v4.0.3/components/bt/host/bluedroid/bta/gatt/bta_gattc_cache.c:553 (discriminator 1)
0x401e188d: bta_gattc_disc_res_cback at /home/linux/git/esp-idf-v4.0.3/components/bt/host/bluedroid/bta/gatt/bta_gattc_cache.c:967
0x40096ce1: vPortTaskWrapper at /home/linux/git/esp-idf-v4.0.3/components/freertos/port.c:143
请问这个问题,在蓝牙控制器中是什么原因导致的呢?