Page 1 of 1

ESP32-C3 ESP-IDF4.3.2 I2C驱动异常

Posted: Tue Jan 04, 2022 9:07 am
by Panmin
ESP32-C3,ESP-IDF版本4.3.2
使用I2C驱动OLED(驱动芯片SSD1306),开机正常驱动显示,持续刷新屏幕,运行一段时间后,总是会出现如下错误:
(1629509) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:
(1629509) task_wdt: - IDLE (CPU 0)
(1629509) task_wdt: Tasks currently running:
(1629509) task_wdt: CPU 0: esp_timer

添加LOG跟踪发现,出问题前,软件运行到components\driver\i2c.c的第1238行i2c_hw_fsm_reset(i2c_num);返回后,就没有退出while,也没有退出当前函数i2c_master_cmd_begin,软件持续打印如上的喂狗失败的的LOG。

Re: ESP32-C3 ESP-IDF4.3.2 I2C驱动异常

Posted: Thu Jan 06, 2022 10:03 am
by Panmin
配置menuconfig使能task watchdog超时触发异常重启,dump数据内容如下:

Code: Select all

<ESC>[0;31mE (250119) task_wdt: Task watchdog got triggered. The following tasks did not reset the watchdog in time:<ESC>[0m<CR><LF>
<ESC>[0;31mE (250119) task_wdt:  - IDLE (CPU 0)<ESC>[0m<CR><LF>
<ESC>[0;31mE (250119) task_wdt: Tasks currently running:<ESC>[0m<CR><LF>
<ESC>[0;31mE (250119) task_wdt: CPU 0: esp_timer<ESC>[0m<CR><LF>
<ESC>[0;31mE (250119) task_wdt: Aborting.<ESC>[0m<CR><LF>
<CR><LF>
abort() was called at PC 0x42030233 on core 0<CR><LF>
Core  0 register dump:<CR><LF>
MEPC    : 0x4038060a  RA      : 0x40387f22  SP      : 0x3fc93830  GP      : 0x3fc90600  <CR><LF>
TP      : 0x3fc83a80  T0      : 0x37363534  T1      : 0x7271706f  T2      : 0x33323130  <CR><LF>
S0/FP   : 0x00000004  S1      : 0x3fc93894  A0      : 0x3fc9385c  A1      : 0x3fc93892  <CR><LF>
A2      : 0x00000000  A3      : 0x3fc93889  A4      : 0x00000001  A5      : 0x3fc97000  <CR><LF>
A6      : 0x7a797877  A7      : 0x76757473  S2      : 0x0003d107  S3      : 0x00000001  <CR><LF>
S4      : 0x00000000  S5      : 0x00000000  S6      : 0x00000000  S7      : 0x00000000  <CR><LF>
S8      : 0x00000000  S9      : 0x00000000  S10     : 0x00000000  S11     : 0x00000000  <CR><LF>
T3      : 0x6e6d6c6b  T4      : 0x6a696867  T5      : 0x66656463  T6      : 0x62613938  <CR><LF>
MSTATUS : 0x00001881  MTVEC   : 0x40380001  MCAUSE  : 0x00000007  MTVAL   : 0x00000000  <CR><LF>
MHARTID : 0x00000000  <CR><LF>
<CR><LF>
Stack memory:<CR><LF>
3fc93830: 0x00000000 0x00000000 0x3fc93890 0x4038e29e 0x00000000 0x00000000 0x00000000 0x3fc92630<CR><LF>
3fc93850: 0x3fc93894 0x3fc9264c 0x3fc93890 0x726f6261 0x20292874 0x20736177 0x6c6c6163 0x61206465<CR><LF>
3fc93870: 0x43502074 0x34783020 0x30333032 0x20333332 0x63206e6f 0x2065726f 0x00000030 0x42030000<CR><LF>
3fc93890: 0x3fce0030 0x33303234 0x33333230 0x00000000 0x3fc97000 0x0003d107 0x00000001 0x42030236<CR><LF>
3fc938b0: 0x00001881 0x80000007 0xffffffff 0x4038eb14 0x00001881 0x80000002 0x0000000a 0x00000000<CR><LF>
3fc938d0: 0x403801ba 0x00000000 0x00000001 0x4038019e 0x00000001 0x3fc9ab84 0xffffffff 0x3fc9ab84<CR><LF>
3fc938f0: 0x3fc9ab84 0x00000001 0x3fca95b8 0xffffffff 0x3fca95b8 0x3fca95b8 0x00000000 0x3fc93910<CR><LF>
3fc93910: 0xffffffff 0x3fc93910 0x3fc93910 0x00000000 0x3fc93924 0xffffffff 0x3fc93924 0x3fc93924<CR><LF>
3fc93930: 0x00000000 0x3fc93938 0xffffffff 0x3fc93938 0x3fc93938 0x00000000 0x3fc9394c 0xffffffff<CR><LF>
3fc93950: 0x3fc9394c 0x3fc9394c 0x00000000 0x3fc93960 0xffffffff 0x3fc93960 0x3fc93960 0x00000000<CR><LF>
3fc93970: 0x3fc93974 0xffffffff 0x3fc93974 0x3fc93974 0x00000000 0x3fc93988 0xffffffff 0x3fc93988<CR><LF>
3fc93990: 0x3fc93988 0x00000000 0x3fc9399c 0xffffffff 0x3fc9399c 0x3fc9399c 0x00000001 0x3fcaa720<CR><LF>
3fc939b0: 0xffffffff 0x3fcaa720 0x3fcaa720 0x00000000 0x3fc939c4 0xffffffff 0x3fc939c4 0x3fc939c4<CR><LF>
3fc939d0: 0x00000000 0x3fc939d8 0xffffffff 0x3fc939d8 0x3fc939d8 0x00000000 0x3fc939ec 0xffffffff<CR><LF>
3fc939f0: 0x3fc939ec 0x3fc939ec 0x00000000 0x3fc93a00 0xffffffff 0x3fc93a00 0x3fc93a00 0x00000000<CR><LF>
3fc93a10: 0x3fc93a14 0xffffffff 0x3fc93a14 0x3fc93a14 0x00000000 0x3fc93a28 0xffffffff 0x3fc93a28<CR><LF>
3fc93a30: 0x3fc93a28 0x00000000 0x3fc93a3c 0xffffffff 0x3fc93a3c 0x3fc93a3c 0x00000001 0x3fc93a50<CR><LF>
3fc93a50: 0xffffffff 0x3fc9eab4 0x3fc9eab4 0x00000000 0x3fc93a64 0xffffffff 0x3fc93a64 0x3fc93a64<CR><LF>
3fc93a70: 0x00000000 0x3fc93a78 0xffffffff 0x3fc93a78 0x3fc93a78 0x00000000 0x3fc93a8c 0xffffffff<CR><LF>
3fc93a90: 0x3fc93a8c 0x3fc93a8c 0x00000001 0x3fc98f74 0xffffffff 0x3fc98f74 0x3fc98f74 0x00000000<CR><LF>
3fc93ab0: 0x3fc93ab4 0xffffffff 0x3fc93ab4 0x3fc93ab4 0x00000000 0x3fc93ac8 0xffffffff 0x3fc93ac8<CR><LF>
3fc93ad0: 0x3fc93ac8 0x00000000 0x3fc93adc 0xffffffff 0x3fc93adc 0x3fc93adc 0x00000000 0x3fc93af0<CR><LF>
3fc93af0: 0xffffffff 0x3fc93af0 0x3fc93af0 0x00000000 0x3fc93b04 0xffffffff 0x3fc93b04 0x3fc93b04<CR><LF>
3fc93b10: 0x00000004 0x3fc93b18 0xffffffff 0x3fc9b4ec 0x3fca16ac 0x00000000 0x3fc93b2c 0xffffffff<CR><LF>
3fc93b30: 0x3fc93b2c 0x3fc93b2c 0x00000000 0x3fc93b38 0x00000000 0x00000000 0x00000000 0x3fc93b50<CR><LF>
3fc93b50: 0xffffffff 0x3fc93b50 0x3fc93b50 0x00000000 0x3fc93b64 0xffffffff 0x3fc93b64 0x3fc93b64<CR><LF>
3fc93b70: 0x00000001 0x00000001 0x00000000 0x0001ffff 0x00000000 0x00000000 0x00000001 0x00000000<CR><LF>
3fc93b90: 0x00000000 0x00000000 0x3fc93b94 0x00000000 0x00000000 0x00000000 0x3fc93bac 0xffffffff<CR><LF>
3fc93bb0: 0x3fc93bac 0x3fc93bac 0x00000000 0x3fc93bc0 0xffffffff 0x3fc93bc0 0x3fc93bc0 0x00000001<CR><LF>
3fc93bd0: 0x00000001 0x00000000 0x0001ffff 0x00000000 0x00000000 0x00000004 0x00000000 0x00000000<CR><LF>
3fc93bf0: 0x00000000 0x3fc979ac 0x3fc97a14 0x3fc97a7c 0x00000000 0x00000000 0x00000001 0x00000000<CR><LF>
3fc93c10: 0x00000000 0x00000000 0x4206c074 0x00000000 0x00000000 0x00000000 0x00000000 0x00000000<CR><LF>
<CR><LF>