zhangbo
2 天以前 8316843f9c1046459d66d7fd79d2b172fc4903d0
能正确休眠版本
已修改8个文件
20649 ■■■■ 文件已修改
keil/JLinkLog.txt 15702 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
keil/Listings/uwb_simple_example.map 4833 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
keil/Objects/uwb_simple_example.build_log.htm 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
keil/Objects/uwb_simple_example.htm 10 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
keil/Objects/uwb_simple_example_MK8000 Release.dep 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
keil/include/drivers/PCA9555.c 8 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
keil/include/main/main.c 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
keil/include/src/TCPClient.c 84 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
keil/JLinkLog.txt
ÎļþÌ«´ó
keil/Listings/uwb_simple_example.map
ÎļþÌ«´ó
keil/Objects/uwb_simple_example.build_log.htm
@@ -34,7 +34,7 @@
linking...
.\Objects\uwb_simple_example.axf: Warning: L6304W: Duplicate input file .\objects\lis3dh_driver_1.o ignored.
.\include\devices\MK800X\Source\ARM\MK800X_ac6_copy.sct(25): warning: L6314W: No section matches pattern *(.XIP_SECTION).
Program Size: Code=92144 RO-data=12216 RW-data=2112 ZI-data=60344
Program Size: Code=91872 RO-data=12200 RW-data=2112 ZI-data=60344
Finished: 0 information, 2 warning and 0 error messages.
FromELF: creating hex file...
After Build - User command #1: fromelf.exe --bincombined -o "Output\uwb_simple_example.bin" "D:\zhangbo\2024\Code\ChinaUWB\ChinaUWBProject-1-5HZ\keil\Objects\uwb_simple_example.axf"
@@ -52,7 +52,7 @@
  D:\keil\pack\MKSEMI\MK800X_DFP\1.0.3\Device\Include
