Xinyuan-LilyGO / T-ZigBee

Zigbee Ultra Low Power IOT Development Board
GNU Affero General Public License v3.0
77 stars 21 forks source link

Board periodically rebooting #43

Closed asat232 closed 2 months ago

asat232 commented 2 months ago

Minimal example

#include 

void setup()
{
    Serial.begin(115200);
    delay(10);
    Serial.println("======== Init done ==========");
}
void loop()
{
    Serial.print("=");
    vTaskDelay(1000 / portTICK_PERIOD_MS);
}

Constantly keep rebooting:

ESP-ROM:esp32c3-api1-20210207
Build:Feb  7 2021
rst:0x1 (POWERON),boot:0xd (SPI_FAST_FLASH_BOOT)
SPIWP:0xee
mode:DIO, clock div:1
load:0x3fcd5810,len:0x438
load:0x403cc710,len:0x90c
load:0x403ce710,len:0x2624
entry 0x403cc710

Time between reboots is not constant and can be from 10 seconds to 10 minutes. The same behaviour from time to time i observed with "factory_test". "zigbee2mqtt" and "light_demo" seems to be working fine, at least i have not seen it.

asat232 commented 2 months ago

Strange thing, i added in setup:

    pinMode(CONFIG_ZIGBEE_MODULE_PIN, OUTPUT);
    digitalWrite(CONFIG_ZIGBEE_MODULE_PIN, HIGH);
    delay(500);

    pinMode(CONFIG_BLUE_LIGHT_PIN, OUTPUT);
    digitalWrite(CONFIG_BLUE_LIGHT_PIN, HIGH);

and reboot happened after 16 minutes, next time after almost 30 minutes Board is powered by programming USB stick. I will test powering with battery.

asat232 commented 2 months ago

Just added to code WiFi functionality and board running already more than 2 hours without reboot (board is powered by the same programming USB stick) Any ideas?

asat232 commented 2 months ago

10 hours without reboot, the reason is clear, empty loop(), because

vTaskDelay(1000 / portTICK_PERIOD_MS);

and

delay(1000);

behave in a different way, and without delay() in a loop() i experienced reboot or crash on other boards too.