ESP32-S3 SIM7670G-4G-EN - esp_http_client_init, called Guru Meditation Error: Core 1 panic’ed

Vitalii_Bondarenko
Posts: 5
Joined: Fri Oct 25, 2024 8:49 am

ESP32-S3 SIM7670G-4G-EN - esp_http_client_init, called Guru Meditation Error: Core 1 panic’ed

Postby Vitalii_Bondarenko » Thu Dec 05, 2024 2:47 pm

I’m programming esp32 s3 using platformio.
My board: ESP32-S3 SIM7670G-4G-EN
framework: Arduino.
I am start Wi-Fi and connect to the access point. Then I try to initiate http via the esp_http_client_init function. My controller gets an error and reboots.

My platformini file:
  1. [env:esp32-s3-R2N16R8_PSRAM]
  2. platform = espressif32
  3. board = esp32-s3-R2N16R8_PSRAM
  4. framework = arduino
  5. board_build.f_cpu = 240000000L
  6. monitor_speed = 115200
  7. upload_port = COM7
  8. monitor_port = COM7
  9. board_build.mcu = esp32s3
  10. upload_protocol = esptool
My code for init http:
  1. esp_http_client_handle_t client_http;
  2. esp_http_client_config_t htpp_cnf;
  3.  
  4. htpp_cnf.url = "http://httpbin.org/redirect/2";
  5. htpp_cnf.method = HTTP_METHOD_GET;
  6. htpp_cnf.event_handler = _http_event_handler;
  7.  
  8. ESP_LOGE(TAG,"Start init http");
  9.  
  10. client_http = esp_http_client_init (&htpp_cnf);
  11. if(client_http != NULL) ESP_LOGE(TAG,"http create client OK");
  12. else ESP_LOGE(TAG,"http client create FAILED");
  13.  
  14.  
  15. void FnTest_httpRequst(void)
  16. {
  17.  ESP_LOGE(TAG, "Http request");
  18.      esp_err_t err = esp_http_client_perform(client_http);
  19.     if (err == ESP_OK)
  20.         {
  21.         ESP_LOGE(TAG, "HTTP GET Status = %d, content_length = %d",
  22.          esp_http_client_get_status_code(client_http),
  23.          esp_http_client_get_content_length(client_http));
  24.     }
  25.     else {
  26.         ESP_LOGE(TAG, "HTTP GET request failed: %s", esp_err_to_name(err));
  27.         }
  28. }
After call function : "esp_http_client_init (&htpp_cnf); "
I get an error and the controller reboots. I tried other esp32-s3 boards, and I also tried using the Espressiv extension in VsCode, the result was the same.

The error is as follows:
Guru Meditation Error: Core 1 panic'ed (LoadProhibited). Exception was unhandled.

Core 1 register dump:
PC : 0x40056f8c PS : 0x00060c30 A0 : 0x8202bc3c A1 : 0x3fcebe10
A2 : 0x3fcf5268 A3 : 0x00000004 A4 : 0x00000006 A5 : 0x3fcf5268
A6 : 0x00ff0000 A7 : 0x00000000 A8 : 0x00000000 A9 : 0x3fcebde0
A10 : 0x3fcf5268 A11 : 0x00000000 A12 : 0x00000006 A13 : 0x00000006
A14 : 0x3c0a2c4d A15 : 0x3fcea100 SAR : 0x0000001a EXCCAUSE: 0x0000001c
EXCVADDR: 0x00000004 LBEG : 0x40056f5c LEND : 0x40056f72 LCOUNT : 0xffffffff


Backtrace: 0x40056f89:0x3fcebe10 0x4202bc39:0x3fcebe20 0x4202c235:0x3fcebe50 0x4200590a:0x3fcebe90 0x42005ae9:0x3fcebf40 0x4200755e:0x3fcebf80

Please help me, I don’t understand what the problem is.

MicroController
Posts: 1821
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: ESP32-S3 SIM7670G-4G-EN - esp_http_client_init, called Guru Meditation Error: Core 1 panic’ed

Postby MicroController » Fri Dec 06, 2024 1:42 pm

More code needed.

Are you sure all unused fields in htpp_cnf are initialized to 0?

Vitalii_Bondarenko
Posts: 5
Joined: Fri Oct 25, 2024 8:49 am

Re: ESP32-S3 SIM7670G-4G-EN - esp_http_client_init, called Guru Meditation Error: Core 1 panic’ed

Postby Vitalii_Bondarenko » Fri Dec 06, 2024 4:43 pm

Indeed, when all fields were initialized to 0, it worked!!
Thank you very much!!

Who is online

Users browsing this forum: Google [Bot] and 98 guests