espressif / esp-idf

Espressif IoT Development Framework. Official development framework for Espressif SoCs.
Apache License 2.0
13.69k stars 7.29k forks source link

i2c 从站暂停引起cpu无限重启 (IDFGH-13633) #14516

Open flair0626 opened 2 months ago

flair0626 commented 2 months ago

Answers checklist.

IDF version.

ESP-IDF v5.3.1

Espressif SoC revision.

ESP32-C2

Operating System used.

Windows

How did you build your project?

VS Code IDE

If you are using Windows, please specify command line type.

None

Development Kit.

ESP32-C2

Power Supply used.

External 3.3V

What is the expected behavior?

无限重启

What is the actual behavior?

看门口超时

Steps to reproduce.

  1. Step 当ESP32作为主站使用i2c_master_transmit_receive 10ms间隔发送数据时
  2. Step 将从站mcu停止运行

Debug Logs.

E (44955) i2c.master: I2C transaction timeout detected
E (44955) i2c.master: s_i2c_synchronous_transaction(872): I2C transaction failed
E (49955) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (49955) task_wdt: - IDLE (CPU 0)
E (49955) task_wdt: Tasks currently running:
E (49955) task_wdt: CPU 0: emcu
E (49955) task_wdt: Print CPU 0 (current core) backtrace
Print CPU 0 (current core) registers
Core 0 register dump:
MEPC : 0x4202639a RA : 0x42026368 SP : 0x3fcbb850 GP : 0x3fcb12a0
0x4202639a: i2c_ll_master_clr_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/hal/esp32c2/include/hal/i2c_ll.h:680 (discriminator 1)
(inlined by) s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77 (discriminator 1)
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100 (discriminator 1)
0x42026368: s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100

TP : 0x3fcbb980 T0 : 0x4005e3c8 T1 : 0x00000000 T2 : 0xffffffff
S0/FP : 0x00000007 S1 : 0x3fcbaf54 A0 : 0x3fcbaf64 A1 : 0x3fcbb858
A2 : 0x00000000 A3 : 0x00000800 A4 : 0x60013000 A5 : 0x00000001
A6 : 0x00000080 A7 : 0x42005b9e S2 : 0x3fcbaf64 S3 : 0x00000006
0x42005b9e: uart_write at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_uart/src/uart_vfs.c:207

S4 : 0x3fcbb8c0 S5 : 0x000000c8 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x00000000 T4 : 0x3fcb4102 T5 : 0x00001800 T6 : 0x00000000
MSTATUS : 0x00000000 MTVEC : 0x3fcbaf64 MCAUSE : 0x00000012 MTVAL : 0x0000001f
MHARTID : 0x0000000e
E (54955) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (54955) task_wdt: - IDLE (CPU 0)
E (54955) task_wdt: Tasks currently running:
E (54955) task_wdt: CPU 0: emcu
E (54955) task_wdt: Print CPU 0 (current core) backtrace
Print CPU 0 (current core) registers
Core 0 register dump:
MEPC : 0x4202639a RA : 0x42026368 SP : 0x3fcbb850 GP : 0x3fcb12a0
0x4202639a: i2c_ll_master_clr_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/hal/esp32c2/include/hal/i2c_ll.h:680 (discriminator 1)
(inlined by) s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77 (discriminator 1)
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100 (discriminator 1)
0x42026368: s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100

TP : 0x3fcbb980 T0 : 0x4005e3c8 T1 : 0x00000000 T2 : 0xffffffff
S0/FP : 0x00000007 S1 : 0x3fcbaf54 A0 : 0x3fcbaf64 A1 : 0x3fcbb858
A2 : 0x00000000 A3 : 0x00000800 A4 : 0x60013000 A5 : 0x00000001
A6 : 0x00000080 A7 : 0x42005b9e S2 : 0x3fcbaf64 S3 : 0x00000006
0x42005b9e: uart_write at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_uart/src/uart_vfs.c:207