<h2>Collection of Component Files used:</h2>
Build Time Elapsed:  00:00:01
Build Time Elapsed:  00:00:02
</pre>
</body>
</html>
keil/Objects/uwb_simple_example.htm
@@ -3,7 +3,7 @@
<title>Static Call Graph - [.\Objects\uwb_simple_example.axf]</title></head>
<body><HR>
<H1>Static Call Graph for image .\Objects\uwb_simple_example.axf</H1><HR>
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 6140002: Last Updated: Wed Jul  2 18:43:42 2025
<BR><P>#&#060CALLGRAPH&#062# ARM Linker, 6140002: Last Updated: Wed Jul  2 19:40:22 2025
<BR><P>
<H3>Maximum Stack Usage =       1620 bytes + Unknown(Cycles, Untraceable Function Pointers)</H3><H3>
Call chain for Maximum Stack Depth:</H3>
@@ -2516,7 +2516,7 @@
<LI><a href="#[3e]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;TCPClient_SocketEventProc
</UL>
<P><STRONG><a name="[18a]"></a>PCA9555_init</STRONG> (Thumb, 696 bytes, Stack size 72 bytes, pca9555.o(.text.PCA9555_init))
<P><STRONG><a name="[18a]"></a>PCA9555_init</STRONG> (Thumb, 672 bytes, Stack size 72 bytes, pca9555.o(.text.PCA9555_init))
<BR><BR>[Stack]<UL><LI>Max Depth = 160<LI>Call Chain = PCA9555_init &rArr; IIC_Read_Pca9555 &rArr; IIC2_Read_pca_Byte
</UL>
<BR>[Calls]<UL><LI><a href="#[151]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;IIC_Write_Pca9555
@@ -3938,7 +3938,7 @@
<BR><BR>[Called By]<UL><LI><a href="#[21a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;power_enter_power_down_mode
</UL>
<P><STRONG><a name="[2b]"></a>main</STRONG> (Thumb, 732 bytes, Stack size 16 bytes, main.o(.text.main))
<P><STRONG><a name="[2b]"></a>main</STRONG> (Thumb, 736 bytes, Stack size 16 bytes, main.o(.text.main))
<BR><BR>[Stack]<UL><LI>Max Depth = 1228<LI>Call Chain = main &rArr; IdleTask &rArr; UART_CheckReceive &rArr; DBG_Poll &rArr; UsartParseDataHandler &rArr; GPS_RecvFsm &rArr; UDPClient_UploadGPS &rArr; Socket_Send &rArr; HIDO_Debug &rArr; Uart_Send &rArr; uart_send &rArr; dma_transfer &rArr; trace_assert_dump &rArr; trace_print_backtrace &rArr; mk_snprintf &rArr; trace_format &rArr; _PrintInt &rArr; _PrintUnsigned &rArr; __aeabi_uidiv
</UL>
<BR>[Calls]<UL><LI><a href="#[1d6]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;adc_open
@@ -4005,7 +4005,7 @@
</UL>
<BR>[Address Reference Count : 1]<UL><LI> entry9a.o(.ARM.Collect$$$$0000000B)
</UL>
<P><STRONG><a name="[217]"></a>mcu_deep_sleep</STRONG> (Thumb, 128 bytes, Stack size 16 bytes, main.o(.text.mcu_deep_sleep))
<P><STRONG><a name="[217]"></a>mcu_deep_sleep</STRONG> (Thumb, 112 bytes, Stack size 16 bytes, main.o(.text.mcu_deep_sleep))
<BR><BR>[Stack]<UL><LI>Max Depth = 884<LI>Call Chain = mcu_deep_sleep &rArr; power_enter_power_down_mode &rArr; phy_restore &rArr; phy_tx_regs_config &rArr; trace_printf &rArr; trace_output &rArr;  trace_printf (Cycle)
</UL>
<BR>[Calls]<UL><LI><a href="#[21a]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;power_enter_power_down_mode
@@ -5267,7 +5267,7 @@
</UL>
<BR>[Address Reference Count : 1]<UL><LI> uwb_app.o(.text.Uwb_init)
</UL>
<P><STRONG><a name="[3e]"></a>TCPClient_SocketEventProc</STRONG> (Thumb, 2532 bytes, Stack size 600 bytes, tcpclient.o(.text.TCPClient_SocketEventProc))
<P><STRONG><a name="[3e]"></a>TCPClient_SocketEventProc</STRONG> (Thumb, 2300 bytes, Stack size 600 bytes, tcpclient.o(.text.TCPClient_SocketEventProc))
<BR><BR>[Stack]<UL><LI>Max Depth = 1620<LI>Call Chain = TCPClient_SocketEventProc &rArr; Socket_Send &rArr; HIDO_Debug &rArr; Uart_Send &rArr; uart_send &rArr; dma_transfer &rArr; trace_assert_dump &rArr; trace_print_backtrace &rArr; mk_snprintf &rArr; trace_format &rArr; _PrintInt &rArr; _PrintUnsigned &rArr; __aeabi_uidiv
</UL>
<BR>[Calls]<UL><LI><a href="#[1b5]">&gt;&gt;</a>&nbsp;&nbsp;&nbsp;flash_write_nbytes
keil/Objects/uwb_simple_example_MK8000 Release.dep
@@ -481,7 +481,7 @@
I (include\drivers\mk_io.h)(0x6721A6AD)
F (.\sn74hc595.h)(0x68510030)()
F (.\mk_4G.h)(0x68510030)()
F (.\include\drivers\PCA9555.c)(0x6864FFB8)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c -fno-rtti -funsigned-char -D__MICROLIB -gdwarf-3 -O3 -ffunction-sections -w -I ./include/drivers -I .. -I ./include/board -I ./include/CMSIS/Include -I ./include/components/algo/inc -I ./include/components/crc -I ./include/components/libc -I ./include/components/wsf/include -I ./include/components/wsf/include/platform -I ./include/devices/MK800X/Include -I ./include/drivers -I ./include/components/hido/Include -I ./include/components/internet/inc -I ./include/components/hal -I ../keil -I ./include/src -I ./include/components/internet/src -Wno-declaration-after-statement -Wno-double-promotion -Wno-extra-semi-stmt -Wno-gnu-zero-variadic-macro-arguments -Wno-padded -Wno-unused-parameter -I./RTE/_MK8000_Release -ID:/keil/pack/MKSEMI/MK800X_DFP/1.0.3/Device/Include -ID:/keil/ARM/CMSIS/Include -D__UVISION_VERSION="530" -D_RTE_ -DUWB_EN -DSTD_LIBC -o ./objects/pca9555.o -MD)
F (.\include\drivers\PCA9555.c)(0x68651A13)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c -fno-rtti -funsigned-char -D__MICROLIB -gdwarf-3 -O3 -ffunction-sections -w -I ./include/drivers -I .. -I ./include/board -I ./include/CMSIS/Include -I ./include/components/algo/inc -I ./include/components/crc -I ./include/components/libc -I ./include/components/wsf/include -I ./include/components/wsf/include/platform -I ./include/devices/MK800X/Include -I ./include/drivers -I ./include/components/hido/Include -I ./include/components/internet/inc -I ./include/components/hal -I ../keil -I ./include/src -I ./include/components/internet/src -Wno-declaration-after-statement -Wno-double-promotion -Wno-extra-semi-stmt -Wno-gnu-zero-variadic-macro-arguments -Wno-padded -Wno-unused-parameter -I./RTE/_MK8000_Release -ID:/keil/pack/MKSEMI/MK800X_DFP/1.0.3/Device/Include -ID:/keil/ARM/CMSIS/Include -D__UVISION_VERSION="530" -D_RTE_ -DUWB_EN -DSTD_LIBC -o ./objects/pca9555.o -MD)
I (include\drivers\PCA9555.h)(0x68510435)
I (include\board\board.h)(0x68510435)
I (include\drivers\mk_common.h)(0x6721A6AD)
@@ -771,7 +771,7 @@
I (include\drivers\mk_gpio.h)(0x6721A6AD)
I (include\drivers\Usart.h)(0x6721A6AD)
I (include\drivers\global_param.h)(0x68649A81)
F (.\include\main\main.c)(0x68650D1A)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c -fno-rtti -funsigned-char -D__MICROLIB -gdwarf-3 -O3 -ffunction-sections -w -I ./include/board -I ../keil -I .. -I ./include/board -I ./include/CMSIS/Include -I ./include/components/algo/inc -I ./include/components/crc -I ./include/components/libc -I ./include/components/wsf/include -I ./include/components/wsf/include/platform -I ./include/devices/MK800X/Include -I ./include/drivers -I ./include/components/hido/Include -I ./include/components/internet/inc -I ./include/components/hal -I ../keil -I ./include/src -I ./include/components/internet/src -Wno-declaration-after-statement -Wno-double-promotion -Wno-extra-semi-stmt -Wno-gnu-zero-variadic-macro-arguments -Wno-padded -Wno-unused-parameter -I./RTE/_MK8000_Release -ID:/keil/pack/MKSEMI/MK800X_DFP/1.0.3/Device/Include -ID:/keil/ARM/CMSIS/Include -D__UVISION_VERSION="530" -D_RTE_ -DUWB_EN -DSTD_LIBC -o ./objects/main.o -MD)
F (.\include\main\main.c)(0x68651A13)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c -fno-rtti -funsigned-char -D__MICROLIB -gdwarf-3 -O3 -ffunction-sections -w -I ./include/board -I ../keil -I .. -I ./include/board -I ./include/CMSIS/Include -I ./include/components/algo/inc -I ./include/components/crc -I ./include/components/libc -I ./include/components/wsf/include -I ./include/components/wsf/include/platform -I ./include/devices/MK800X/Include -I ./include/drivers -I ./include/components/hido/Include -I ./include/components/internet/inc -I ./include/components/hal -I ../keil -I ./include/src -I ./include/components/internet/src -Wno-declaration-after-statement -Wno-double-promotion -Wno-extra-semi-stmt -Wno-gnu-zero-variadic-macro-arguments -Wno-padded -Wno-unused-parameter -I./RTE/_MK8000_Release -ID:/keil/pack/MKSEMI/MK800X_DFP/1.0.3/Device/Include -ID:/keil/ARM/CMSIS/Include -D__UVISION_VERSION="530" -D_RTE_ -DUWB_EN -DSTD_LIBC -o ./objects/main.o -MD)
I (include\drivers\mk_trace.h)(0x6721A6AD)
I (include\drivers\mk_common.h)(0x6721A6AD)
I (D:\keil\ARM\ARMCLANG\include\stddef.h)(0x5DDFFD72)
@@ -893,7 +893,7 @@
I (include\drivers\mk_gpio.h)(0x6721A6AD)
I (include\drivers\mk_io.h)(0x6721A6AD)
I (include\drivers\mk_calib.h)(0x6721A6AD)
F (.\include\src\TCPClient.c)(0x6864D5BC)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c -fno-rtti -funsigned-char -D__MICROLIB -gdwarf-3 -O3 -ffunction-sections -w -I ./include/board -I ../keil -I .. -I ./include/board -I ./include/CMSIS/Include -I ./include/components/algo/inc -I ./include/components/crc -I ./include/components/libc -I ./include/components/wsf/include -I ./include/components/wsf/include/platform -I ./include/devices/MK800X/Include -I ./include/drivers -I ./include/components/hido/Include -I ./include/components/internet/inc -I ./include/components/hal -I ../keil -I ./include/src -I ./include/components/internet/src -Wno-declaration-after-statement -Wno-double-promotion -Wno-extra-semi-stmt -Wno-gnu-zero-variadic-macro-arguments -Wno-padded -Wno-unused-parameter -I./RTE/_MK8000_Release -ID:/keil/pack/MKSEMI/MK800X_DFP/1.0.3/Device/Include -ID:/keil/ARM/CMSIS/Include -D__UVISION_VERSION="530" -D_RTE_ -DUWB_EN -DSTD_LIBC -o ./objects/tcpclient.o -MD)
F (.\include\src\TCPClient.c)(0x686514B5)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c -fno-rtti -funsigned-char -D__MICROLIB -gdwarf-3 -O3 -ffunction-sections -w -I ./include/board -I ../keil -I .. -I ./include/board -I ./include/CMSIS/Include -I ./include/components/algo/inc -I ./include/components/crc -I ./include/components/libc -I ./include/components/wsf/include -I ./include/components/wsf/include/platform -I ./include/devices/MK800X/Include -I ./include/drivers -I ./include/components/hido/Include -I ./include/components/internet/inc -I ./include/components/hal -I ../keil -I ./include/src -I ./include/components/internet/src -Wno-declaration-after-statement -Wno-double-promotion -Wno-extra-semi-stmt -Wno-gnu-zero-variadic-macro-arguments -Wno-padded -Wno-unused-parameter -I./RTE/_MK8000_Release -ID:/keil/pack/MKSEMI/MK800X_DFP/1.0.3/Device/Include -ID:/keil/ARM/CMSIS/Include -D__UVISION_VERSION="530" -D_RTE_ -DUWB_EN -DSTD_LIBC -o ./objects/tcpclient.o -MD)
I (include\src\TCPClient.h)(0x68510435)
I (include\components\hido\Include\HIDO_TYpeDef.h)(0x6721A6AD)
I (include\components\internet\inc\Socket.h)(0x6721A6AD)
keil/include/drivers/PCA9555.c
@@ -558,9 +558,10 @@
    PCA9555_Set_One_Value_Config(PWR_ENABLE,0);//设置电池上电是否给单片机供电
    PCA9555_Set_One_Value_Output(PWR_ENABLE,1);//高电平默认导通单片机供电
    PCA9555_Set_One_Value_Config(PWR_ON,1);//设置开关机按键输入
    PCA9555_Set_One_Value_Config(SOS_ENBALE,1);//设置SOS按钮输入
    
    PCA9555_Set_One_Value_Config(TTS_ENABLE,0);
