正一叶子 发表于 2017-4-27 09:05:27

安信可模块 12F 烧入编译后的固件一直在重启 附代码

uint16 temp=750;
uint16 dianya,dianya2,dianya3;
uint8 js_time=1;
uint8 dianya2_time=1;
uint8 dianya3_time=1;
bool zt;

#define USER_TIME_MS 4000                                                   ///< 定时时间,单位:毫秒
LOCAL os_timer_t userTimer;

void ICACHE_FLASH_ATTR userTimerFunc(void)
{
        system_soft_wdt_stop();
        dianya=system_adc_read();
        currentDataPoint.valueshidu=dianya;
        os_printf("\r\nShidu1:%d",dianya);
        system_soft_wdt_feed();
        if(dianya>temp)
        {
                os_delay_us(1000*1000*dianya2_time);
                dianya2=system_adc_read();
                os_printf("\r\nShidu2:%d",dianya2);
                if(dianya2>temp)
                {
                        os_delay_us(1000*1000*dianya3_time);
                        dianya3=system_adc_read();
                        os_printf("\r\nShidu3:%d",dianya3);
                        if(dianya3>temp)
                        {
                                gpio_output_set(BIT5,0,BIT5,0);
                                os_delay_us(1000*1000*js_time);
                                currentDataPoint.valuejshui_zt=GPIO_INPUT_GET(GPIO_ID_PIN(5));
                                os_printf("\r\nJS_ing:%d",GPIO_INPUT_GET(GPIO_ID_PIN(5)));
                                gpio_output_set(0,BIT5,BIT5,0);
                                os_printf("\r\nJS_ing:%d",GPIO_INPUT_GET(GPIO_ID_PIN(5)));
                        }
                        else
                        {
                                currentDataPoint.valuejshui_zt=GPIO_INPUT_GET(GPIO_ID_PIN(5));
                        }
                }
                else
                {
                        currentDataPoint.valuejshui_zt=GPIO_INPUT_GET(GPIO_ID_PIN(5));
                }

        }
        else
        {
                currentDataPoint.valuejshui_zt=GPIO_INPUT_GET(GPIO_ID_PIN(5));
        }
        system_soft_wdt_restart();

    system_os_post(USER_TASK_PRIO_0, SIG_UPGRADE_DATA, 0);
}

void ICACHE_FLASH_ATTR user_init(void)
{
    \\主程序中只添加了这个写语句,其他默认不变。
    PIN_FUNC_SELECT(PERIPHS_IO_MUX_GPIO5_U, FUNC_GPIO5);
    system_soft_wdt_feed();
    os_timer_disarm(&userTimer);
    os_timer_setfn(&userTimer, (os_timer_func_t *)userTimerFunc, NULL);
    os_timer_arm(&userTimer, USER_TIME_MS, 1);

    os_printf("--- system_free_size = %d ---\n", system_get_free_heap_size());
}