S4 : 0x3fcbb8c0 S5 : 0x000000c8 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x00000000 T4 : 0x3fcb4102 T5 : 0x00001800 T6 : 0x00000000
MSTATUS : 0x00000000 MTVEC : 0x3fcbaf64 MCAUSE : 0x00000012 MTVAL : 0x0000001f
MHARTID : 0x0000000e
E (59955) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (59955) task_wdt: - IDLE (CPU 0)
E (59955) task_wdt: Tasks currently running:
E (59955) task_wdt: CPU 0: emcu
E (59955) task_wdt: Print CPU 0 (current core) backtrace
Print CPU 0 (current core) registers
Core 0 register dump:
MEPC : 0x4202639a RA : 0x42026368 SP : 0x3fcbb850 GP : 0x3fcb12a0
0x4202639a: i2c_ll_master_clr_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/hal/esp32c2/include/hal/i2c_ll.h:680 (discriminator 1)
(inlined by) s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77 (discriminator 1)
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100 (discriminator 1)
0x42026368: s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100

TP : 0x3fcbb980 T0 : 0x4005e3c8 T1 : 0x00000000 T2 : 0xffffffff
S0/FP : 0x00000007 S1 : 0x3fcbaf54 A0 : 0x3fcbaf64 A1 : 0x3fcbb858
A2 : 0x00000000 A3 : 0x00000800 A4 : 0x60013000 A5 : 0x00000001
A6 : 0x00000080 A7 : 0x42005b9e S2 : 0x3fcbaf64 S3 : 0x00000006
0x42005b9e: uart_write at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_uart/src/uart_vfs.c:207

S4 : 0x3fcbb8c0 S5 : 0x000000c8 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x00000000 T4 : 0x3fcb4102 T5 : 0x00001800 T6 : 0x00000000
MSTATUS : 0x00000000 MTVEC : 0x3fcbaf64 MCAUSE : 0x00000012 MTVAL : 0x0000001f
MHARTID : 0x0000000e
E (64955) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (64955) task_wdt: - IDLE (CPU 0)
E (64955) task_wdt: Tasks currently running:
E (64955) task_wdt: CPU 0: emcu
E (64955) task_wdt: Print CPU 0 (current core) backtrace
Print CPU 0 (current core) registers
Core 0 register dump:
MEPC : 0x4202639e RA : 0x42026368 SP : 0x3fcbb850 GP : 0x3fcb12a0
0x4202639e: i2c_ll_master_clr_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/hal/esp32c2/include/hal/i2c_ll.h:680 (discriminator 1)
(inlined by) s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77 (discriminator 1)
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100 (discriminator 1)
0x42026368: s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100

TP : 0x3fcbb980 T0 : 0x4005e3c8 T1 : 0x00000000 T2 : 0xffffffff
S0/FP : 0x00000007 S1 : 0x3fcbaf54 A0 : 0x3fcbaf64 A1 : 0x3fcbb858
A2 : 0x00000000 A3 : 0x00000800 A4 : 0x60013000 A5 : 0x00000013
A6 : 0x00000080 A7 : 0x42005b9e S2 : 0x3fcbaf64 S3 : 0x00000006
0x42005b9e: uart_write at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_uart/src/uart_vfs.c:207

S4 : 0x3fcbb8c0 S5 : 0x000000c8 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x00000000 T4 : 0x3fcb4102 T5 : 0x00001800 T6 : 0x00000000
MSTATUS : 0x00000000 MTVEC : 0x3fcbaf64 MCAUSE : 0x00000012 MTVAL : 0x0000001f
MHARTID : 0x0000000e
E (69955) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (69955) task_wdt: - IDLE (CPU 0)
E (69955) task_wdt: Tasks currently running:
E (69955) task_wdt: CPU 0: emcu
E (69955) task_wdt: Print CPU 0 (current core) backtrace
Print CPU 0 (current core) registers
Core 0 register dump:
MEPC : 0x4202639e RA : 0x42026368 SP : 0x3fcbb850 GP : 0x3fcb12a0
0x4202639e: i2c_ll_master_clr_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/hal/esp32c2/include/hal/i2c_ll.h:680 (discriminator 1)
(inlined by) s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77 (discriminator 1)
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100 (discriminator 1)
0x42026368: s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100

