ошибка при перезагрузке ESP32

igorlab
Offline
Зарегистрирован: 11.11.2015

Привет!

есть скетч для ESP32 работающий на FreeRTOS, бывае, что при нажатии на кнопку EN несколько раз происходит перезагрузка (пардон за тафтологию) модуля, после чего он начинает нормально работать... бывает что пекрезагружается с первого раза нормально, без дополнительных "самоперезагрузок" ниже приведен лог:

НАЖАЛ РЕЗЕТ
23:26:14.321 -> ets Jun  8 2016 00:22:57
23:26:14.321 -> 
23:26:14.321 -> rst:0x1 (POWERON_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
23:26:14.356 -> configsip: 0, SPIWP:0xee
23:26:14.356 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
23:26:14.356 -> mode:DIO, clock div:1
23:26:14.356 -> load:0x3fff0018,len:4
23:26:14.356 -> load:0x3fff001c,len:1100
23:26:14.356 -> load:0x40078000,len:9232
23:26:14.356 -> load:0x40080400,len:6400
23:26:14.356 -> entry 0x400806a8
23:26:14.701 -> cout:>  ----------------------------------
23:26:14.701 -> cout:>  Read calibrated value from EEPROM: 
23:26:14.769 -> cout:>  -- ssid:ASUS; password: ***********
23:26:14.769 -> cout:>  Connect to WiFi...
23:26:14.837 -> cout:>  try: 0
23:26:15.353 -> cout:>  try: 1
23:26:15.835 -> cout:>  WiFi connected.
23:26:18.514 -> cout:>  SPIFFS Started successfully...
23:26:18.583 -> WiFi connected..
23:26:18.583 -> cout:>  Webserver started...
23:26:18.583 -> Use this URL to connect: http://192.168.1.74/
23:26:18.583 -> Webserver started...
23:26:18.644 -> cout:>  Restored data from SPIFFS
23:26:18.644 -> Server is setuped
23:26:18.644 -> COOLER_WATER_Channel is setuped
23:26:18.644 -> FreeRTOS tasks are setuped
ЗДЕСЬ ПЕРЕЗАГРУЗИЛОСЬ САМО!!!!
23:26:20.659 -> Guru Meditation Error: Core  0 panic'ed (LoadProhibited). Exception was unhandled.
23:26:20.659 -> Core 0 register dump:
23:26:20.659 -> PC      : 0x4012188d  PS      : 0x00060030  A0      : 0x80121f37  A1      : 0x3ffccfd0  
23:26:20.659 -> A2      : 0x3ffbb214  A3      : 0x3ffdeb48  A4      : 0x00000000  A5      : 0x3ffdf518  
23:26:20.730 -> A6      : 0x00000000  A7      : 0x00000000  A8      : 0x00000000  A9      : 0x3ffccfd0  
23:26:20.730 -> A10     : 0x3ffded3c  A11     : 0x00000000  A12     : 0x00000134  A13     : 0x3ffdee70  
23:26:20.730 -> A14     : 0xaf3ceefb  A15     : 0x00000013  SAR     : 0x0000000a  EXCCAUSE: 0x0000001c  
23:26:20.730 -> EXCVADDR: 0x00000010  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0x00000000  
23:26:20.730 -> 
23:26:20.730 -> Backtrace: 0x4012188d:0x3ffccfd0 0x40121f34:0x3ffcd000 0x40111e6d:0x3ffcd020 0x40111ead:0x3ffcd040 0x400e1fa9:0x3ffcd060 0x400e1a86:0x3ffcd2d0 0x400e1b55:0x3ffcd300 0x400e2366:0x3ffcd320 0x400e4009:0x3ffcd370 0x400d6b4d:0x3ffcd3e0 0x4008879d:0x3ffcd4a0
23:26:20.730 -> 
23:26:20.730 -> Rebooting...
23:26:20.730 -> ets Jun  8 2016 00:22:57
23:26:20.730 -> 
23:26:20.730 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
23:26:20.730 -> configsip: 0, SPIWP:0xee
23:26:20.730 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
23:26:20.777 -> mode:DIO, clock div:1
23:26:20.829 -> load:0x3fff0018,len:4
23:26:20.829 -> load:0x3fff001c,len:1100
23:26:20.829 -> load:0x40078000,len:9232
23:26:20.829 -> load:0x40080400,len:6400
23:26:20.829 -> entry 0x400806a8
23:26:21.107 -> cout:>  ----------------------------------
23:26:21.107 -> cout:>  Read calibrated value from EEPROM: 
23:26:21.141 -> cout:>  -- ssid:ASUS; password: *************
23:26:21.178 -> cout:>  Connect to WiFi...
23:26:21.246 -> cout:>  try: 0
23:26:21.765 -> cout:>  try: 1
23:26:22.250 -> cout:>  WiFi connected.
23:26:25.086 -> cout:>  SPIFFS Started successfully...
23:26:25.086 -> WiFi connected..
23:26:25.086 -> cout:>  Webserver started...
23:26:25.086 -> Use this URL to connect: http://192.168.1.74/
23:26:25.086 -> Webserver started...
23:26:25.121 -> cout:>  Restored data from SPIFFS
23:26:25.121 -> Server is setuped
23:26:25.121 -> COOLER_WATER_Channel is setuped
23:26:25.121 -> FreeRTOS tasks are setuped
ЗДЕСЬ ОПЯТЬ ПЕРЕЗАГРУЗИЛОСЬ САМО!!!!
23:26:27.221 -> Guru Meditation Error: Core  1 panic'ed (LoadProhibited). Exception was unhandled.
23:26:27.221 -> Core 1 register dump:
23:26:27.221 -> PC      : 0x40178672  PS      : 0x00060c30  A0      : 0x801162c7  A1      : 0x3ffb15f0  
23:26:27.221 -> A2      : 0x00000008  A3      : 0x3ffde194  A4      : 0x00000000  A5      : 0x00000000  
23:26:27.261 -> A6      : 0xf2fac842  A7      : 0x00000004  A8      : 0x00000000  A9      : 0x3ffb15d0  
23:26:27.261 -> A10     : 0x3ffb16a8  A11     : 0x00000000  A12     : 0x00000020  A13     : 0x3ffde1b4  
23:26:27.261 -> A14     : 0xc2811a4d  A15     : 0x50e38191  SAR     : 0x0000001f  EXCCAUSE: 0x0000001c  
23:26:27.261 -> EXCVADDR: 0x00000000  LBEG    : 0x4000c46c  LEND    : 0x4000c477  LCOUNT  : 0x00000000  
23:26:27.261 -> 
23:26:27.261 -> Backtrace: 0x40178672:0x3ffb15f0 0x401162c4:0x3ffb1610 0x4011630d:0x3ffb1640 0x4011a861:0x3ffb1660 0x4011aa5d:0x3ffb16e0 0x4011ac0b:0x3ffb1740 0x4011b091:0x3ffb18c0 0x401187fd:0x3ffb18e0 0x40118a0d:0x3ffb1940 0x40121961:0x3ffb1960 0x40121f34:0x3ffb1990 0x40111e6d:0x3ffb19b0 0x40111ead:0x3ffb19d0 0x400e1fa9:0x3ffb19f0 0x400e1a86:0x3ffb1c60 0x400e1b55:0x3ffb1c90 0x400e321a:0x3ffb1cb0 0x400e3515:0x3ffb1d20 0x400e3615:0x3ffb1d70 0x400da756:0x3ffb1da0 0x400e6047:0x3ffb1fb0 0x4008879d:0x3ffb1fd0
23:26:27.313 -> 
23:26:27.313 -> Rebooting...
23:26:27.313 -> ets Jun  8 2016 00:22:57
23:26:27.313 -> 
23:26:27.313 -> rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT)
23:26:27.313 -> configsip: 0, SPIWP:0xee
23:26:27.313 -> clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00
23:26:27.363 -> mode:DIO, clock div:1
23:26:27.363 -> load:0x3fff0018,len:4
23:26:27.363 -> load:0x3fff001c,len:1100
23:26:27.363 -> load:0x40078000,len:9232
23:26:27.363 -> load:0x40080400,len:6400
23:26:27.363 -> entry 0x400806a8
23:26:27.701 -> cout:>  ----------------------------------
23:26:27.701 -> cout:>  Read calibrated value from EEPROM: 
23:26:27.746 -> cout:>  -- ssid:ASUS; password: 12345678i
23:26:27.746 -> cout:>  Connect to WiFi...
23:26:27.837 -> cout:>  try: 0
23:26:28.353 -> cout:>  try: 1
23:26:28.831 -> cout:>  WiFi connected.
23:26:30.964 -> cout:>  SPIFFS Started successfully...
23:26:30.964 -> WiFi connected..
23:26:30.964 -> cout:>  Webserver started...
23:26:30.964 -> Use this URL to connect: http://192.168.1.74/
23:26:30.964 -> Webserver started...
23:26:31.030 -> cout:>  Restored data from SPIFFS
23:26:31.030 -> Server is setuped
23:26:31.030 -> COOLER_WATER_Channel is setuped
23:26:31.030 -> FreeRTOS tasks are setuped
23:26:32.862 -> COOLER_WATER_Channel is setuped
23:26:32.862 -> cout:>  system_get_free_heap_size 180400
ПОСЛЕ ЧЕГО ESP32 РАБОТАЕТ НОРМАЛЬНО.....

