Page 1 of 1

esp32s3 遇到的Task watchdog got triggered. The following tasks did not reset the watchdog in time故障

Posted: Tue Jun 18, 2024 12:18 pm
by liuDahua
代码重现主要是STM32H750给ESP32长期发数据的情况下发生:步骤如下:平板给esp32发数据:PagePara=0x06EAFF00。
esp32解析成功输出[0x06 0xEA 0xFF 0x00 ]
stm32H750发来数据:FE 03 00 C8 00 02 51 FA(Modbus)
esp32回复stm32H750数据:FE 03 04 06 EA FF 00 95 B0(Modbus)
Stm32H750 将长期发送类似下面的数据
FE 10 00 EA 00 06 0C 00 04 A8 5D 00 00 00 2A 00 07 00 4C 7E C1
其中可能还会收到平板发来的WF=?指令,这是esp32只需要回复WF=OK
一般收到FE 10 00 EA数据5-6条时,就一定发生Task watchdog got triggered.故障,
以下就是这个log记录:烦请指导如何定位需要增加延时函数的地方或排查故障的方法。
如需要提交代码,请指导需要哪段代码?

  1. I (1481450) WIFI: PagePara=0x06EAFF00,len=19
  2. [0x06 0xEA 0xFF 0x00 ]
  3. [udp_socket]:CmdNo=11
  4. Received:[ FE 03 00 C8 00 02 51 FA ]
  5. Reply:[ FE 03 04 06 EA FF 00 95 B0 ]
  6. Received:[ FE 10 00 EA 00 06 0C 00 04 A8 5D 00 00 00 2A 00 07 00 4C 7E C1 ]
  7. I (1482450) WIFI: Received 19 bytes from 192.168.4.2:
  8. I (1482450) WIFI:
  9. Reply:[ FE 10 00 EA 00 06 75 F0 00 ]
  10. Received:[ FE 10 00 EA 00 06 0C 00 04 A8 99 00 00 00 2A 00 07 00 4F 5C 05 ]
  11. I (1483050) WIFI: WF=?,len=4
  12. WF=OK
  13. I (1483050) WIFI: Received 4 bytes from 192.168.4.2:
  14. I (1483050) WIFI:
  15. I (1483860) WIFI: WF=?,len=4
  16. WF=OK
  17. I (1483860) WIFI: Received 4 bytes from 192.168.4.2:
  18. I (1483860) WIFI:
  19. Reply:[ FE 10 00 EA 00 06 75 F0 00 ]
  20. Received:[ FE 10 00 EA 00 06 0C 00 04 A8 C1 00 00 00 2A 00 07 00 4F C7 C6 FE 10 00 EA 00 06 0C 00 04 A8 F3 00 00 00 2A 00 07 00 4B 8B 64 ]
  21. Reply:[ FE 10 00 EA 00 06 75 F0 00 ]
  22. Received:[ FE 10 00 EA 00 06 0C 00 04 A9 1B 00 00 00 2A 00 07 00 4E B4 A6 FE 10 00 EA 00 06 0C 00 04 A9 4D 00 00 00 2A 00 07 00 4F A2 C5 ]
  23. I (1484890) WIFI: WF=?,len=4
  24. WF=OK
  25. I (1484890) WIFI: Received 4 bytes from 192.168.4.2:
  26. I (1484900) WIFI:
  27. I (1485840) WIFI: WF=?,len=4
  28. WF=OK
  29. I (1485840) WIFI: Received 4 bytes from 192.168.4.2:
  30. I (1485840) WIFI:
  31. Reply:[ FE 10 00 EA 00 06 75 F0 00 ]
  32. Received:[ FE 10 00 EA 00 06 0C 00 04 A9 6B 00 00 00 2A 00 07 00 4D 91 65 FE 10 00 EA 00 06 0C 00 04 A9 A7 00 00 00 2A 00 07 00 4F 15 A1 ]
  33. I (1486680) WIFI: WF=?,len=4
  34. WF=OK
  35. I (1486680) WIFI: Received 4 bytes from 192.168.4.2:
  36. I (1486680) WIFI:
  37. E (1486850) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
  38. E (1486850) task_wdt:  - IDLE1 (CPU 1)
  39. E (1486850) task_wdt: Tasks currently running:
  40. E (1486850) task_wdt: CPU 0: IDLE0
  41. E (1486850) task_wdt: CPU 1: IDLE1
  42. E (1486850) task_wdt: Print CPU 1 backtrace
  43.  
  44.  
  45.  0[4037DE2(:4x38C05 t0sk TCsB3Bat0hd0377o3 t0igFe9e3.0 he4f3ll7wB:0 tFsAsDus rx d0d3E6t 0e3FCA5he0 0tc037E i5:0imFC500
  46. dt:  - IDLE0 (CPU 0)
  47. E (1486850) task_wdt: Tasks currently running:
  48. E (1486850) task_wdt: CPU 0: IDLE0
  49. E (1486850) task_wdt: CPU 1: IDLE1
  50. E (1486850) task_wdt: Print CPU 0 (current core) backtrace
  51.  
  52.  
  53. Backtrace: 0x420115FB:0x3FC9AD80 0x42011A18:0x3FC9ADA0 0x40377639:0x3FC9ADD0 0x42011A18:0x3FCA5660 0x42003E6E:0x3FCA5680 0x4037EC35:0x3FCA56A0 0x4037DA25:0x3FCA56C0
  54. 0x420115fb: task_wdt_timeout_handling at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/task_wdt/task_wdt.c:441
  55. 0x42011a18: task_wdt_isr at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/task_wdt/task_wdt.c:515
  56. 0x40377639: _xt_lowint1 at D:/ESP/idf/v5.2.1/esp-idf/components/xtensa/xtensa_vectors.S:1240
  57. 0x42011a18: task_wdt_isr at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/task_wdt/task_wdt.c:515
  58. 0x42003e6e: esp_vApplicationIdleHook at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/freertos_hooks.c:59
  59. 0x4037ec35: prvIdleTask at D:/ESP/idf/v5.2.1/esp-idf/components/freertos/FreeRTOS-Kernel/tasks.c:4273 (discriminator 1)
  60. 0x4037da25: vPortTaskWrapper at D:/ESP/idf/v5.2.1/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:134
  61.  
  62.  
  63. E (1486850) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
  64. E (1486850) task_wdt:  - IDLE0 (CPU 0)
  65. E (1486850) task_wdt: Tasks currently running:
  66. E (1486850) task_wdt: CPU 0: IDLE0
  67. E (1486850) task_wdt: CPU 1: IDLE1
  68. E (1486850) task_wdt: Print CPU 0 (current core) backtrace
  69.  
  70.  
  71. Backtrace: 0x420115FB:0x3FC9AD80 0x42011A18:0x3FC9ADA0 0x40377639:0x3FC9ADD0 0x42011A18:0x3FCA5660 0x42003E6E:0x3FCA5680 0x4037EC35:0x3FCA56A0 0x4037DA25:0x3FCA56C0
  72. 0x420115fb: task_wdt_timeout_handling at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/task_wdt/task_wdt.c:441
  73. 0x42011a18: task_wdt_isr at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/task_wdt/task_wdt.c:515
  74. 0x40377639: _xt_lowint1 at D:/ESP/idf/v5.2.1/esp-idf/components/xtensa/xtensa_vectors.S:1240
  75. 0x42011a18: task_wdt_isr at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/task_wdt/task_wdt.c:515
  76. 0x42003e6e: esp_vApplicationIdleHook at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/freertos_hooks.c:59
  77. 0x4037ec35: prvIdleTask at D:/ESP/idf/v5.2.1/esp-idf/components/freertos/FreeRTOS-Kernel/tasks.c:4273 (discriminator 1)
  78. 0x4037da25: vPortTaskWrapper at D:/ESP/idf/v5.2.1/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:134
  79.  
  80.  
  81. E (1486850) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
  82. E (1486850) task_wdt:  - IDLE0 (CPU 0)
  83. E (1486850) task_wdt: Tasks currently running:
  84. E (1486850) task_wdt: CPU 0: IDLE0
  85. E (1486850) task_wdt: CPU 1: IDLE1
  86. E (1486850) task_wdt: Print CPU 0 (current core) backtrace
  87.  
  88.  
  89. Backtrace: 0x420115FB:0x3FC9AD80 0x42011A18:0x3FC9ADA0 0x40377639:0x3FC9ADD0 0x42011A18:0x3FCA5660 0x42003E6E:0x3FCA5680 0x4037EC35:0x3FCA56A0 0x4037DA25:0x3FCA56C0
  90. 0x420115fb: task_wdt_timeout_handling at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/task_wdt/task_wdt.c:441
  91. 0x42011a18: task_wdt_isr at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/task_wdt/task_wdt.c:515
  92. 0x40377639: _xt_lowint1 at D:/ESP/idf/v5.2.1/esp-idf/components/xtensa/xtensa_vectors.S:1240
  93. 0x42011a18: task_wdt_isr at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/task_wdt/task_wdt.c:515
  94. 0x42003e6e: esp_vApplicationIdleHook at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/freertos_hooks.c:59
  95. 0x4037ec35: prvIdleTask at D:/ESP/idf/v5.2.1/esp-idf/components/freertos/FreeRTOS-Kernel/tasks.c:4273 (discriminator 1)
  96. 0x4037da25: vPortTaskWrapper at D:/ESP/idf/v5.2.1/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:134
  97.  
  98.  
  99. E (1486850) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
  100. E (1486850) task_wdt:  - IDLE0 (CPU 0)
  101. E (1486850) task_wdt: Tasks currently running:
  102. E (1486850) task_wdt: CPU 0: IDLE0
  103. E (1486850) task_wdt: CPU 1: IDLE1
  104. E (1486850) task_wdt: Print CPU 0 (current core) backtrace
  105.  
  106.  
  107. Backtrace: 0x420115FB:0x3FC9AD80 0x42011A18:0x3FC9ADA0 0x40377639:0x3FC9ADD0 0x42011A18:0x3FCA5660 0x42003E6E:0x3FCA5680 0x4037EC35:0x3FCA56A0 0x4037DA25:0x3FCA56C0
  108. 0x420115fb: task_wdt_timeout_handling at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/task_wdt/task_wdt.c:441
  109. 0x42011a18: task_wdt_isr at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/task_wdt/task_wdt.c:515
  110. 0x40377639: _xt_lowint1 at D:/ESP/idf/v5.2.1/esp-idf/components/xtensa/xtensa_vectors.S:1240
  111. 0x42011a18: task_wdt_isr at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/task_wdt/task_wdt.c:515
  112. 0x42003e6e: esp_vApplicationIdleHook at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/freertos_hooks.c:59
  113. 0x4037ec35: prvIdleTask at D:/ESP/idf/v5.2.1/esp-idf/components/freertos/FreeRTOS-Kernel/tasks.c:4273 (discriminator 1)
  114. 0x4037da25: vPortTaskWrapper at D:/ESP/idf/v5.2.1/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:134
  115.  
  116.  
  117. E (1486850) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
  118. E (1486850) task_wdt:  - IDLE0 (CPU 0)
  119. E (1486850) task_wdt: Tasks currently running:
  120. E (1486850) task_wdt: CPU 0: IDLE0
  121. E (1486850) task_wdt: CPU 1: IDLE1
  122. E (1486850) task_wdt: Print CPU 0 (current core) backtrace
  123.  
  124.  
  125. Backtrace: 0x420115FB:0x3FC9AD80 0x42011A18:0x3FC9ADA0 0x40377639:0x3FC9ADD0 0x42011A18:0x3FCA5660 0x42003E6E:0x3FCA5680 0x4037EC35:0x3FCA56A0 0x4037DA25:0x3FCA56C0
  126. 0x420115fb: task_wdt_timeout_handling at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/task_wdt/task_wdt.c:441
  127. 0x42011a18: task_wdt_isr at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/task_wdt/task_wdt.c:515
  128. 0x40377639: _xt_lowint1 at D:/ESP/idf/v5.2.1/esp-idf/components/xtensa/xtensa_vectors.S:1240
  129. 0x42011a18: task_wdt_isr at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/task_wdt/task_wdt.c:515
  130. 0x42003e6e: esp_vApplicationIdleHook at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/freertos_hooks.c:59
  131. 0x4037ec35: prvIdleTask at D:/ESP/idf/v5.2.1/esp-idf/components/freertos/FreeRTOS-Kernel/tasks.c:4273 (discriminator 1)
  132. 0x4037da25: vPortTaskWrapper at D:/ESP/idf/v5.2.1/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:134
  133.  
  134.  
  135. E (1486850) task_wdt: Task watchdog got triggered. The following tasks/users did not reset the watchdog in time:
  136. E (1486850) task_wdt:  - IDLE0 (CPU 0)
  137. E (1486850) task_wdt: Tasks currently running:
  138. Guru Meditation Error: Core  0 panic'ed (Interrupt wdt timeout on CPU0).
  139.  
  140. Core  0 register dump:
  141. PC      : 0x4004883b  PS      : 0x00060f34  A0      : 0x80048c6c  A1      : 0x3fc9ac50
  142. 0x4004883b: uart_tx_one_char_uart in ROM
  143.  
  144. A2      : 0x6080c000  A3      : 0x0000000a  A4      : 0x00000000  A5      : 0x00000000
  145. A6      : 0x00000004  A7      : 0xffffffff  A8      : 0x60000000  A9      : 0x00000380
  146. A10     : 0x0000000a  A11     : 0x6000001c  A12     : 0x3fcef130  A13     : 0x3fc9add0
  147. A14     : 0x00000000  A15     : 0x3fc990b8  SAR     : 0x00000004  EXCCAUSE: 0x00000005
  148. EXCVADDR: 0x00000000  LBEG    : 0x40056f5c  LEND    : 0x40056f72  LCOUNT  : 0x00000000  
  149. 0x40056f5c: memcpy in ROM
  150. 0x40056f72: memcpy in ROM
  151.  
  152. Core  0 was running in ISR context:
  153. EPC1    : 0x4207f8ab  EPC2    : 0x00000000  EPC3    : 0x00000000  EPC4    : 0x4004883b
  154. 0x4207f8ab: uart_hal_write_txfifo at D:/ESP/idf/v5.2.1/esp-idf/components/hal/uart_hal_iram.c:27
  155. 0x4004883b: uart_tx_one_char_uart in ROM
  156.  
  157.  
  158.  
  159. Backtrace: 0x40048838:0x3fc9ac50 0x40048c69:0x3fc9ac70 0x40043d03:0x3fc9ac90 0x40043cd5:0x3fc9acb0 0x40044183:0x3fc9acd0 0x40044281:0x3fc9ad50 0x420119e3:0x3fc9ada0 0x40377639:0x3fc9add0 0x42011a18:0x3fca5660 0x42003e6e:0x3fca5680 0x4037ec35:0x3fca56a0 0x4037da25:0x3fca56c0
  160. 0x40048838: uart_tx_one_char_uart in ROM
  161. 0x40048c69: uart_tx_one_char in ROM
  162. 0x40043d03: ets_write_char_uart in ROM
  163. 0x40043cd5: ets_write_char in ROM
  164. 0x40044183: ets_vprintf in ROM
  165. 0x40044281: ets_printf in ROM
  166. 0x420119e3: task_wdt_isr at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/task_wdt/task_wdt.c:499 (discriminator 3)
  167. 0x40377639: _xt_lowint1 at D:/ESP/idf/v5.2.1/esp-idf/components/xtensa/xtensa_vectors.S:1240
  168. 0x42011a18: task_wdt_isr at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/task_wdt/task_wdt.c:515
  169. 0x42003e6e: esp_vApplicationIdleHook at D:/ESP/idf/v5.2.1/esp-idf/components/esp_system/freertos_hooks.c:59
  170. 0x4037ec35: prvIdleTask at D:/ESP/idf/v5.2.1/esp-idf/components/freertos/FreeRTOS-Kernel/tasks.c:4273 (discriminator 1)
  171. 0x4037da25: vPortTaskWrapper at D:/ESP/idf/v5.2.1/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:134
  172.  
  173.  
  174.  
  175. Core  1 register dump:
  176. PC      : 0x4037dc74  PS      : 0x00060d34  A0      : 0x82011820  A1      : 0x3fca5d50
  177. 0x4037dc74: spinlock_acquire at D:/ESP/idf/v5.2.1/esp-idf/components/esp_hw_support/include/spinlock.h:130
  178.  (inlined by) xPortEnterCriticalTimeout at D:/ESP/idf/v5.2.1/esp-idf/components/freertos/FreeRTOS-Kernel/portable/xtensa/port.c:473
  179.  
  180. A2      : 0x3fc99504  A3      : 0xffffffff  A4      : 0x64e5783e  A5      : 0x00060d23
  181. A6      : 0xb33fffff  A7      : 0x0000abab  A8      : 0x8037dc80  A9      : 0x3fca5d30
  182. A10     : 0x00000000  A11     : 0xb33f3232  A12     : 0x0000cdcd  A13     : 0x3fc9b350
  183. A14     : 0x3fc98da8  A15     : 0xffffffff  SAR     : 0x00000000  EXCCAUSE: 0x00000005  
  184. EXCVADDR: 0x00000000  LBEG    : 0x00000000  LEND    : 0x00000000  LCOUNT  : 0x00000000