您好,在user_webserver.c文件中,我想通过设置stationap模式,然后通过linux系统发送路由的ssid和password给esp8266,但是发现他一接收连入路由的数据后,串口不能正常打印自己写的log信息,然后直接崩溃了
根据奔溃的地址为去查看的反汇编代码
40235d18: 0000c0 callx0 a0
40235d1b: 02cd mov.n a12, a2
40235d1d: b29c beqz.n a2, 40235d3c <ssl_ctx_new+0x40>
40235d1f: 0108 l32i.n a0, a1, 0
40235d21: 0209 s32i.n a0, a2, 0
40235d23: 07d145 call0 4023da38 <RNG_initialize>
40235d26: 0c2d mov.n a2, a12
40235d28: ff0d85 call0 40234e04 <load_key_certs>
40235d2b: 0122d6 bgez a2, 40235d41 <ssl_ctx_new+0x45>
40235d2e: 0c2d mov.n a2, a12
40235d30: fff231 l32r a3, 40235cf8 <do_client_connect+0x328>
40235d33: b6a042 movi a4, 182
40235d36: 2e2401 l32r a0, 402015c8 <user_uart_wait_tx_fifo_empty+0x328>
在地址位0x4023da38出现了崩溃错误
4023da38 <RNG_initialize>:
4023da38: f00d ret.n
...
然后去看了RNG_initialize,发现这只是一个函数调用的过程
程序的崩溃信息(上方的空白地方本来是自己打印的log函数,发现打印不成功)
Fatal exception 0(IllegalInstructionCause):
epc1=0x4023da38, epc2=0x00000000, epc3=0x00000000, excvaddr=0x00000000, depc=0x00000000
ets Jan 8 2013,rst cause:2, boot mode:(3,7)
load 0x40100000, len 1396, room 16
tail 4
chksum 0x89
load 0x3ffe8000, len 776, room 4
个人对反汇编不太了解,只看得出出错在串口的位置
void ICACHE_FLASH_ATTR
UART_WaitTxFifoEmpty(uint8 uart_no , uint32 time_out_us) //do not use if tx flow control enabled
{
uint32 t_s = system_get_time();
while (READ_PERI_REG(UART_STATUS(uart_no)) & (UART_TXFIFO_CNT << UART_TXFIFO_CNT_S)){
if(( system_get_time() - t_s )> time_out_us){
break;
}
WRITE_PERI_REG(0X60000914, 0X73);//WTD
}
}
串口的函数是上面这个,但是不知道怎么去修改
然后再重新烧写user1.bin,发现能正常连接路由器
不太懂是哪里的原因造成串口 (串口已经换成串口1输出log信息,串口0作为通讯的接口) 打印不到信息,然后直接崩溃的错误
期待您的答复
在stationap模式下,连上了wifi后程序崩溃
-
- Posts: 11
- Joined: Wed Apr 27, 2016 4:22 pm
Who is online
Users browsing this forum: No registered users and 13 guests
Login
Newbies Start Here
Are you new to ESP8266?
Unsure what to do?
Dunno where to start?
Start right here!
Latest SDK
Documentation
Complete listing of the official ESP8266 related documentation release by ESPRESSIF!
Must read here!
- All times are UTC+08:00
- Top
- Delete all board cookies
About Us
Espressif Systems is a fabless semiconductor company providing cutting-edge low power WiFi SoCs and wireless solutions for wireless communications and Internet of Things applications. We are the manufacturer of ESP8266EX.