ESP8266 Developer Zone The Official ESP8266 Forum 2015-05-19T10:03:26+08:00 https://bbs.espressif.com:443/feed.php?f=7&t=446 2015-05-19T10:03:26+08:00 2015-05-19T10:03:26+08:00 https://bbs.espressif.com:443/viewtopic.php?t=446&p=1726#p1726 <![CDATA[Re: 一个简单crash v0.9.5的方法]]>
非 OS SDK 其实相当于单线程,您使用的 os_delay_us 其实是 while 住了系统,影响底层喂看门狗,因而看门狗复位了。

详细请参考 BBS http://bbs.espressif.com/viewtopic.php?f=10&t=323

Statistics: Posted by ESP_Faye — Tue May 19, 2015 10:03 am


]]>
2015-05-16T01:27:31+08:00 2015-05-16T01:27:31+08:00 https://bbs.espressif.com:443/viewtopic.php?t=446&p=1702#p1702 <![CDATA[一个简单crash v0.9.5的方法]]>
结果是不断重启。

Code:

#define DELAY 1000 /* milliseconds */

LOCAL os_timer_t hello_timer;
extern int ets_uart_printf(const char *fmt, ...);

LOCAL void ICACHE_FLASH_ATTR hello_cb(void *arg)
{
   ets_uart_printf("Hello World!\r\n");
}

static 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);

   os_timer_disarm(&hello_timer);
   os_timer_setfn(&hello_timer, (os_timer_func_t *)hello_cb, (void *)0);
   os_timer_arm(&hello_timer, DELAY, 1);

   system_init_done_cb(systemInitDoneHandler);
}



Code:

wdt reset
load 0x40100000, len 27256, room 16
tail 8
chksum 0x8e
load 0x3ffe8000, len 2392, room 0
tail 8
chksum 0x4e
load 0x3ffe8960, len 1228, room 0
tail 12
chksum 0x94
csum 0x94
{$
 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x40100000, len 27256, room 16
tail 8
chksum 0x8e
load 0x3ffe8000, len 2392, room 0
tail 8
chksum 0x4e
load 0x3ffe8960, len 1228, room 0
tail 12
chksum 0x94
csum 0x94
;l
 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x40100000, len 27256, room 16
tail 8
chksum 0x8e
load 0x3ffe8000, len 2392, room 0
tail 8
chksum 0x4e
load 0x3ffe8960, len 1228, room 0
tail 12
chksum 0x94
csum 0x94
{l
 ets Jan  8 2013,rst cause:4, boot mode:(3,7)

wdt reset
load 0x40100000, len 27256, room 16
tail 8
chksum 0x8e
load 0x3ffe8000, len 2392, room 0
tail 8
chksum 0x4e
load 0x3ffe8960, len 1228, room 0
tail 12
chksum 0x94
csum


:?:

Statistics: Posted by xiaodong — Sat May 16, 2015 1:27 am


]]>