We use GitHub issues for development related discussions.
Please use the forum to ask questions.
Describe the issue
I want to add Bluetooth and WIFI functions to my project. Before adding them, all the code runs as expected, but once the statement is added, the program keeps restarting and resetting.I have tried running the WIFI scan and connection example separately on PlatfromIO, the result is normal, but as long as I add the initialization to my project, it keeps restarting.
In addition, I tried to add Bluetooth initialization separately. In the absence of WIFI initialization, I just added BluetoothSerial SerialBT; and it started to restart continuously.
If necessary, I am willing to provide the entire project to help fix this problem
0 0x4016dc42:0x3ffb1bc0 in lv_color_fill at lib\lvgl\src\misc/lv_color.c:50
1 0x400f2f63:0x3ffb1be0 in fill_normal at lib\lvgl\src\draw/lv_draw_blend.c:345
(inlined by) _lv_blend_fill at lib\lvgl\src\draw/lv_draw_blend.c:166
2 0x400de1fd:0x3ffb1c50 in draw_bg at lib\lvgl\src\draw/lv_draw_rect.c:178
(inlined by) lv_draw_rect at lib\lvgl\src\draw/lv_draw_rect.c:105
3 0x400d5458:0x3ffb1d30 in lv_obj_draw at lib\lvgl\src\core/lv_obj.c:471
(inlined by) lv_obj_event at lib\lvgl\src\core/lv_obj.c:688
4 0x4016d23b:0x3ffb1db0 in lv_obj_event_base at lib\lvgl\src\core/lv_event.c:299
5 0x400d327f:0x3ffb1dd0 in event_send_core at lib\lvgl\src\core/lv_event.c:299
6 0x400d3363:0x3ffb1df0 in lv_event_send at lib\lvgl\src\core/lv_event.c:299
7 0x400d9768:0x3ffb1e30 in lv_refr_obj at lib\lvgl\src\core/lv_refr.c:175
8 0x400d9830:0x3ffb1e80 in lv_refr_obj_and_children at lib\lvgl\src\core/lv_refr.c:175
9 0x400d9d52:0x3ffb1ea0 in lv_refr_area_part at lib\lvgl\src\core/lv_refr.c:175
10 0x400da16d:0x3ffb1f10 in lv_refr_area at lib\lvgl\src\core/lv_refr.c:466
(inlined by) lv_refr_areas at lib\lvgl\src\core/lv_refr.c:389
(inlined by) _lv_disp_refr_timer at lib\lvgl\src\core/lv_refr.c:216
11 0x400e8a15:0x3ffb1f60 in lv_timer_exec at lib\lvgl\src\misc/lv_timer.c:226
(inlined by) lv_timer_handler at lib\lvgl\src\misc/lv_timer.c:106
12 0x400d316f:0x3ffb1f90 in loop() at src/main.cpp:42
13 0x400fc975:0x3ffb1fb0 in loopTask(void*) at C:\Users\19021.platformio\packages\framework-arduinoespressif32\cores\esp32/main.cpp:23
14 0x4008b672:0x3ffb1fd0 in vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)
Rebooting...
ets Jul 29 2019 12:21:46
Expected Results
Can scan and connect WIFI and Bluetooth devices normally in the project
Actual Results
After adding the initialization code, it starts to restart continuously
ESP32 Chip version
ESP32-PICO-V3-02
ESP-IDF version
PlatfromIO Espressif32 3.3.2 (Already the latest board)
We use GitHub issues for development related discussions. Please use the forum to ask questions.
Describe the issue
Code to reproduce the issue
`#include "XYWatch_hal.h" void setup() { pinMode(PWR_ON, OUTPUT); digitalWrite(PWR_ON, HIGH);
Serial.begin(115200); / prepare for possible serial debug / Serial.println("Hello T-Watch"); XYWatch::HAL_Init();
XYWatchApp::AppInit(); Serial.println("XYWatch Setup done"); }
void loop() { lv_timer_handler(); / let the GUI do its work / XYWatch::HAL_Update(); }`
`#ifndef __XYWATCH_HALH
define __XYWATCH_HALH
include
include <Config/Config.h>
include
include "freertos/FreeRTOS.h"
include "freertos/task.h"
include
include "./Software/driver/Input.h"
include "OneButton.h"
include
include
include
include <TinyGPS++.h>
include
include
include
include
include
include
include
include
include "lv_demo.h"
include "../src/Software/Pages/AppManager.h"
include <../lv_lib_gif/lv_gif.h>
include "WiFi.h"
//#include "BluetoothSerial.h"
namespace XYWatch { void HAL_Init(); void HAL_Update(); void HAL_Sleep();
}
endif`
`#include "XYWatch_hal.h"
void lv_inc_loop(uint32_t millis, uint32_t time_ms) { static uint32_t Millis; if (millis - Millis > time_ms) { lv_tick_inc(time_ms); Millis = millis; } }
void XYWatch::HAL_Init(void) { Display_Init(); Touch_Init(); //Encoder_Init(); Backlight_Init(); //SD_Init(); lv_init(); lv_port_disp_init((TFT_eSPI *)Get_tft()); lv_port_indev_init(); //lv_fs_if_init(); AccSensor_Init(); MAG_Init(); RTC_Init(); Botton_Init(); //TempSensor_Init();
}
void XYWatch::HAL_Update(void) { static uint32_t ms; ms = millis(); lv_inc_loop(ms, 5); //GPS_Parse(); //TempSensor_Updata(ms, 41); Time_Updata(ms, 1000); MAG_Updata(ms, 100); AccSensor_Updata(ms, 100); Botton_Updata(ms, 10); }
void XYWatch::HAL_Sleep() { uint64_t mask; mask = 1ull << 32; Backlight_GradualLight(); pinMode(IICSCL, INPUT_PULLUP); pinMode(IICSDA, INPUT_PULLUP); pinMode(Touch_Int, INPUT_PULLUP); pinMode(PWR_ON, OUTPUT); digitalWrite(PWR_ON, LOW);
}
uint8_t XYWatch::HAL_Power() { return 70; } `
Debug Messages
rst:0xc (SW_CPU_RESET),boot:0x13 (SPI_FAST_FLASH_BOOT) configsip: 271414342, SPIWP:0xee clk_drv:0x00,q_drv:0x00,d_drv:0x00,cs0_drv:0x00,hd_drv:0x00,wp_drv:0x00 mode:DIO, clock div:2 load:0x3fff0018,len:4 load:0x3fff001c,len:1044 load:0x40078000,len:10124 load:0x40080400,len:5828 entry 0x400806a8 Hello T-Watch [I][esp32-hal-i2c.c:1138] i2cProcQueue(): Bus busy, reinit BMA423 Successful connection QMC5883L Successful connection [D][WiFiGeneric.cpp:374] _eventCallback(): Event: 0 - WIFI_READY [D][WiFiGeneric.cpp:374] _eventCallback(): Event: 2 - STA_START Dial_Frame Setup XYWatch Setup done Guru Meditation Error: Core 1 panic'ed (StoreProhibited). Exception was unhandled. Core 1 register dump: PC : 0x4016dc42 PS : 0x00060630 A0 : 0x800f2f66 A1 : 0x3ffb1bc0
A2 : 0x00000000 A3 : 0x00000010 A4 : 0x000000f0 A5 : 0x3ffb8df4 A6 : 0x00000001 A7 : 0xffffffff A8 : 0xa310a310 A9 : 0x0000a310
A10 : 0x000000ef A11 : 0x00000000 A12 : 0x000000ef A13 : 0x00000000 A14 : 0x00000020 A15 : 0xffffffff SAR : 0x00000001 EXCCAUSE: 0x0000001d
EXCVADDR: 0x00000000 LBEG : 0x400dca15 LEND : 0x400dca22 LCOUNT : 0x00000000
ELF file SHA256: 0000000000000000
Backtrace: 0x4016dc42:0x3ffb1bc0 0x400f2f63:0x3ffb1be0 0x400de1fd:0x3ffb1c50 0x400d5458:0x3ffb1d30 0x4016d23b:0x3ffb1db0 0x400d327f:0x3ffb1dd0 0x400d3363:0x3ffb1df0 0x400d9768:0x3ffb1e30 0x400d9830:0x3ffb1e80 0x400d9d52:0x3ffb1ea0 0x400da16d:0x3ffb1f10 0x400e8a15:0x3ffb1f60 0x400d316f:0x3ffb1f90 0x400fc975:0x3ffb1fb0 0x4008b672:0x3ffb1fd0
0 0x4016dc42:0x3ffb1bc0 in lv_color_fill at lib\lvgl\src\misc/lv_color.c:50
1 0x400f2f63:0x3ffb1be0 in fill_normal at lib\lvgl\src\draw/lv_draw_blend.c:345
2 0x400de1fd:0x3ffb1c50 in draw_bg at lib\lvgl\src\draw/lv_draw_rect.c:178
3 0x400d5458:0x3ffb1d30 in lv_obj_draw at lib\lvgl\src\core/lv_obj.c:471
4 0x4016d23b:0x3ffb1db0 in lv_obj_event_base at lib\lvgl\src\core/lv_event.c:299
5 0x400d327f:0x3ffb1dd0 in event_send_core at lib\lvgl\src\core/lv_event.c:299
6 0x400d3363:0x3ffb1df0 in lv_event_send at lib\lvgl\src\core/lv_event.c:299
7 0x400d9768:0x3ffb1e30 in lv_refr_obj at lib\lvgl\src\core/lv_refr.c:175
8 0x400d9830:0x3ffb1e80 in lv_refr_obj_and_children at lib\lvgl\src\core/lv_refr.c:175
9 0x400d9d52:0x3ffb1ea0 in lv_refr_area_part at lib\lvgl\src\core/lv_refr.c:175
10 0x400da16d:0x3ffb1f10 in lv_refr_area at lib\lvgl\src\core/lv_refr.c:466
11 0x400e8a15:0x3ffb1f60 in lv_timer_exec at lib\lvgl\src\misc/lv_timer.c:226
12 0x400d316f:0x3ffb1f90 in loop() at src/main.cpp:42
13 0x400fc975:0x3ffb1fb0 in loopTask(void*) at C:\Users\19021.platformio\packages\framework-arduinoespressif32\cores\esp32/main.cpp:23
14 0x4008b672:0x3ffb1fd0 in vPortTaskWrapper at /home/runner/work/esp32-arduino-lib-builder/esp32-arduino-lib-builder/esp-idf/components/freertos/port.c:355 (discriminator 1)
Rebooting... ets Jul 29 2019 12:21:46 Expected Results Can scan and connect WIFI and Bluetooth devices normally in the project Actual Results After adding the initialization code, it starts to restart continuously ESP32 Chip version ESP32-PICO-V3-02 ESP-IDF version
PlatfromIO Espressif32 3.3.2 (Already the latest board)
[env:esp32dev] platform = espressif32 board = pico32 framework = arduino board_build.partitions = huge_app.csv build_flags = -DCORE_DEBUG_LEVEL=5 ;-DBOARD_HAS_PSRAM ;-mfix-esp32-psram-cache-issue ;-CONFIG_SPIRAM_CACHE_WOrKAROUND board_build.f_cpu = 240000000L monitor_speed = 115200 monitor_filters = esp32_exception_decoder
Development kit used
PlatfromIO Core 5.1.1·Home 3.3.4
Development machine OS Windows 10 Compilation warnings/errors (if available)
If possible, copy the compilation log into a file and attach it here `> Executing task: C:\Users\19021.platformio\penv\Scripts\platformio.exe run <
Processing esp32dev (platform: espressif32; board: pico32; framework: arduino) ---------------------------------------------------------------------------------------------------------------------------------------------Verbose mode can be enabled via
-v, --verbose
option CONFIGURATION: https://docs.platformio.org/page/boards/espressif32/pico32.html PLATFORM: Espressif 32 (3.3.2) > ESP32 Pico Kit HARDWARE: ESP32 240MHz, 320KB RAM, 4MB Flash DEBUG: Current (esp-prog) External (esp-prog, iot-bus-jtag, jlink, minimodule, olimex-arm-usb-ocd, olimex-arm-usb-ocd-h, olimex-arm-usb-tiny-h, olimex-jtag-tiny, tumpa) PACKAGES: