Use this forum to chat about hardware specific topics for the ESP8266 (peripherals, memory, clocks, JTAG, programming)

User avatar
By dayzman
#17493 The following crashes and the result is constant resets and I think the culprit is the os_delay_us() call. Does anyone know why?

Code: Select allstatic void ICACHE_FLASH_ATTR systemInitDoneHandler() {
   os_delay_us(5*1000000);
}

void user_init(void)
{
   // Configure the UART
   uart_init(BIT_RATE_115200, BIT_RATE_115200);
   system_init_done_cb(systemInitDoneHandler);
}


You should get constant resets:

Code: Select all ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x40100000, len 27200, room 16
tail 0
chksum 0xd7
load 0x3ffe8000, len 2392, room 8
tail 0
chksum 0x87
load 0x3ffe8960, len 1212, room 8
tail 4
chksum 0xea
csum 0xea
sd
 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x40100000, len 27200, room 16
tail 0
chksum 0xd7
load 0x3ffe8000, len 2392, room 8
tail 0
chksum 0x87
load 0x3ffe8960, len 1212, room 8
tail 4
chksum 0xea
csum 0xea
{$
User avatar
By cal
#17534 Moin,

your reboots are not crashes but a good thing:

You get watchdog resets (wdt).
This makes the device to reset after about 1s if the program seems to get stuck.

Delaying for a long time is the same. You may want to sleep or feed the watchdog in a loop.

Search for watchdog.

Cal