TP : 0x3fcbb980 T0 : 0x4005e3c8 T1 : 0x00000000 T2 : 0xffffffff
S0/FP : 0x00000007 S1 : 0x3fcbaf54 A0 : 0x3fcbaf64 A1 : 0x3fcbb858
A2 : 0x00000000 A3 : 0x00000800 A4 : 0x60013000 A5 : 0x00000013
A6 : 0x00000080 A7 : 0x42005b9e S2 : 0x3fcbaf64 S3 : 0x00000006
0x42005b9e: uart_write at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_uart/src/uart_vfs.c:207

S4 : 0x3fcbb8c0 S5 : 0x000000c8 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x00000000 T4 : 0x3fcb4102 T5 : 0x00001800 T6 : 0x00000000
MSTATUS : 0x00000000 MTVEC : 0x3fcbaf64 MCAUSE : 0x00000012 MTVAL : 0x0000001f
MHARTID : 0x0000000e
E (74955) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (74955) task_wdt: - IDLE (CPU 0)
E (74955) task_wdt: Tasks currently running:
E (74955) task_wdt: CPU 0: emcu
E (74955) task_wdt: Print CPU 0 (current core) backtrace
Print CPU 0 (current core) registers
Core 0 register dump:
MEPC : 0x4202639a RA : 0x42026368 SP : 0x3fcbb850 GP : 0x3fcb12a0
0x4202639a: i2c_ll_master_clr_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/hal/esp32c2/include/hal/i2c_ll.h:680 (discriminator 1)
(inlined by) s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77 (discriminator 1)
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100 (discriminator 1)
0x42026368: s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100

TP : 0x3fcbb980 T0 : 0x4005e3c8 T1 : 0x00000000 T2 : 0xffffffff
S0/FP : 0x00000007 S1 : 0x3fcbaf54 A0 : 0x3fcbaf64 A1 : 0x3fcbb858
A2 : 0x00000000 A3 : 0x00000800 A4 : 0x60013000 A5 : 0x00000001
A6 : 0x00000080 A7 : 0x42005b9e S2 : 0x3fcbaf64 S3 : 0x00000006
0x42005b9e: uart_write at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_uart/src/uart_vfs.c:207

S4 : 0x3fcbb8c0 S5 : 0x000000c8 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x00000000 T4 : 0x3fcb4102 T5 : 0x00001800 T6 : 0x00000000
MSTATUS : 0x00000000 MTVEC : 0x3fcbaf64 MCAUSE : 0x00000012 MTVAL : 0x0000001f
MHARTID : 0x0000000e
E (79955) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (79955) task_wdt: - IDLE (CPU 0)
E (79955) task_wdt: Tasks currently running:
E (79955) task_wdt: CPU 0: emcu
E (79955) task_wdt: Print CPU 0 (current core) backtrace
Print CPU 0 (current core) registers
Core 0 register dump:
MEPC : 0x4202639a RA : 0x42026368 SP : 0x3fcbb850 GP : 0x3fcb12a0
0x4202639a: i2c_ll_master_clr_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/hal/esp32c2/include/hal/i2c_ll.h:680 (discriminator 1)
(inlined by) s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77 (discriminator 1)
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100 (discriminator 1)
0x42026368: s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100

TP : 0x3fcbb980 T0 : 0x4005e3c8 T1 : 0x00000000 T2 : 0xffffffff
S0/FP : 0x00000007 S1 : 0x3fcbaf54 A0 : 0x3fcbaf64 A1 : 0x3fcbb858
A2 : 0x00000000 A3 : 0x00000800 A4 : 0x60013000 A5 : 0x00000001
A6 : 0x00000080 A7 : 0x42005b9e S2 : 0x3fcbaf64 S3 : 0x00000006
0x42005b9e: uart_write at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_uart/src/uart_vfs.c:207