//    PCA9555_Set_One_Value_Config(TTS_ENABLE,0);
    PCA9555_Set_One_Value_Output(TTS_ENABLE,1);
    PCA9555_Set_One_Value_Config(AIR780E_ENBALE,0);//配置4G供电
    PCA9555_Set_One_Value_Output(AIR780E_ENBALE,1);//打开4G
@@ -609,10 +610,13 @@
              if(WAKE_UP_POSITION&gpio_state)
                {
                 //移动
                    nomove_count=0;
                    if(deep_sleep_falg==0)
                    {
                     deep_sleep_falg=1;    
//           NVIC_SystemReset();   
                     sys_reset(0);
@@ -628,11 +632,13 @@
//    }
            if((PWR_ON_POSITION&gpio_state))
            {
        PowerTask();
        test31++;
            }
            if(!(SOS_ENBALE_POSITION&gpio_state))
            {
        UserKeyTask();
        test21++;
            }
keil/include/main/main.c
@@ -147,7 +147,7 @@
//                        gps_air780_power_change(0,0);//关闭gps,4G 
            PCA9555_Set_One_Value_Output(LED_POWER,0);//输出低电平关闭LED
            PCA9555_Set_One_Value_Output(GPS_POWER,0);//关闭gps,4G 
            PCA9555_Set_One_Value_Output(TTS_ENABLE,0);
//            PCA9555_Set_One_Value_Output(TTS_ENABLE,0);
            PCA9555_Set_One_Value_Output(AIR780E_ENBALE,0);//关闭gps,4G 
    
keil/include/src/TCPClient.c
@@ -378,48 +378,48 @@
            Socket_Send(l_i32TCPClientID,(uint8_t*)send_buffer,buffer_len);
        }
    }
    else if (STRCMP(_u8Data, "$set_gpsuwbpara,") == 0)
    {
        u32SplitCnt = HIDO_UtilStrSplit((HIDO_CHAR *)_u8Data, ',', apcSplitStr, HIDO_ARRARY_COUNT(apcSplitStr));
        uint16_t buffer_len,datalen;
        char send_buffer[20]={0};
        if (u32SplitCnt < 6)
        {
            return HIDO_ERR;
        }
        if (HIDO_UtilHexStrToInt(apcSplitStr[1]) == g_com_map[DEV_ID])
        {
            HIDO_INT32 gpskaiguan,uwbkaiguan,gpspinlv,uwbpinlv,gpsbaudrate1;
            gpskaiguan= HIDO_UtilStrToInt(apcSplitStr[2]);
            g_com_map[GPSENBLE] = gpskaiguan;
            uwbkaiguan= HIDO_UtilStrToInt(apcSplitStr[3]);
            g_com_map[UWBENBLE] = uwbkaiguan;
            gpspinlv= HIDO_UtilStrToInt(apcSplitStr[4]);
            g_com_map[GPSFrequency] = gpspinlv;
            uwbpinlv= HIDO_UtilStrToInt(apcSplitStr[5]);
            g_com_map[UWBFrequency] = uwbpinlv;
            gpsbaudrate1= HIDO_UtilStrToInt(apcSplitStr[6]);
            g_com_map[GPSBAUDRATE1_INDEX] = gpsbaudrate1>>16;
            g_com_map[GPSBAUDRATE2_INDEX] = gpsbaudrate1;
            if((g_com_map[GPSENBLE]||g_com_map[GPSENBLE]==0)
             &&(g_com_map[UWBENBLE]||g_com_map[UWBENBLE]==0)
             &&(g_com_map[GPSFrequency]<65535&&g_com_map[GPSFrequency]>0)
             &&(g_com_map[UWBFrequency]==1||g_com_map[UWBFrequency]==3||g_com_map[UWBFrequency]==5||g_com_map[UWBFrequency]==10)
             &&(gpsbaudrate1==9600||gpsbaudrate1==115200)
            )
            {
            save_com_map_to_flash();
//            Socket_Send(l_i32TCPClientID,(uint8_t*)send_buffer,buffer_len);
            g_com_map[CNT_RESTART] = 1;
            }
            else
            {
            Socket_Send(l_i32TCPClientID,(uint8_t*)send_buffer,10);
            }
        }
    }
