收藏官网首页
查看: 14778|回复: 2

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

1

主题

7

帖子

115

积分

注册会员

Rank: 2

积分
115
跳转到指定楼层
楼主
发表于 2017-4-27 09:05:27 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
免费使用STM32、APP自动代码生成工具
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
[Dev]  Get GAgent config data from master eare.
[Dev]  Save gagent config data
[Dev] Domain:api.gizwits.com:80.
[Dev] tz in sec:28800,timezone:8.0
[NWK] NWK_WIFI_ONBOARDING_UP
SC version: V2.5.4
[WiFiEvent] OpenAirlink...
[GAgent] GAgent Start...
[Local]
----------------------------------------- GAGENT INFO --------------------------------------

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

[Local] GAgent get local info ok.
[Local] MCU Protocol Vertion:00000004.
[Local] MCU P0 Vertion:00000002.
[Local] MCU Hard Vertion:03000001.
[Local] MCU Soft Vertion:03000003.
[Local] MCU old product_key:711f6f0f0a054ed3a1****.
[Local] MCU product_key:711f6f0f0a054ed3a1****.
[Local] MCU passcodeEnableTime:0 s.
[Local] 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 Jan  8 2013,rst cause:2, boot mode3,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
[Dev]  Get gagent config data from master eare.
[Dev]  Save gagent config data
[Dev] Domain:api.gizwits.com:80.
[Dev] tz in sec:28800,timezone:8.0
[NWK] NWK_WIFI_ONBOARDING_UP
SC version: V2.5.4
[WiFiEvent] OpenAirlink...
[GAgent] GAgent Start...
[Local]
----------------------------------------- GAGENT INFO --------------------------------------

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

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

ets Jan  8 2013,rst cause:4, boot mode3,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

34

主题

896

帖子

2274

积分

超级版主

Rank: 8Rank: 8

积分
2274
沙发
发表于 2017-4-27 12:19:50 | 只看该作者
我看日志。你这里是没有解析到我们云端的ip地址,你路由器能连入外网么。你用手机开热点试试

0

主题

1

帖子

6

积分

新手上路

Rank: 1

积分
6
板凳
发表于 2018-3-10 11:25:25 | 只看该作者
你好,我在这个ESP8266模组上也出现你类似的问题,请问你最终找到原因了没有?
Fatal exception 9(LoadStoreAlignmentCause):
epc1=0x4020145f, epc2=0x00000000, epc3=0x00000000, excvaddr=0x4010045b, depc=0x00000000
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

加入Q群 返回顶部

版权与免责声明 © 2006-2024 Gizwits IoT Technology Co., Ltd. ( 粤ICP备11090211号 )

快速回复 返回顶部 返回列表