S4 : 0x3fcbb8c0 S5 : 0x000000c8 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x00000000 T4 : 0x3fcb4102 T5 : 0x00001800 T6 : 0x00000000
MSTATUS : 0x00000000 MTVEC : 0x3fcbaf64 MCAUSE : 0x00000012 MTVAL : 0x0000001f
MHARTID : 0x0000000e
E (84955) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (84955) task_wdt: - IDLE (CPU 0)
E (84955) task_wdt: Tasks currently running:
E (84955) task_wdt: CPU 0: emcu
E (84955) task_wdt: Print CPU 0 (current core) backtrace
Print CPU 0 (current core) registers
Core 0 register dump:
MEPC : 0x4202639a RA : 0x42026368 SP : 0x3fcbb850 GP : 0x3fcb12a0
0x4202639a: i2c_ll_master_clr_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/hal/esp32c2/include/hal/i2c_ll.h:680 (discriminator 1)
(inlined by) s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77 (discriminator 1)
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100 (discriminator 1)
0x42026368: s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100

TP : 0x3fcbb980 T0 : 0x4005e3c8 T1 : 0x00000000 T2 : 0xffffffff
S0/FP : 0x00000007 S1 : 0x3fcbaf54 A0 : 0x3fcbaf64 A1 : 0x3fcbb858
A2 : 0x00000000 A3 : 0x00000800 A4 : 0x60013000 A5 : 0x00000001
A6 : 0x00000080 A7 : 0x42005b9e S2 : 0x3fcbaf64 S3 : 0x00000006
0x42005b9e: uart_write at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_uart/src/uart_vfs.c:207

S4 : 0x3fcbb8c0 S5 : 0x000000c8 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x00000000 T4 : 0x3fcb4102 T5 : 0x00001800 T6 : 0x00000000
MSTATUS : 0x00000000 MTVEC : 0x3fcbaf64 MCAUSE : 0x00000012 MTVAL : 0x0000001f
MHARTID : 0x0000000e
E (89955) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (89955) task_wdt: - IDLE (CPU 0)
E (89955) task_wdt: Tasks currently running:
E (89955) task_wdt: CPU 0: emcu
E (89955) task_wdt: Print CPU 0 (current core) backtrace
Print CPU 0 (current core) registers
Core 0 register dump:
MEPC : 0x4202639a RA : 0x42026368 SP : 0x3fcbb850 GP : 0x3fcb12a0
0x4202639a: i2c_ll_master_clr_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/hal/esp32c2/include/hal/i2c_ll.h:680 (discriminator 1)
(inlined by) s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77 (discriminator 1)
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100 (discriminator 1)
0x42026368: s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100

TP : 0x3fcbb980 T0 : 0x4005e3c8 T1 : 0x00000000 T2 : 0xffffffff
S0/FP : 0x00000007 S1 : 0x3fcbaf54 A0 : 0x3fcbaf64 A1 : 0x3fcbb858
A2 : 0x00000000 A3 : 0x00000800 A4 : 0x60013000 A5 : 0x00000001
A6 : 0x00000080 A7 : 0x42005b9e S2 : 0x3fcbaf64 S3 : 0x00000006
0x42005b9e: uart_write at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_uart/src/uart_vfs.c:207

S4 : 0x3fcbb8c0 S5 : 0x000000c8 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x00000000 T4 : 0x3fcb4102 T5 : 0x00001800 T6 : 0x00000000
MSTATUS : 0x00000000 MTVEC : 0x3fcbaf64 MCAUSE : 0x00000012 MTVAL : 0x0000001f
MHARTID : 0x0000000e
E (94955) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (94955) task_wdt: - IDLE (CPU 0)
E (94955) task_wdt: Tasks currently running:
E (94955) task_wdt: CPU 0: emcu
E (94955) task_wdt: Print CPU 0 (current core) backtrace
Print CPU 0 (current core) registers
Core 0 register dump:
MEPC : 0x4202639a RA : 0x42026368 SP : 0x3fcbb850 GP : 0x3fcb12a0
0x4202639a: i2c_ll_master_clr_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/hal/esp32c2/include/hal/i2c_ll.h:680 (discriminator 1)
(inlined by) s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77 (discriminator 1)
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100 (discriminator 1)
0x42026368: s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100