//    else if (STRCMP(_u8Data, "$set_gpsuwbpara,") == 0)
//    {
//        u32SplitCnt = HIDO_UtilStrSplit((HIDO_CHAR *)_u8Data, ',', apcSplitStr, HIDO_ARRARY_COUNT(apcSplitStr));
//        uint16_t buffer_len,datalen;
//        char send_buffer[20]={0};
//        if (u32SplitCnt < 6)
//        {
//            return HIDO_ERR;
//        }
//        if (HIDO_UtilHexStrToInt(apcSplitStr[1]) == g_com_map[DEV_ID])
//        {
//            HIDO_INT32 gpskaiguan,uwbkaiguan,gpspinlv,uwbpinlv,gpsbaudrate1;
//            gpskaiguan= HIDO_UtilStrToInt(apcSplitStr[2]);
//            g_com_map[GPSENBLE] = gpskaiguan;
//            uwbkaiguan= HIDO_UtilStrToInt(apcSplitStr[3]);
//            g_com_map[UWBENBLE] = uwbkaiguan;
//            gpspinlv= HIDO_UtilStrToInt(apcSplitStr[4]);
//            g_com_map[GPSFrequency] = gpspinlv;
//            uwbpinlv= HIDO_UtilStrToInt(apcSplitStr[5]);
//            g_com_map[UWBFrequency] = uwbpinlv;
//            gpsbaudrate1= HIDO_UtilStrToInt(apcSplitStr[6]);
//            g_com_map[GPSBAUDRATE1_INDEX] = gpsbaudrate1>>16;
//            g_com_map[GPSBAUDRATE2_INDEX] = gpsbaudrate1;
//
//
//            if((g_com_map[GPSENBLE]||g_com_map[GPSENBLE]==0)
//             &&(g_com_map[UWBENBLE]||g_com_map[UWBENBLE]==0)
//             &&(g_com_map[GPSFrequency]<65535&&g_com_map[GPSFrequency]>0)
//             &&(g_com_map[UWBFrequency]==1||g_com_map[UWBFrequency]==3||g_com_map[UWBFrequency]==5||g_com_map[UWBFrequency]==10)
//             &&(gpsbaudrate1==9600||gpsbaudrate1==115200)
//            )
//            {
//            save_com_map_to_flash();
////            Socket_Send(l_i32TCPClientID,(uint8_t*)send_buffer,buffer_len);
//            g_com_map[CNT_RESTART] = 1;
//            }
//            else
//            {
//            Socket_Send(l_i32TCPClientID,(uint8_t*)send_buffer,10);
//            }
//        }
//    }
    else if (STRCMP(_u8Data, "$read_gpsuwbpara,") == 0)
    {
        u32SplitCnt = HIDO_UtilStrSplit((HIDO_CHAR *)_u8Data, ',', apcSplitStr, HIDO_ARRARY_COUNT(apcSplitStr));