I2C 新驱动引起无限重启

flair0626
Posts: 9
Joined: Mon Jan 17, 2022 7:03 am

I2C 新驱动引起无限重启

Postby flair0626 » Fri Sep 06, 2024 2:03 am

ESP32-C2 使用i2c新驱动时,当从站停止运行时会引起C2无线重启
ESP-IDF V5.3.1 ESP-IDF V5.3 均有这样的问题


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

flair0626
Posts: 9
Joined: Mon Jan 17, 2022 7:03 am

Re: I2C 新驱动引起无限重启

Postby flair0626 » Fri Sep 06, 2024 2:34 am

在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 (wait_cnt > 100000)
break;
};

hw->ctr.conf_upgate = 1;
}

Who is online

Users browsing this forum: No registered users and 153 guests