TP : 0x3fcbb980 T0 : 0x4005e3c8 T1 : 0x00000000 T2 : 0xffffffff
S0/FP : 0x00000007 S1 : 0x3fcbaf54 A0 : 0x3fcbaf64 A1 : 0x3fcbb858
A2 : 0x00000000 A3 : 0x00000800 A4 : 0x60013000 A5 : 0x00000001
A6 : 0x00000080 A7 : 0x42005b9e S2 : 0x3fcbaf64 S3 : 0x00000006
0x42005b9e: uart_write at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_uart/src/uart_vfs.c:207

S4 : 0x3fcbb8c0 S5 : 0x000000c8 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x00000000 T4 : 0x3fcb4102 T5 : 0x00001800 T6 : 0x00000000
MSTATUS : 0x00000000 MTVEC : 0x3fcbaf64 MCAUSE : 0x00000012 MTVAL : 0x0000001f
MHARTID : 0x0000000e
E (99955) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (99955) task_wdt: - IDLE (CPU 0)
E (99955) task_wdt: Tasks currently running:
E (99955) task_wdt: CPU 0: emcu
E (99955) task_wdt: Print CPU 0 (current core) backtrace
Print CPU 0 (current core) registers
Core 0 register dump:
MEPC : 0x4202639e RA : 0x42026368 SP : 0x3fcbb850 GP : 0x3fcb12a0
0x4202639e: i2c_ll_master_clr_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/hal/esp32c2/include/hal/i2c_ll.h:680 (discriminator 1)
(inlined by) s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77 (discriminator 1)
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100 (discriminator 1)
0x42026368: s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100

TP : 0x3fcbb980 T0 : 0x4005e3c8 T1 : 0x00000000 T2 : 0xffffffff
S0/FP : 0x00000007 S1 : 0x3fcbaf54 A0 : 0x3fcbaf64 A1 : 0x3fcbb858
A2 : 0x00000000 A3 : 0x00000800 A4 : 0x60013000 A5 : 0x00000013
A6 : 0x00000080 A7 : 0x42005b9e S2 : 0x3fcbaf64 S3 : 0x00000006
0x42005b9e: uart_write at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_uart/src/uart_vfs.c:207

S4 : 0x3fcbb8c0 S5 : 0x000000c8 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x00000000 T4 : 0x3fcb4102 T5 : 0x00001800 T6 : 0x00000000
MSTATUS : 0x00000000 MTVEC : 0x3fcbaf64 MCAUSE : 0x00000012 MTVAL : 0x0000001f
MHARTID : 0x0000000e
E (104955) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (104955) task_wdt: - IDLE (CPU 0)
E (104955) task_wdt: Tasks currently running:
E (104955) task_wdt: CPU 0: emcu
E (104955) task_wdt: Print CPU 0 (current core) backtrace
Print CPU 0 (current core) registers
Core 0 register dump:
MEPC : 0x4202639e RA : 0x42026368 SP : 0x3fcbb850 GP : 0x3fcb12a0
0x4202639e: i2c_ll_master_clr_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/hal/esp32c2/include/hal/i2c_ll.h:680 (discriminator 1)
(inlined by) s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77 (discriminator 1)
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100 (discriminator 1)
0x42026368: s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100

TP : 0x3fcbb980 T0 : 0x4005e3c8 T1 : 0x00000000 T2 : 0xffffffff
S0/FP : 0x00000007 S1 : 0x3fcbaf54 A0 : 0x3fcbaf64 A1 : 0x3fcbb858
A2 : 0x00000000 A3 : 0x00000800 A4 : 0x60013000 A5 : 0x00000013
A6 : 0x00000080 A7 : 0x42005b9e S2 : 0x3fcbaf64 S3 : 0x00000006
0x42005b9e: uart_write at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_uart/src/uart_vfs.c:207

S4 : 0x3fcbb8c0 S5 : 0x000000c8 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x00000000 T4 : 0x3fcb4102 T5 : 0x00001800 T6 : 0x00000000
MSTATUS : 0x00000000 MTVEC : 0x3fcbaf64 MCAUSE : 0x00000012 MTVAL : 0x0000001f
MHARTID : 0x0000000e
E (109955) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (109955) task_wdt: - IDLE (CPU 0)
E (109955) task_wdt: Tasks currently running:
E (109955) task_wdt: CPU 0: emcu
E (109955) task_wdt: Print CPU 0 (current core) backtrace
Print CPU 0 (current core) registers
Core 0 register dump:
MEPC : 0x4202639a RA : 0x42026368 SP : 0x3fcbb850 GP : 0x3fcb12a0
0x4202639a: i2c_ll_master_clr_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/hal/esp32c2/include/hal/i2c_ll.h:680 (discriminator 1)
(inlined by) s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77 (discriminator 1)
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100 (discriminator 1)
0x42026368: s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100