以下是重启串口输出信息:
rl ?l?b|巶?抮抌?b岒nn瀕nn溾?bp寧lrlrlp騨? ?l b n鈢?? b岒nn?l寧l`?nn l`nr帓抧 拻l`p騨? r寽溾? b n鈢鞄帋b岒nn? l`?nn l`nr帓抧  ?lp騨? r寽溾囔l b n鈢寧?b岒nn? l`?nn l`nr帓抧 ?l`r拻n ?l`rl寣n湆騨n瀸炩宺nnn?l宐?l?抣寪n鄮n鞉n~寣ll鄝b 鞂llpb?br倢靗`nl巔岇l`bl`l?抧 瀗寬鈔l瀨b l l`rl---------------SDK version:2.0.0(5a875ba)--------------
system_get_free_heap_size=36688
reset reason: 6
---UPGRADE_FW_BIN1---
gpio_name 0
gpio_name 14
Get gagent config data from master eare.
Save gagent config data
Domain:api.gizwits.com:80.
tz in sec:28800,timezone:8.0
NWK_WIFI_ONBOARDING_UP
SC version: V2.5.4
OpenAirlink...
GAgent Start...

----------------------------------------- GAGENT INFO --------------------------------------

GAgent Product Soft Version: 04020021. Hard Version: 00ESP826
GAgent Compiled Time: Mar1 2017, 14:15:23.
GAgent cache first ssid ,key .
GAgent backup ssid , key .
GAgent mac :A020A6064656
GAgent passcode :MVAEOGMHPX len=10
GAgent did : len:0
GAgent old passcode:
GAgent old did : len:0
GAgent old pk :711f6f0f0a054ed3a1**** len:32
GAgent AP name:XPG-GAgent-4656
GAgent 3rd cloud :
GAgent M2M Host : , IP :0.0.0.0
GAgent GService Host : , Port :0 , IP :0.0.0.0
GAgent BizLogLev:00,SysLogLev:00
--------------------------------------------------------------------------------------

GAgent get local info ok.
MCU Protocol Vertion:00000004.
MCU P0 Vertion:00000002.
MCU Hard Vertion:03000001.
MCU Soft Vertion:03000003.
MCU old product_key:711f6f0f0a054ed3a1****.
MCU product_key:711f6f0f0a054ed3a1****.
MCU passcodeEnableTime:0 s.
GAgent Soft Version: 04020420. Hard Version: 00ESP826.
gizwitsInit OK
--- system_free_size = 26720 ---
mode : sta(a0:20:a6:06:46:56)
add if0
Fatal exception 9(LoadStoreAlignmentCause):
epc1=0x4020145f, epc2=0x00000000, epc3=0x00000000, excvaddr=0x4010045b, depc=0x00000000

ets Jan8 2013,rst cause:2, boot mode:(3,6)

load 0x40100000, len 2408, room 16
tail 8
chksum 0xe5
load 0x3ffe8000, len 776, room 0
tail 8
chksum 0x84
load 0x3ffe8310, len 632, room 0
tail 8
chksum 0xd8
csum 0xd8

2nd boot version : 1.6
SPI Speed      : 40MHz
SPI Mode       : QIO
SPI Flash Size & Map: 32Mbit(512KB+512KB)
jump to run user1 @ 1000

---------------SDK version:2.0.0(5a875ba)--------------
system_get_free_heap_size=36688
reset reason: 2
Fatal exception (9):
epc1=0x4020145f, epc2=0x00000000, epc3=0x00000000, excvaddr=0x4010045b, depc=0x00000000
---UPGRADE_FW_BIN1---
gpio_name 0
gpio_name 14
Get gagent config data from master eare.
Save gagent config data
Domain:api.gizwits.com:80.
tz in sec:28800,timezone:8.0
NWK_WIFI_ONBOARDING_UP
SC version: V2.5.4
OpenAirlink...
GAgent Start...

----------------------------------------- GAGENT INFO --------------------------------------

GAgent Product Soft Version: 04020021. Hard Version: 00ESP826
GAgent Compiled Time: Mar1 2017, 14:15:23.
GAgent cache first ssid ,key .
GAgent backup ssid , key .
GAgent mac :A020A6064656
GAgent passcode :MVAEOGMHPX len=10
GAgent did : len:0
GAgent old passcode:
GAgent old did : len:0
GAgent old pk :711f6f0f0a054ed3a1**** len:32
GAgent AP name:XPG-GAgent-4656
GAgent 3rd cloud :
GAgent M2M Host : , IP :0.0.0.0
GAgent GService Host : , Port :0 , IP :0.0.0.0
GAgent BizLogLev:00,SysLogLev:00
--------------------------------------------------------------------------------------

GAgent get local info ok.
MCU Protocol Vertion:00000004.
MCU P0 Vertion:00000002.
MCU Hard Vertion:03000001.
MCU Soft Vertion:03000003.
MCU old product_key:711f6f0f0a054ed3a1****.
MCU product_key:711f6f0f0a054ed3a1****.
MCU passcodeEnableTime:0 s.
GAgent Soft Version: 04020420. Hard Version: 00ESP826.
gizwitsInit OK
--- system_free_size = 26720 ---
mode : sta(a0:20:a6:06:46:56)
add if0

ets Jan8 2013,rst cause:4, boot mode:(3,6)

wdt reset
load 0x40100000, len 2408, room 16
tail 8
chksum 0xe5
load 0x3ffe8000, len 776, room 0
tail 8
chksum 0x84
load 0x3ffe8310, len 632, room 0
tail 8
chksum 0xd8
csum 0xd8

2nd boot version : 1.6
SPI Speed      : 40MHz
SPI Mode       : QIO
SPI Flash Size & Map: 32Mbit(512KB+512KB)
jump to run user1 @ 1000

boboP 发表于 2017-4-27 12:19:50

我看日志。你这里是没有解析到我们云端的ip地址,你路由器能连入外网么。你用手机开热点试试

风飞扬2018 发表于 2018-3-10 11:25:25

你好,我在这个ESP8266模组上也出现你类似的问题,请问你最终找到原因了没有?
Fatal exception 9(LoadStoreAlignmentCause):
epc1=0x4020145f, epc2=0x00000000, epc3=0x00000000, excvaddr=0x4010045b, depc=0x00000000
页: [1]
查看完整版本: 安信可模块 12F 烧入编译后的固件一直在重启 附代码