Дебагер расшифровывает эти коды так:

0x4008c800: invoke_abort at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/panic.c line 155
0x4008ca31: abort at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/esp32/panic.c line 170
0x400eabfb: __assert_func at ../../../.././newlib/libc/stdlib/assert.c line 63
0x4008c475: multi_heap_free at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/heap/multi_heap_poisoning.c line 214
0x40084ca2: heap_caps_free at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/heap/heap_caps.c line 268
0x40084edd: esp_mbedtls_mem_free at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/mbedtls/port/esp_mem.c line 34
0x40109b6e: mbedtls_free at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/mbedtls/mbedtls/library/platform.c line 64
0x40111fa6: mbedtls_ssl_free at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/mbedtls/mbedtls/library/ssl_tls.c line 8871
0x400e1bac: stop_ssl_socket(sslclient_context*, char const*, char const*, char const*) at C:\Users\userAppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\WiFiClientSecure\src\ssl_client.cpp line 252
0x400e1815: WiFiClientSecure::stop() at C:\Users\userAppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\WiFiClientSecure\src\WiFiClientSecure.cpp line 92
0x400e19e2: WiFiClientSecure::connect(char const*, unsigned short, char const*, char const*, char const*) at C:\Users\userAppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\WiFiClientSecure\src\WiFiClientSecure.cpp line 153
0x400e1aa1: WiFiClientSecure::connect(char const*, unsigned short) at C:\Users\userAppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\libraries\WiFiClientSecure\src\WiFiClientSecure.cpp line 111
0x400e3166: UniversalTelegramBot::sendPostToTelegram(String, ArduinoJson::JsonObject&) at ..\!Programs\libraries\Universal-Arduino-Telegram-Bot-master\src\UniversalTelegramBot.cpp line 104
0x400e3461: UniversalTelegramBot::sendPostMessage(ArduinoJson::JsonObject&) at ..\!Programs\libraries\Universal-Arduino-Telegram-Bot-master\src\UniversalTelegramBot.cpp line 621
0x400e3561: UniversalTelegramBot::sendMessage(String, String, String) at ..\!Programs\libraries\Universal-Arduino-Telegram-Bot-master\src\UniversalTelegramBot.cpp line 540
0x400da72a: setup() at ..\!Programs\!AquaController\!ESP32\Sketch_v_0.2/Sketch_v_0.2.ino line 244
0x400e5f93: loopTask(void*) at C:\Users\userAppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.2\cores\esp32\main.cpp line 14
0x4008879d: vPortTaskWrapper at /Users/ficeto/Desktop/ESP32/ESP32/esp-idf-public/components/freertos/port.c line 143

 

что это за ошибка такая - ведь не может же она один раз быть, второй отсутствовать...

Valera19701
Valera19701 аватар
Offline
Зарегистрирован: 18.10.2015

igorlab пишет:

что это за ошибка такая - ведь не может же она один раз быть, второй отсутствовать...

Может, если очередность загрузки неправильная, например если настройки вэбсервера хранятся в spiffs, и spiffs стартует позже вебсервера, так как два ядра, один раз успевает стартануть, другой раз нет

или не хватает тока по питанию