TP : 0x3fcbb980 T0 : 0x4005e3c8 T1 : 0x00000000 T2 : 0xffffffff
S0/FP : 0x00000007 S1 : 0x3fcbaf54 A0 : 0x3fcbaf64 A1 : 0x3fcbb858
A2 : 0x00000000 A3 : 0x00000800 A4 : 0x60013000 A5 : 0x00000001
A6 : 0x00000080 A7 : 0x42005b9e S2 : 0x3fcbaf64 S3 : 0x00000006
0x42005b9e: uart_write at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_uart/src/uart_vfs.c:207

S4 : 0x3fcbb8c0 S5 : 0x000000c8 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x00000000 T4 : 0x3fcb4102 T5 : 0x00001800 T6 : 0x00000000
MSTATUS : 0x00000000 MTVEC : 0x3fcbaf64 MCAUSE : 0x00000012 MTVAL : 0x0000001f
MHARTID : 0x0000000e
E (114955) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
E (114955) task_wdt: - IDLE (CPU 0)
E (114955) task_wdt: Tasks currently running:
E (114955) task_wdt: CPU 0: emcu
E (114955) task_wdt: Print CPU 0 (current core) backtrace
Print CPU 0 (current core) registers
Core 0 register dump:
MEPC : 0x4202639a RA : 0x42026368 SP : 0x3fcbb850 GP : 0x3fcb12a0
0x4202639a: i2c_ll_master_clr_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/hal/esp32c2/include/hal/i2c_ll.h:680 (discriminator 1)
(inlined by) s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77 (discriminator 1)
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100 (discriminator 1)
0x42026368: s_i2c_master_clear_bus at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:77
(inlined by) s_i2c_hw_fsm_reset at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_i2c/i2c_master.c:100

TP : 0x3fcbb980 T0 : 0x4005e3c8 T1 : 0x00000000 T2 : 0xffffffff
S0/FP : 0x00000007 S1 : 0x3fcbaf54 A0 : 0x3fcbaf64 A1 : 0x3fcbb858
A2 : 0x00000000 A3 : 0x00000800 A4 : 0x60013000 A5 : 0x00000001
A6 : 0x00000080 A7 : 0x42005b9e S2 : 0x3fcbaf64 S3 : 0x00000006
0x42005b9e: uart_write at C:/Users/flair/esp/v5.3.1/esp-idf/components/esp_driver_uart/src/uart_vfs.c:207

S4 : 0x3fcbb8c0 S5 : 0x000000c8 S6 : 0x00000000 S7 : 0x00000000
S8 : 0x00000000 S9 : 0x00000000 S10 : 0x00000000 S11 : 0x00000000
T3 : 0x00000000 T4 : 0x3fcb4102 T5 : 0x00001800 T6 : 0x00000000
MSTATUS : 0x00000000 MTVEC : 0x3fcbaf64 MCAUSE : 0x00000012 MTVAL : 0x0000001f
MHARTID : 0x0000000e

More Information.

在I2C_ll.h中 添加斜体粗体部分代码解决。 static inline void i2c_ll_master_clr_bus(i2c_dev_t *hw, uint32_t slave_pulses) { hw->scl_sp_conf.scl_rst_slv_num = slave_pulses; hw->scl_sp_conf.scl_rst_slv_en = 1; hw->ctr.conf_upgate = 1; // hardward will clear scl_rst_slv_en after sending SCL pulses, // and we should set conf_upgate bit to synchronize register value. _int wait_cnt = 0; while (hw->scl_sp_conf.scl_rst_slv_en) { wait_cnt++; if (waitcnt > 100000) break; }; hw->ctr.conf_upgate = 1; }

mythbuster5 commented 2 months ago

The fix is on the way