esp32 不断重启

testcode
Posts: 2
Joined: Wed Nov 30, 2022 2:20 am

esp32 不断重启

Postby testcode » Wed Nov 30, 2022 2:31 am

就是我在使用esp_http_client_init()函数时,运行时会报错,板子不断reboot,这是什么原因导致的,有什么解决的办法吗?
以下是我调用esp_http_client_init()的相关函数
esp_http_client_config_t config;
config.event_handler = ocr_http_event_handler;
config.buffer_size = 4 * 1024;
config.timeout_ms = 4000;

config.url = temp_url.c_str();
Serial.print("config.url = ");
Serial.println(config.url);

esp_http_client_handle_t client = esp_http_client_init(&config);
esp_http_client_set_method(client, HTTP_METHOD_POST);
esp_http_client_set_header(client, "Content-Type", "application/x-www-form-urlencoded");
esp_http_client_set_post_field(client, temp_url.c_str(), sizeof(temp_url.c_str()));


以下是报错的内容

Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.
Core 1 register dump:
PC : 0x4008d858 PS : 0x00060730 A0 : 0x800d7a48 A1 : 0x3ffb1e00
A2 : 0x0000000f A3 : 0x0000000b A4 : 0x000000ff A5 : 0x0000ff00
A6 : 0x00ff0000 A7 : 0xff000000 A8 : 0x00000001 A9 : 0x00000000
A10 : 0x3ffdf50c A11 : 0x3f401614 A12 : 0x000000ff A13 : 0x0000ff00
A14 : 0x00ff0000 A15 : 0xff000000 SAR : 0x00000019 EXCCAUSE: 0x0000001c
EXCVADDR: 0x0000000f LBEG : 0x4008d879 LEND : 0x4008d889 LCOUNT : 0xfffffffd

ELF file SHA256: 0000000000000000

Backtrace: 0x4008d858:0x3ffb1e00 0x400d7a45:0x3ffb1e10 0x400d161b:0x3ffb1e30 0x400d1bb9:0x3ffb1ec0 0x400d537c:0x3ffb1fb0 0x400908de:0x3ffb1fd0

以下是错误的出处
C:\Users\28032\AppData\Local\Arduino15\packages\esp32\tools\xtensa-esp32-elf-gcc\1.22.0-97-gc752ad5-5.2.0\bin>xtensa-esp32-elf-addr2line -e python.ino.elf 0x4008d858:0x3ffb1e00 0x400d7a45:0x3ffb1e10 0x400d161b:0x3ffb1e30 0x400d1bb9:0x3ffb1ec0 0x400d537c:0x3ffb1fb0 0x400908de:0x3ffb1fd0
/home/mak/e/p/newlib_old/newlib_xtensa-bin/newlib_xtensa-2.2.0/xtensa-esp32-elf/newlib/libc/machine/xtensa/../../../../.././newlib/libc/machine/xtensa/strlen.S:46
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/esp_http_client/esp_http_client.c:335
C:\Users\28032\Documents\Arduino\python/python.ino:163
C:\Users\28032\Documents\Arduino\python/python.ino:283
C:\Users\28032\AppData\Local\Arduino15\packages\esp32\hardware\esp32\1.0.6\cores\esp32/main.cpp:30
/home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)

Who is online

Users browsing this forum: No registered users and 42 guests