| | |
| | | Dialog DLL: TARMCM1.DLL V1.14.2.0 |
| | | |
| | | <h2>Project:</h2> |
| | | D:\zhangbo\2024\Code\ChinaUWB\ChinaUWBProject-æ ç¾-RX\keil\uwb_simple_example.uvprojx |
| | | Project File Date: 11/11/2024 |
| | | D:\zhangbo\2024\Code\ChinaUWB\ChinaUWBProject-biaoqian-RX\keil\uwb_simple_example.uvprojx |
| | | Project File Date: 12/23/2024 |
| | | |
| | | <h2>Output:</h2> |
| | | *** Using Compiler 'V6.14', folder: 'D:\keil\ARM\ARMCLANG\Bin' |
| | | Build Project 'uwb_simple_example' - Target 'MK8000 Release' |
| | | After Build - User command #1: fromelf.exe --bincombined -o "Output\uwb_simple_example.bin" "D:\zhangbo\2024\Code\ChinaUWB\ChinaUWBProject-æ ç¾-RX\keil\Objects\uwb_simple_example.axf" |
| | | ".\Objects\uwb_simple_example.axf" - 0 Error(s), 0 Warning(s). |
| | | compiling main.c... |
| | | linking... |
| | | D:\zhangbo\2024\Code\ChinaUWB\ChinaUWBProject-biaoqian-RX\keil\include\devices\MK800X\Source\ARM\MK800X_ac6_copy.sct(25): warning: L6314W: No section matches pattern *(.XIP_SECTION). |
| | | Program Size: Code=77080 RO-data=9772 RW-data=1664 ZI-data=28992 |
| | | Finished: 0 information, 1 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-biaoqian-RX\keil\Objects\uwb_simple_example.axf" |
| | | ".\Objects\uwb_simple_example.axf" - 0 Error(s), 1 Warning(s). |
| | | |
| | | <h2>Software Packages used:</h2> |
| | | |
| | |
| | | ".\objects\sn74hc595.o" |
| | | ".\objects\mk_spi.o" |
| | | ".\objects\mk_timer.o" |
| | | ".\objects\pca9555.o" |
| | | ".\objects\usart1.o" |
| | | ".\objects\usart.o" |
| | | ".\objects\mk_4g.o" |
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_mac.h)(0x67206CDD)
|
| | | I (include\drivers\mk_phy.h)(0x67206CDD)
|
| | | F (.\include\components\algo\lib\lib_aoa.lib)(0x67206CDE)()
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | | I (include\drivers\mk_clock.h)(0x67206CDC)
|
| | | I (include\drivers\mk_reset.h)(0x67206CDC)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | | I (include\drivers\mk_clock.h)(0x67206CDC)
|
| | | I (include\drivers\mk_reset.h)(0x67206CDC)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_clock.h)(0x67206CDC)
|
| | | I (include\drivers\mk_reset.h)(0x67206CDC)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | F (.\include\drivers\mk_dma.c)(0x672473BD)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -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 -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/mk_dma.o -MD)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | | I (include\drivers\mk_common.h)(0x67206CDC)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_clock.h)(0x67206CDC)
|
| | | I (include\drivers\mk_reset.h)(0x67206CDC)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_clock.h)(0x67206CDC)
|
| | | I (include\drivers\mk_reset.h)(0x67206CDC)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | | I (include\drivers\mk_misc.h)(0x67206CDC)
|
| | | I (include\drivers\mk_clock.h)(0x67206CDC)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_io.h)(0x67206CDC)
|
| | | I (include\drivers\mk_clock.h)(0x67206CDC)
|
| | | I (include\drivers\mk_reset.h)(0x67206CDC)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | F (.\include\drivers\mk_misc.c)(0x67206CDC)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -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 -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/mk_misc.o -MD)
|
| | | I (include\drivers\mk_misc.h)(0x67206CDC)
|
| | | I (include\drivers\mk_clock.h)(0x67206CDC)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_dual_timer.h)(0x67206CDC)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_clock.h)(0x67206CDC)
|
| | | I (include\drivers\mk_reset.h)(0x67206CDC)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdarg.h)(0x5DDFFD72)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdarg.h)(0x5DDFFD72)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_mac.h)(0x67206CDD)
|
| | | I (include\drivers\mk_phy.h)(0x67206CDD)
|
| | | I (include\drivers\mk_reset.h)(0x67206CDC)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_clock.h)(0x67206CDC)
|
| | | I (include\drivers\mk_reset.h)(0x67206CDC)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_clock.h)(0x67206CDC)
|
| | | I (include\drivers\mk_reset.h)(0x67206CDC)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | |
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdarg.h)(0x5DDFFD72)
|
| | | F (.\include\drivers\mk_timer.h)(0x67206CDD)()
|
| | | F (.\include\drivers\PCA9555.c)(0x67693492)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -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 -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)(0x67693344)
|
| | | I (include\board\board.h)(0x67206CDC)
|
| | | I (include\drivers\mk_common.h)(0x67206CDC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stddef.h)(0x5DDFFD72)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdint.h)(0x5DDFFD72)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdbool.h)(0x5DDFFD72)
|
| | | I (D:\keil\ARM\ARMCLANG\include\string.h)(0x5DDFFD6C)
|
| | | I (include\devices\MK800X\Include\MK800X.h)(0x67206CDC)
|
| | | I (include\CMSIS\Include\core_cm0.h)(0x67206CDC)
|
| | | I (include\CMSIS\Include\cmsis_version.h)(0x67206CDC)
|
| | | I (include\CMSIS\Include\cmsis_compiler.h)(0x67206CDC)
|
| | | I (include\CMSIS\Include\cmsis_armclang.h)(0x67206CDC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdarg.h)(0x5DDFFD72)
|
| | | I (include\drivers\mk_gpio.h)(0x67206CDC)
|
| | | I (include\drivers\mk_io.h)(0x67206CDC)
|
| | | F (.\include\drivers\PCA9555.h)(0x67693344)()
|
| | | F (.\include\drivers\Usart1.c)(0x672050F0)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -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 -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/usart1.o -MD)
|
| | | I (include\drivers\Usart.h)(0x672050F0)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdint.h)(0x5DDFFD72)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdio.h)(0x5DDFFD72)
|
| | | F (.\include\drivers\Usart.c)(0x672050F0)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -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 -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/usart.o -MD)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | | F (.\mk_4G.c)(0x672050F0)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -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 -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/mk_4g.o -MD)
|
| | | I (..\keil\mk_4G.h)(0x672050F0)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | |
| | | I (include\drivers\lis3dh_driver.h)(0x672050F0)
|
| | | I (D:\keil\ARM\ARMCLANG\include\math.h)(0x5DDFFD6C)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdint.h)(0x5DDFFD72)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdlib.h)(0x5DDFFD6A)
|
| | | I (include\drivers\mk_io.h)(0x67206CDC)
|
| | | I (include\drivers\mk_common.h)(0x67206CDC)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | | I (include\drivers\mk_misc.h)(0x67206CDC)
|
| | | I (include\drivers\mk_clock.h)(0x67206CDC)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | | I (include\drivers\mk_misc.h)(0x67206CDC)
|
| | | I (include\drivers\mk_clock.h)(0x67206CDC)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\board\board.h)(0x67206CDC)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\stdarg.h)(0x5DDFFD72)
|
| | | I (include\drivers\mk_gpio.h)(0x67206CDC)
|
| | | I (include\drivers\Usart.h)(0x672050F0)
|
| | | F (.\include\main\main.c)(0x674D867D)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -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 -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)(0x67AD8A8E)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -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 -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)(0x67206CDC)
|
| | | I (include\drivers\mk_common.h)(0x67206CDC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stddef.h)(0x5DDFFD72)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdarg.h)(0x5DDFFD72)
|
| | |
| | | I (include\src\TCPClient.h)(0x672050F0)
|
| | | I (include\drivers\mk_spi.h)(0x67206CDD)
|
| | | I (include\components\hal\pan_port.h)(0x672050F0)
|
| | | I (include\components\hal\pan_rf.h)(0x67440B80)
|
| | | I (include\components\hal\pan_rf.h)(0x676935DB)
|
| | | I (include\drivers\PCA9555.h)(0x67693344)
|
| | | I (include\drivers\mk_timer.h)(0x67206CDD)
|
| | | I (..\keil\lora_3029.h)(0x672D87AC)
|
| | | I (..\keil\lora_3029.h)(0x67AC6E8C)
|
| | | F (.\include\src\TCPClient.c)(0x672050F0)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -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 -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)(0x672050F0)
|
| | | I (include\components\hido\Include\HIDO_TYpeDef.h)(0x672050F0)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | | I (..\keil\mk_4G.h)(0x672050F0)
|
| | | I (include\board\board.h)(0x67206CDC)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdarg.h)(0x5DDFFD72)
|
| | | I (include\drivers\mk_gpio.h)(0x67206CDC)
|
| | | I (include\drivers\mk_io.h)(0x67206CDC)
|
| | | F (.\uwb_app.c)(0x674EB028)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -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 -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/uwb_app.o -MD)
|
| | | F (.\uwb_app.c)(0x675F8466)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -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 -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/uwb_app.o -MD)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | | I (include\drivers\mk_common.h)(0x67206CDC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stddef.h)(0x5DDFFD72)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdarg.h)(0x5DDFFD72)
|
| | |
| | | I (include\board\board.h)(0x67206CDC)
|
| | | I (include\drivers\mk_gpio.h)(0x67206CDC)
|
| | | I (include\drivers\mk_io.h)(0x67206CDC)
|
| | | F (.\lora_3029.c)(0x67404E72)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -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 -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/lora_3029.o -MD)
|
| | | I (..\keil\lora_3029.h)(0x672D87AC)
|
| | | F (.\lora_3029.c)(0x676900C7)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -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 -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/lora_3029.o -MD)
|
| | | I (..\keil\lora_3029.h)(0x67AC6E8C)
|
| | | I (include\drivers\mk_io.h)(0x67206CDC)
|
| | | I (include\drivers\mk_common.h)(0x67206CDC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stddef.h)(0x5DDFFD72)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_spi.h)(0x67206CDD)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | | I (include\drivers\global_param.h)(0x672B0902)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\stdio.h)(0x5DDFFD72)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdlib.h)(0x5DDFFD6A)
|
| | | I (D:\keil\ARM\ARMCLANG\include\math.h)(0x5DDFFD6C)
|
| | | I (include\components\hal\pan_rf.h)(0x67440B80)
|
| | | I (include\components\hal\pan_rf.h)(0x676935DB)
|
| | | I (include\drivers\PCA9555.h)(0x67693344)
|
| | | I (include\board\board.h)(0x67206CDC)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdarg.h)(0x5DDFFD72)
|
| | | I (include\drivers\mk_gpio.h)(0x67206CDC)
|
| | | F (.\include\components\wsf\sources\port\baremetal\wsf_assert.c)(0x67206CDE)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -ffunction-sections -w -I ./include/components/wsf/include/platform -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 -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/wsf_assert.o -MD)
|
| | | I (include\components\wsf\include\wsf_assert.h)(0x67206CDE)
|
| | | I (include\components\wsf\include\wsf_trace.h)(0x67206CDE)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | F (.\include\components\wsf\sources\port\baremetal\wsf_buf.c)(0x67206CDE)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -ffunction-sections -w -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 -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/wsf_buf.o -MD)
|
| | | I (include\components\wsf\include\wsf_types.h)(0x67206CDE)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdint.h)(0x5DDFFD72)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\components\wsf\include\wsf_heap.h)(0x67206CDE)
|
| | | I (include\components\wsf\include\wsf_math.h)(0x67206CDE)
|
| | | I (include\components\wsf\include\wsf_os.h)(0x67206CDE)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\components\wsf\include\wsf_trace.h)(0x67206CDE)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdarg.h)(0x5DDFFD72)
|
| | | I (include\components\wsf\include\wsf_os.h)(0x67206CDE)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\components\wsf\include\wsf_buf.h)(0x67206CDE)
|
| | | I (include\components\wsf\include\wsf_math.h)(0x67206CDE)
|
| | | I (include\components\wsf\include\wsf_os.h)(0x67206CDE)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\components\crc\crc.h)(0x67206CDE)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdlib.h)(0x5DDFFD6A)
|
| | | F (.\include\components\wsf\sources\port\baremetal\wsf_os.c)(0x67206CDE)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -ffunction-sections -w -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 -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/wsf_os.o -MD)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_power.h)(0x67206CDC)
|
| | | F (.\include\components\wsf\sources\port\baremetal\wsf_queue.c)(0x67206CDE)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -ffunction-sections -w -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 -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/wsf_queue.o -MD)
|
| | | I (include\components\wsf\include\wsf_types.h)(0x67206CDE)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | F (.\include\components\wsf\sources\port\baremetal\wsf_timer.c)(0x67206CDE)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -ffunction-sections -w -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 -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/wsf_timer.o -MD)
|
| | | I (include\components\wsf\include\wsf_queue.h)(0x67206CDE)
|
| | | I (include\components\wsf\include\wsf_types.h)(0x67206CDE)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_misc.h)(0x67206CDC)
|
| | | I (include\drivers\mk_clock.h)(0x67206CDC)
|
| | | F (.\include\components\wsf\sources\port\baremetal\wsf_trace.c)(0x67206CDE)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -ffunction-sections -w -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 -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/wsf_trace.o -MD)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\components\wsf\include\wsf_assert.h)(0x67206CDE)
|
| | | I (include\components\wsf\include\wsf_cs.h)(0x67206CDE)
|
| | | F (.\include\components\wsf\sources\platform\pal_flash.c)(0x67206CDE)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -ffunction-sections -w -I ./include/components/wsf/sources/platform -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 -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/pal_flash.o -MD)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_flash.h)(0x67206CDC)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | | I (include\drivers\mk_misc.h)(0x67206CDC)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\components\wsf\include\platform\pal_uart.h)(0x67206CDE)
|
| | | I (include\drivers\mk_misc.h)(0x67206CDC)
|
| | | I (include\drivers\mk_clock.h)(0x67206CDC)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | F (.\include\components\crc\crc.c)(0x67206CDE)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -ffunction-sections -w -I ./include/components/crc -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 -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/crc.o -MD)
|
| | | I (include\components\crc\crc.h)(0x67206CDE)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdint.h)(0x5DDFFD72)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | | F (.\include\components\hal\pan_port.c)(0x672050F0)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -ffunction-sections -w -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 -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/pan_port.o -MD)
|
| | | I (include\components\hal\pan_port.h)(0x672050F0)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\stdlib.h)(0x5DDFFD6A)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdbool.h)(0x5DDFFD72)
|
| | | I (D:\keil\ARM\ARMCLANG\include\math.h)(0x5DDFFD6C)
|
| | | I (include\components\hal\pan_rf.h)(0x67440B80)
|
| | | I (include\drivers\mk_spi.h)(0x67206CDD)
|
| | | I (include\components\hal\pan_rf.h)(0x676935DB)
|
| | | I (include\drivers\PCA9555.h)(0x67693344)
|
| | | I (include\board\board.h)(0x67206CDC)
|
| | | I (include\drivers\mk_common.h)(0x67206CDC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stddef.h)(0x5DDFFD72)
|
| | | I (D:\keil\ARM\ARMCLANG\include\string.h)(0x5DDFFD6C)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | | I (..\keil\lora_3029.h)(0x672D87AC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdarg.h)(0x5DDFFD72)
|
| | | I (include\drivers\mk_gpio.h)(0x67206CDC)
|
| | | I (include\drivers\mk_io.h)(0x67206CDC)
|
| | | F (.\include\components\hal\pan_rf.c)(0x672DD919)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -ffunction-sections -w -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 -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/pan_rf.o -MD)
|
| | | I (include\drivers\mk_spi.h)(0x67206CDD)
|
| | | I (..\keil\lora_3029.h)(0x67AC6E8C)
|
| | | F (.\include\components\hal\pan_rf.c)(0x67693344)(-xc -std=c99 --target=arm-arm-none-eabi -mcpu=cortex-m0 -c
-fno-rtti -funsigned-char
-D__MICROLIB -gdwarf-3 -O0 -ffunction-sections -w -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 -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/pan_rf.o -MD)
|
| | | I (include\components\hal\pan_port.h)(0x672050F0)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdio.h)(0x5DDFFD72)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdint.h)(0x5DDFFD72)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdlib.h)(0x5DDFFD6A)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdbool.h)(0x5DDFFD72)
|
| | | I (D:\keil\ARM\ARMCLANG\include\math.h)(0x5DDFFD6C)
|
| | | I (include\components\hal\pan_rf.h)(0x67440B80)
|
| | | I (include\components\hal\pan_param.h)(0x672050F0)
|
| | | I (..\keil\lora_3029.h)(0x672D87AC)
|
| | | I (include\drivers\mk_io.h)(0x67206CDC)
|
| | | I (include\components\hal\pan_rf.h)(0x676935DB)
|
| | | I (include\drivers\PCA9555.h)(0x67693344)
|
| | | I (include\board\board.h)(0x67206CDC)
|
| | | I (include\drivers\mk_common.h)(0x67206CDC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stddef.h)(0x5DDFFD72)
|
| | | I (D:\keil\ARM\ARMCLANG\include\string.h)(0x5DDFFD6C)
|
| | |
| | | I (D:\keil\ARM\ARMCLANG\include\arm_compat.h)(0x5E0CC2EC)
|
| | | I (D:\keil\ARM\ARMCLANG\include\arm_acle.h)(0x5E0CC318)
|
| | | I (include\devices\MK800X\Include\system_MK800X.h)(0x67206CDC)
|
| | | I (..\user_config.h)(0x672DDFDA)
|
| | | I (..\user_config.h)(0x6760D510)
|
| | | I (include\drivers\mk_trace.h)(0x67206CDC)
|
| | | I (include\drivers\mk_uart.h)(0x672473BD)
|
| | | I (include\drivers\mk_dma.h)(0x672473BD)
|
| | | I (D:\keil\ARM\ARMCLANG\include\stdarg.h)(0x5DDFFD72)
|
| | | I (include\drivers\mk_gpio.h)(0x67206CDC)
|
| | | I (include\drivers\mk_io.h)(0x67206CDC)
|
| | | I (include\components\hal\pan_param.h)(0x672050F0)
|
| | | I (..\keil\lora_3029.h)(0x67AC6E8C)
|
| | |
| | | #include "pan_port.h" |
| | | #include "pan_param.h" |
| | | #include "lora_3029.h" |
| | | #include "PCA9555.h" |
| | | /* |
| | | * flag that indicate if a new packet is received. |
| | | */ |
| | |
| | | * @param[in] <none> |
| | | * @return result |
| | | */ |
| | | uint16_t rx_timeout=0; |
| | | void rf_irq_process(void) |
| | | { |
| | | if(CHECK_IRQ()) |
| | |
| | | if(irq & REG_IRQ_RX_TIMEOUT) |
| | | { |
| | | rf_refresh(); |
| | | irq &= ~REG_IRQ_RX_TIMEOUT; |
| | | rf_clr_irq(REG_IRQ_RX_TIMEOUT); |
| | | irq &= ~REG_IRQ_RX_TIMEOUT; |
| | | rf_clr_irq(REG_IRQ_RX_TIMEOUT); |
| | | rx_timeout++; |
| | | rf_set_recv_flag(RADIO_FLAG_RXTIMEOUT); |
| | | } |
| | | if(irq & REG_IRQ_TX_DONE) |
| | |
| | | *******************************************************************************/ |
| | | #ifndef __PAN_RF_H |
| | | #define __PAN_RF_H |
| | | |
| | | #include "PCA9555.h" |
| | | #include "pan_port.h" |
| | | //#include "lora_3029.h" |
| | | /* result */ |
| | |
| | | #define DEFAULT_SF SF_5 |
| | | #define DEFAULT_BW BW_500K |
| | | |
| | | #define DEFAULT_up_FREQ (473000000) |
| | | #define DEFAULT_up_FREQ (470000000) |
| | | #define DEFAULT_up_SF SF_5 |
| | | |
| | | #define DEFAULT_WG_SET_FREQ (478000000) |
| | | #define DEFAULT_WG_SET_SF SF_7 |
| | | |
| | | #define DEFAULT_CR CODE_RATE_45 |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | #include "PCA9555.h" |
| | | uint8_t gps_led_output_state,tts_enbale_output_state,wake_up_output_state,air780e_enable_output_state,sos_enable_output_state,gps_backup_output_state,gps_power_output_state,main_ri_output_state;//1ç»output IOå£ä»å·¦å°å³1.0~1.7 |
| | | uint8_t mcu_a_output_state,chg_g_output_state,lora_irq_output_state,lora_nrst_output_state,adc_minius_output_state,input_5v_output_state,pwr_on_output_state,pwr_enable_output_state;//2ç»output IOå£ä»å·¦å°å³0.0~0.7 |
| | | uint8_t pca9555writedata_config[10];//æåå¯å卿æé
ç½®çæ°ç» |
| | | uint8_t pca9555writedata_output[10];//æåè¾åºé«ä½çµå¹³é
ç½®çæ°ç» |
| | | uint8_t pca9555writedata_input[10];//æåè¾å
¥å¯å卿æé
ç½®çæ°ç» |
| | | uint8_t pca9555writedata_polarity[10];//æåè¾å
¥ææ§å转å¯å卿æé
ç½®çæ°ç» |
| | | void IIC_gpio_pca_init(void) |
| | | { |
| | | io_pin_mux_set(SDA_PIN, IO_FUNC0); |
| | | io_pin_mux_set(SCL_PIN, IO_FUNC0); |
| | | |
| | | gpio_pin_set_dir(SDA_PIN , GPIO_DIR_OUT, 1); |
| | | //io_open_drain_set(SDA_PIN, 1); |
| | | io_pull_set(SDA_PIN , IO_PULL_UP, IO_PULL_UP_LEVEL2);//è¾åºé«é»æ |
| | | |
| | | gpio_pin_set_dir(SCL_PIN , GPIO_DIR_OUT, 1); |
| | | //io_open_drain_set(SCL_PIN, 1); |
| | | io_pull_set(SCL_PIN , IO_HIGH_Z, IO_PULL_UP_NONE); |
| | | } |
| | | |
| | | void IIC2_pca_Start(void) |
| | | { |
| | | //// IIC2_SDA_OUT(); //sda线è¾åº |
| | | // SDA_1; |
| | | // delay_us(10); |
| | | // SCL_1; |
| | | // delay_us(10); |
| | | // SDA_0;//START:when CLK is high,DATA change form high to low |
| | | // delay_us(10); |
| | | |
| | | // IIC2_SDA_OUT(); //sda线è¾åº |
| | | SDA_1; |
| | | // delay_us(10); |
| | | SCL_1; |
| | | // delay_us(10); |
| | | SDA_0;//START:when CLK is high,DATA change form high to low |
| | | delay_us(10); |
| | | SCL_0;//é³ä½I2Cæ»çº¿ï¼åå¤åéææ¥æ¶æ°æ® |
| | | } |
| | | void IIC_pca_Ready(void) |
| | | { |
| | | |
| | | SCL_1; |
| | | delay_us(10); |
| | | SDA_1; |
| | | delay_us(10); |
| | | } |
| | | //产çIICåæ¢ä¿¡å· |
| | | void IIC2_pca_Stop(void) |
| | | { |
| | | |
| | | // SDA_0;//STOP:when CLK is high DATA change form low to high |
| | | // |
| | | // delay_us(10); |
| | | // SCL_1; |
| | | // delay_us(10); |
| | | // SDA_1;//åéI2Cæ»çº¿ç»æä¿¡å· |
| | | // delay_us(10); |
| | | |
| | | SCL_0; |
| | | SDA_0;//sToP:when ClK is high DATA change form low to high |
| | | delay_us(10); |
| | | SCL_1; |
| | | //delay_us(10); |
| | | SDA_1;//7åéI2Cæ»çº¿ç»æä¿¡å· |
| | | delay_us(10); |
| | | } |
| | | //çå¾
åºçä¿¡å·å°æ¥ |
| | | //è¿åå¼ï¼1ï¼æ¥æ¶åºç失败 |
| | | // 0ï¼æ¥æ¶åºçæå |
| | | uint8_t IIC2_Wait_pca_Ack(void) |
| | | { |
| | | uint8_t ucErrTime=0; |
| | | // IIC2_SDA_IN(); |
| | | |
| | | gpio_pin_set_dir(SDA_PIN,GPIO_DIR_IN,1); //SDA设置为è¾å
¥çå¾
æ¥æ¶ç«¯çåºçä¿¡å· |
| | | SDA_1; |
| | | delay_us(6); |
| | | SCL_1; |
| | | delay_us(6); |
| | | // SDA_1; |
| | | // delay_us(6); |
| | | |
| | | |
| | | while(IIC2_READ_SDA) |
| | | { |
| | | ucErrTime++; |
| | | if(ucErrTime>250) |
| | | { |
| | | IIC2_pca_Stop(); |
| | | gpio_pin_set_dir(SDA_PIN , GPIO_DIR_OUT, 1); |
| | | return 1; |
| | | } |
| | | } |
| | | gpio_pin_set_dir(SDA_PIN , GPIO_DIR_OUT, 0); |
| | | SCL_0;//æ¶éè¾åº0 |
| | | return 0; |
| | | |
| | | } |
| | | //产çACKåºç |
| | | void IIC2_pca_send_Ack(void) |
| | | { |
| | | SCL_0; |
| | | SDA_0;//读åSDAçµå¹³ä¸ºä½åæåºç |
| | | delay_us(10); |
| | | SCL_1; |
| | | delay_us(10); |
| | | SCL_0; |
| | | } |
| | | //ä¸äº§çACKåºç |
| | | void IIC2_pca_send_NAck(void) |
| | | { |
| | | SCL_0; |
| | | SDA_1;//读åSDAçµå¹³ä¸ºé«åæ åºçä¿¡å· |
| | | delay_us(10); |
| | | SCL_1; |
| | | delay_us(10); |
| | | SCL_0; |
| | | } |
| | | //IICåéä¸ä¸ªåè,WRITE |
| | | //è¿å仿ºææ åºç |
| | | //1ï¼æåºç |
| | | //0ï¼æ åºç |
| | | uint8_t statistic_num; |
| | | void IIC2_Send_pca_Byte(uint8_t txd) |
| | | { |
| | | uint8_t t; |
| | | // IIC2_SDA_OUT(); |
| | | SCL_0;//æä½æ¶éå¼å§æ°æ®ä¼ è¾ |
| | | // delay_us(10); |
| | | for(t=0; t<8; t++) |
| | | { |
| | | if((txd&0x80)>>7) |
| | | { |
| | | SDA_1; |
| | | } |
| | | else |
| | | { |
| | | SDA_0; |
| | | } |
| | | txd <<= 1; |
| | | delay_us(10); |
| | | SCL_1; |
| | | delay_us(10); |
| | | SCL_0; |
| | | delay_us(10); |
| | | } |
| | | // statistic_num=txd; |
| | | // SDA_1;//æ°å¢sdaæé« |
| | | // delay_us(10); |
| | | } |
| | | |
| | | //读1个åèï¼ack=1æ¶ï¼åéACKï¼ack=0ï¼åénACK,䏿¯ä¸æ ·ç |
| | | uint8_t IIC2_Read_pca_Byte(unsigned char ack) |
| | | { |
| | | unsigned char i,receive=0,bit=0; |
| | | gpio_pin_set_dir(SDA_PIN,GPIO_DIR_IN,0); //设置为è¾å
¥è¯»åçµå¹³ |
| | | // io_pull_set(SDA_PIN , IO_HIGH_Z, IO_PULL_UP_NONE); |
| | | for(i=0; i<8; i++ ) |
| | | { |
| | | SCL_0; |
| | | delay_us(6);//ä¿®æ¹æ¶é´ |
| | | SCL_1; |
| | | //receive<<=1; |
| | | if(IIC2_READ_SDA){ |
| | | bit=1<<i; |
| | | receive|=bit; |
| | | } |
| | | delay_us(5); |
| | | } |
| | | SCL_0; |
| | | if(ack==2){ |
| | | gpio_pin_set_dir(SDA_PIN,GPIO_DIR_OUT,0); //设置为è¾åºæ¢å¤ACK |
| | | }else{ |
| | | gpio_pin_set_dir(SDA_PIN,GPIO_DIR_OUT,1); //设置为è¾åºæ¢å¤ACK |
| | | } |
| | | |
| | | // io_pull_set(SDA_PIN , IO_PULL_UP, IO_PULL_UP_LEVEL2);//è¾åºé«é»æ |
| | | // if (!ack) |
| | | // IIC2_pca_send_NAck();//åénACK |
| | | // else |
| | | // IIC2_pca_send_Ack(); //åéACK |
| | | return receive; |
| | | } |
| | | |
| | | |
| | | /********************************************************* |
| | | //åpca9555第äºå±é©±å¨ï¼å¯è¾
å©é»è¾ä¸ç ´åæåºå±é©±å¨ |
| | | addr è¯çå°åï¼0x40表示第ä¸ä¸ªè¯çå°å |
| | | low_byte åå
¥è¯ççåå
«ä½æ°æ® |
| | | high_byte åå
¥è¯ççåå使°æ® |
| | | *********************************************************/ |
| | | //åpca9555第ä¸å±ï¼æåºå±é©±å¨ |
| | | int temp_ack3,temp_ack4,temp_ack5,temp_ack6; |
| | | void IIC_Write_Pca9555(unsigned char addr,unsigned char reg_addr,unsigned char low_byte,unsigned char high_byte) |
| | | { |
| | | IIC2_pca_Start(); |
| | | IIC2_Send_pca_Byte(addr & 0xfe); |
| | | temp_ack3=IIC2_Wait_pca_Ack(); |
| | | IIC2_Send_pca_Byte(reg_addr); |
| | | temp_ack4=IIC2_Wait_pca_Ack(); |
| | | IIC2_Send_pca_Byte(low_byte); |
| | | temp_ack5=IIC2_Wait_pca_Ack(); |
| | | IIC2_Send_pca_Byte(high_byte); |
| | | temp_ack6=IIC2_Wait_pca_Ack(); |
| | | IIC2_pca_Stop(); |
| | | |
| | | // IIC2_Start(); |
| | | // IIC2_Send_Byte(addr & 0xfe); //åéåå½ä»¤ |
| | | // temp_ack3=IIC2_Wait_pca_Ack(); |
| | | // IIC2_Send_Byte(reg_addr); //åéå°å |
| | | // temp_ack4=IIC2_Wait_pca_Ack(); |
| | | // IIC2_Send_Byte(low_byte); //åéåè |
| | | // temp_ack5=IIC2_Wait_pca_Ack(); |
| | | // IIC2_Send_Byte(high_byte); //åéåè |
| | | // temp_ack6=IIC2_Wait_pca_Ack(); |
| | | // IIC2_Stop();//产çä¸ä¸ªåæ¢æ¡ä»¶ |
| | | |
| | | } |
| | | /* |
| | | // IIC2_Start(); |
| | | // IIC2_Send_Byte(addr & 0xfe); //åéåå½ä»¤ |
| | | // temp_ack3=IIC2_Wait_Ack(); |
| | | // IIC2_Send_Byte(reg_addr); //åéå°å |
| | | // temp_ack4=IIC2_Wait_Ack(); |
| | | // IIC2_Send_Byte(low_byte); //åéåè |
| | | // temp_ack5=IIC2_Wait_Ack(); |
| | | // IIC2_Send_Byte(high_byte); //åéåè |
| | | // temp_ack6=IIC2_Wait_Ack(); |
| | | // IIC2_Stop();//产çä¸ä¸ªåæ¢æ¡ä»¶ |
| | | */ |
| | | int temp_ack,temp_ack1,temp_ack2; |
| | | uint8_t temp=0; |
| | | void IIC_Read_Pca9555(uint8_t addr,uint8_t reg_addr,uint8_t* pBuffer,uint16_t num) |
| | | { |
| | | IIC2_pca_Start(); |
| | | IIC2_Send_pca_Byte(addr & 0xfe); |
| | | temp_ack=IIC2_Wait_pca_Ack(); |
| | | IIC2_Send_pca_Byte(reg_addr); |
| | | temp_ack1=IIC2_Wait_pca_Ack(); |
| | | |
| | | IIC2_pca_Start(); |
| | | IIC2_Send_pca_Byte(addr | 0x01); |
| | | temp_ack2=IIC2_Wait_pca_Ack(); |
| | | |
| | | // if(num==2){ |
| | | // pBuffer[0]=IIC2_Read_Byte(1); |
| | | // pBuffer[1]=IIC2_Read_Byte(0); |
| | | // }else{ |
| | | // pBuffer[0]=IIC2_Read_Byte(0); |
| | | // } |
| | | |
| | | while (num) |
| | | { |
| | | *pBuffer = IIC2_Read_pca_Byte(num); |
| | | if (num == 1) |
| | | { |
| | | IIC2_pca_send_NAck(); |
| | | //IIC2_NAck(); |
| | | } |
| | | else |
| | | { |
| | | IIC2_pca_send_Ack(); |
| | | //IIC2_Ack(); |
| | | } |
| | | pBuffer++; |
| | | num--; |
| | | } |
| | | IIC2_pca_Stop(); |
| | | |
| | | |
| | | // IIC2_Start(); |
| | | // IIC2_Send_Byte(addr & 0xfe); //åéåå½ä»¤ |
| | | // IIC2_Wait_pca_Ack(); |
| | | // IIC2_Send_Byte(reg_addr); //åé读å°å |
| | | // IIC2_Wait_pca_Ack(); |
| | | // IIC2_Start(); |
| | | // IIC2_Send_Byte(0x41); //åé读å½ä»¤ï¼è¿å
¥æ¥æ¶æ¨¡å¼ |
| | | // IIC2_Wait_pca_Ack(); |
| | | // temp=IIC2_Read_Byte(0); |
| | | // IIC2_Stop(); //产çä¸ä¸ªåæ¢æ¡ä»¶ |
| | | |
| | | } |
| | | |
| | | /*åpca9555第äºå±é©±å¨ï¼å¯è¾
å©é»è¾ä¸ç ´åæåºå±é©±å¨,è¯¥å½æ°é»è®¤é
ç½®è¾åºå¯åå¨ |
| | | addr è¯çå°åï¼0x40表示第ä¸ä¸ªè¯çå°å |
| | | data_L åå
¥è¯ççåå
«ä½æ°æ® |
| | | data_H åå
¥è¯ççåå使°æ® |
| | | */ |
| | | void PCA9555_write_output_port_data(unsigned char addr,unsigned char data_L,unsigned char data_H) |
| | | { |
| | | IIC_Write_Pca9555(addr,PCA9555_REG_OUT0,data_L,data_H);// PCA9555_REG_OUT0 è¾åºå¯åå¨0å°å |
| | | pca9555writedata_output[0]= data_L;//ä¿åè¯¥æ¬¡è®¾ç½®æ°æ® |
| | | pca9555writedata_output[1]= data_H; |
| | | } |
| | | |
| | | /*åpca9555第äºå±é©±å¨ï¼å¯è¾
å©é»è¾ä¸ç ´åæåºå±é©±å¨,è¯¥å½æ°é»è®¤é
ç½®è¾åºå¯åå¨ |
| | | addr è¯çå°åï¼0x40表示第ä¸ä¸ªè¯çå°å |
| | | data_L åå
¥è¯ççåå
«ä½æ°æ® |
| | | data_H åå
¥è¯ççåå使°æ® |
| | | */ |
| | | void PCA9555_write_config_port_data(unsigned char addr,unsigned char data_L,unsigned char data_H) |
| | | { |
| | | IIC_Write_Pca9555(addr,PCA9555_REG_CFG0,data_L,data_H);// PCA9555_REG_OUT0 è¾åºå¯åå¨0å°å |
| | | pca9555writedata_config[0]= data_L;//ä¿åè¯¥æ¬¡è®¾ç½®æ°æ® |
| | | pca9555writedata_config[1]= data_H; |
| | | } |
| | | /*åpca9555第äºå±é©±å¨ï¼å¯è¾
å©é»è¾ä¸ç ´åæåºå±é©±å¨,è¯¥å½æ°é»è®¤é
ç½®è¾å
¥ææ§ç¿»è½¬å¯åå¨ 1翻转 2ä¸å |
| | | addr è¯çå°åï¼0x40表示第ä¸ä¸ªè¯çå°å |
| | | data_L åå
¥è¯ççåå
«ä½æ°æ® |
| | | data_H åå
¥è¯ççåå使°æ® |
| | | */ |
| | | void PCA9555_write_polarity_port_data(unsigned char addr,unsigned char data_L,unsigned char data_H) |
| | | { |
| | | IIC_Write_Pca9555(addr,PCA9555_REG_POL0,data_L,data_H);// PCA9555_REG_OUT0 è¾åºå¯åå¨0å°å |
| | | pca9555writedata_polarity[0]= data_L;//ä¿åè¯¥æ¬¡è®¾ç½®æ°æ® |
| | | pca9555writedata_polarity[1]= data_H; |
| | | } |
| | | |
| | | /*读pca9555第äºå±é©±å¨ï¼å¯è¾
å©é»è¾ä¸ç ´åæåºå±é©±å¨ |
| | | addr è¯çå°åï¼0x40表示第ä¸ä¸ªè¯çå°å |
| | | pBuffer 读åºè¯ççæ°æ® 2个è¾å
¥å¯åå¨çå¼ä»
éè¾å
¥æ¨¡å¼ä½¿ç¨ |
| | | */ |
| | | void PCA9555_readdata(unsigned char addr,unsigned char* pBuffer) |
| | | { |
| | | IIC_Read_Pca9555(addr,PCA9555_REG_IN0,pBuffer,2);//2为读åºè¯çæ°æ®ç»æ°ï¼9555为2ç»,å
¨é¨è¯»åº |
| | | } |
| | | /*读pca9555第äºå±é©±å¨ï¼å¯è¾
å©é»è¾ä¸ç ´åæåºå±é©±å¨ |
| | | addr è¯çå°åï¼0x40表示第ä¸ä¸ªè¯çå°å |
| | | pBuffer 读åºè¯ççæ°æ® 2个å¯åå¨çå¼ä»
éè¾åºæ¨¡å¼,æ¤æ¨¡å¼ä¸ä»
åå¤è¾å
¥è¾åºçæ§å¶æ¨¡å¼çå¼ï¼èéçµå¹³å¼ |
| | | */ |
| | | void PCA9555_readdata_from_output_register(unsigned char addr,unsigned char* pBuffer) |
| | | { |
| | | IIC_Read_Pca9555(addr,PCA9555_REG_OUT0,pBuffer,2);//2为读åºè¯çæ°æ®ç»æ°ï¼9555为2ç»,å
¨é¨è¯»åº |
| | | } |
| | | /*读pca9555第äºå±é©±å¨ï¼å¯è¾
å©é»è¾ä¸ç ´åæåºå±é©±å¨ |
| | | addr è¯çå°åï¼0x40表示第ä¸ä¸ªè¯çå°å |
| | | pBuffer 读åºè¯ççæ°æ® 2个å¯åå¨çå¼ä»
éè¾åºæ¨¡å¼,æ¤æ¨¡å¼ä¸ä»
åå¤è¾å
¥è¾åºçæ§å¶æ¨¡å¼çå¼ï¼èéçµå¹³å¼ |
| | | */ |
| | | void PCA9555_readdata_from_polarity_register(unsigned char addr,unsigned char* pBuffer) |
| | | { |
| | | IIC_Read_Pca9555(addr,PCA9555_REG_POL0,pBuffer,2);//2为读åºè¯çæ°æ®ç»æ°ï¼9555为2ç»,å
¨é¨è¯»åº |
| | | } |
| | | /*读pca9555第äºå±é©±å¨ï¼å¯è¾
å©é»è¾ä¸ç ´åæåºå±é©±å¨ |
| | | addr è¯çå°åï¼0x40表示第ä¸ä¸ªè¯çå°å |
| | | pBuffer 读åºè¯ççæ°æ® é
ç½®2个å¯åå¨çæ°å¼ |
| | | */ |
| | | void PCA9555_readdata_from_config_register(unsigned char addr,unsigned char* pBuffer) |
| | | { |
| | | IIC_Read_Pca9555(addr,PCA9555_REG_CFG0,pBuffer,2);//2为读åºè¯çæ°æ®ç»æ°ï¼9555为2ç»,å
¨é¨è¯»åº |
| | | } |
| | | ///*é
ç½®è¯çç对åºç®¡èè¾å
¥è¾åºåè½ |
| | | // addr è¯çå°åï¼0x40表示第ä¸ä¸ªè¯çå°å |
| | | // data_L åå
¥è¯ççåå
«ä½æ°æ® 1é«é»æè¾å
¥ 0è¾åº è¾å
¥å¯åå¨é»è®¤ä¸æ |
| | | // data_H åå
¥è¯ççåå使°æ® |
| | | //*/ |
| | | //void PCA9555_config_gpio(unsigned char addr,unsigned char data_L,unsigned char data_H) |
| | | //{ |
| | | // IIC_Write_Pca9555(addr,PCA9555_REG_CFG0,data_L,data_H);// PCA9555_REG_OUT0 è¾åºå¯åå¨0å°å |
| | | //} |
| | | |
| | | |
| | | /*设置ææè¾åº |
| | | value æ§å¶çIOè¾åºç¶æ 0ï¼å
¨é¨è¾åºä½ 1ï¼å
¨é¨è¾åºé« |
| | | ä»
éè¾åºæ¨¡å¼ |
| | | */ |
| | | void PCA9555_Set_All_Output(unsigned char value) |
| | | { |
| | | int i; |
| | | for(i=0;i<4;i++){ |
| | | if(value==0) |
| | | pca9555writedata_output[i]=0; |
| | | else |
| | | pca9555writedata_output[i]=0xff; |
| | | } |
| | | PCA9555_write_output_port_data(PCA9555_DEVICE_ADDR,pca9555writedata_output[0],pca9555writedata_output[1]);//å
¨é¨è¾åºä¸º1æ0 |
| | | //å¤è¯ç |
| | | //PCA9555_writedata(PCA9555_REG_OUT0,pca9555writedata[2],pca9555writedata[3]); |
| | | } |
| | | /*设置第ä¸ä¸ªè¯çæä¸ééIOé«ä½è¾åºä»
éè¾åº |
| | | num æ§å¶çIOåºå· 1~16 |
| | | value æ§å¶çIOè¾åºç¶æ 0ï¼ä½çµå¹³ 1ï¼é«çµå¹³ |
| | | */ |
| | | void PCA9555_Set_One_Value_Output(unsigned char num,unsigned char value) |
| | | { |
| | | if(num >0 && num <17){//第ä¸ä¸ªè¯çIO1-16æ§å¶ |
| | | if(num <9){ |
| | | if(value)pca9555writedata_output[0] |= 0x01<<(num - 1);//èµå¼ä½é« |
| | | else pca9555writedata_output[0] &= ~(0x01<<(num - 1));//èµå¼ä½ä½ |
| | | } |
| | | else{ |
| | | if(value)pca9555writedata_output[1] |= 0x01<<(num - 9);//èµå¼ä½é« |
| | | else pca9555writedata_output[1] &= ~(0x01<<(num - 9));//èµå¼ä½ä½ |
| | | } |
| | | PCA9555_write_output_port_data(PCA9555_DEVICE_ADDR,pca9555writedata_output[0],pca9555writedata_output[1]); |
| | | }else{//è¶
åºè¯çæ§å¶ |
| | | //error |
| | | } |
| | | //åºä¸ä¸ºå¤è¯çé»è¾ |
| | | // else if(num >16 && num <33){//第äºä¸ªè¯çIO1-16æ§å¶ï¼ä½¿ç¨æ´å¤IO以æ¤ç±»æ¨ï¼æå¤æ¯æ0x000~0x111 å
±8个è¯ç串èï¼å
±128个IOï¼å¦æä¸å¤å¯ä»¥ä½¿ç¨PCA9505ï¼40个IOï¼æå¤ä¸²è320个IO |
| | | // if(num <25){ |
| | | // if(value)pca9555writedata[2] |= 0x01<<(num - 17);//èµå¼ä½é« |
| | | // else pca9555writedata[2] &= ~(0x01<<(num - 17));//èµå¼ä½ä½ |
| | | // } |
| | | // else{ |
| | | // if(value)pca9555writedata[3] |= 0x01<<(num - 25);//èµå¼ä½é« |
| | | // else pca9555writedata[3] &= ~(0x01<<(num - 25));//èµå¼ä½ä½ |
| | | // } |
| | | // PCA9555_writedata(PCA9555_REG_OUT1,pca9555writedata[2],pca9555writedata[3]); |
| | | // } |
| | | // else{//è¶
åºè¯çæ§å¶ |
| | | // //error |
| | | // } |
| | | } |
| | | /*设置第ä¸ä¸ªè¯çæä¸ééIOè¾å
¥æè¾åº |
| | | num æ§å¶çIOåºå· 1~17 |
| | | value æ§å¶çIOè¾åºç¶æ 0ï¼è¾åº 1ï¼è¾å
¥ |
| | | */ |
| | | void PCA9555_Set_One_Value_Config(unsigned char num,unsigned char value) |
| | | { |
| | | |
| | | if(num >0 && num <17){//第ä¸ä¸ªè¯çIO1-16æ§å¶ |
| | | if(num <9){ |
| | | if(value)pca9555writedata_config[0] |= 0x01<<(num - 1);//èµå¼ä½é« |
| | | else pca9555writedata_config[0] &= ~(0x01<<(num - 1));//èµå¼ä½ä½ |
| | | } |
| | | else{ |
| | | if(value)pca9555writedata_config[1] |= 0x01<<(num - 9);//èµå¼ä½é« |
| | | else pca9555writedata_config[1] &= ~(0x01<<(num - 9));//èµå¼ä½ä½ |
| | | } |
| | | PCA9555_write_config_port_data(PCA9555_DEVICE_ADDR,pca9555writedata_config[0],pca9555writedata_config[1]); |
| | | }else{//è¶
åºè¯çæ§å¶ |
| | | //error |
| | | } |
| | | } |
| | | /*设置第ä¸ä¸ªè¯çæä¸ééé»è®¤è¾å
¥çææ§ |
| | | num æ§å¶çIOåºå· 1~17 |
| | | value æ§å¶çIOè¾åºç¶æ 0ï¼éä½¿è½ 1ï¼ä½¿è½ç¿»è½¬ä¸ºçµå¹³0 |
| | | */ |
| | | void PCA9555_Set_One_Value_Polarity_input(unsigned char num,unsigned char value) |
| | | { |
| | | if(num >0 && num <17){//第ä¸ä¸ªè¯çIO1-16æ§å¶ |
| | | if(num <9){ |
| | | if(value)pca9555writedata_polarity[0] |= 0x01<<(num - 1);//èµå¼ä½é« |
| | | else pca9555writedata_polarity[0] &= ~(0x01<<(num - 1));//èµå¼ä½ä½ |
| | | } |
| | | else{ |
| | | if(value)pca9555writedata_polarity[1] |= 0x01<<(num - 9);//èµå¼ä½é« |
| | | else pca9555writedata_polarity[1] &= ~(0x01<<(num - 9));//èµå¼ä½ä½ |
| | | } |
| | | PCA9555_write_polarity_port_data(PCA9555_DEVICE_ADDR,pca9555writedata_polarity[0],pca9555writedata_polarity[1]); |
| | | }else{//è¶
åºè¯çæ§å¶ |
| | | //error |
| | | } |
| | | } |
| | | /*读å5Vå¼èçè¾å
¥é«ä½çµå¹³ |
| | | è¿åå¼ é«1 ä½0 çµå¹³ |
| | | */ |
| | | int read_5v_input_pca(void) |
| | | {PCA9555_readdata(PCA9555_DEVICE_ADDR,pca9555writedata_input);//读è¾å
¥å¯åå¨çå¼ |
| | | uint16_t gpio_state; |
| | | gpio_state=(uint16_t)pca9555writedata_input[0]<<8|pca9555writedata_input[1]; |
| | | if(INPUT_5V_POSITION&gpio_state) |
| | | return 1; |
| | | else { |
| | | return 0; |
| | | } |
| | | } |
| | | /*读åä¾çµå¼èçè¾å
¥é«ä½çµå¹³ |
| | | è¿åå¼ é«1 ä½0 çµå¹³ |
| | | */ |
| | | int read_powerkey_input_pca(void) |
| | | {PCA9555_readdata(PCA9555_DEVICE_ADDR,pca9555writedata_input);//读è¾å
¥å¯åå¨çå¼ |
| | | uint16_t gpio_state; |
| | | gpio_state=(uint16_t)pca9555writedata_input[0]<<8|pca9555writedata_input[1]; |
| | | if(PWR_ON_POSITION&gpio_state) |
| | | return 1; |
| | | else { |
| | | return 0; |
| | | } |
| | | } |
| | | /*读åSOSå¼èçè¾å
¥é«ä½çµå¹³ |
| | | è¿åå¼ é«1 ä½0 çµå¹³ |
| | | */ |
| | | int read_userkey_input_pca(void) |
| | | {PCA9555_readdata(PCA9555_DEVICE_ADDR,pca9555writedata_input);//读è¾å
¥å¯åå¨çå¼ |
| | | uint16_t gpio_state; |
| | | gpio_state=(uint16_t)pca9555writedata_input[0]<<8|pca9555writedata_input[1]; |
| | | if(SOS_ENBALE_POSITION&gpio_state) |
| | | { |
| | | return 1; |
| | | } |
| | | else |
| | | { |
| | | return 0; |
| | | } |
| | | |
| | | } |
| | | int read_userkey_input_pca_lora(uint8_t flag) |
| | | { |
| | | PCA9555_readdata(PCA9555_DEVICE_ADDR,pca9555writedata_input);//读è¾å
¥å¯åå¨çå¼ |
| | | uint16_t gpio_state; |
| | | gpio_state=(uint16_t)pca9555writedata_input[0]<<8|pca9555writedata_input[1]; |
| | | if(SOS_ENBALE_POSITION&gpio_state) |
| | | { |
| | | return flag=1; |
| | | } |
| | | else |
| | | { |
| | | return flag=0; |
| | | } |
| | | |
| | | } |
| | | void PCA9555_init() |
| | | { |
| | | //IIC_gpio_pca_init();//é
ç½®IIC管è |
| | | |
| | | //PCA9555_write_config_port_data(PCA9555_DEVICE_ADDR,PCA_OUTPUT_CONFIG_MASK,PCA_OUTPUT_CONFIG_MASK);//å
¨é
置为è¾åº |
| | | //PCA9555_Set_One_Value_Polarity_input(PWR_ON,0); |
| | | //PCA9555_write_config_port_data(PCA9555_DEVICE_ADDR,PCA_INPUT_CONFIG_MASK,PCA_INPUT_CONFIG_MASK);//å
¨é
置为è¾å
¥ |
| | | //PCA9555_write_polarity_port_data(PCA9555_DEVICE_ADDR,0x00,0x00);//翻转 |
| | | //PCA9555_Set_One_Value_Config(WAKE_UP,1); |
| | | //PCA9555_Set_All_Output(1); |
| | | |
| | | PCA9555_Set_One_Value_Config(GPS_POWER,0);//设置GPS为è¾åº |
| | | PCA9555_Set_One_Value_Output(GPS_POWER,1);//æé«GPS |
| | | PCA9555_Set_One_Value_Config(ADC_MINIUS,0);//设置ADCè¾åº |
| | | PCA9555_Set_One_Value_Output(ADC_MINIUS,1);//é»è®¤æé« |
| | | PCA9555_Set_One_Value_Config(MCU_A,0);//设置串å£å¤ç¨è¯ç忢 |
| | | PCA9555_Set_One_Value_Output(MCU_A,1);//è¾åºé«çµå¹³ä¸ºuarté讯 |
| | | PCA9555_Set_One_Value_Config(INPUT_5V,1);//设置5Vè¾å
¥æ£æµ |
| | | PCA9555_Set_One_Value_Config(GPS_LED,0);//设置LEDç¯è¾åº |
| | | PCA9555_Set_One_Value_Output(GPS_LED,1);//è¾åºé«çµå¹³å¼å¯LEDééªç |
| | | 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_Output(PWR_ON,0);//æä½ |
| | | //PCA9555_readdata_from_output_register(PCA9555_DEVICE_ADDR,pca9555writedata_input); |
| | | //PCA9555_Set_One_Value_Output(AIR780E_ENBALE,0); |
| | | //PCA9555_Set_One_Value_Output(PWR_ON,0); |
| | | // PCA9555_Set_All_Output(0); |
| | | //PCA9555_readdata_from_polarity_register(PCA9555_DEVICE_ADDR,pca9555writedata_input); |
| | | PCA9555_readdata(PCA9555_DEVICE_ADDR,pca9555writedata_input);//读è¾å
¥å¯åå¨çå¼ |
| | | |
| | | //PCA9555_readdata_from_config_register(PCA9555_DEVICE_ADDR,pca9555writedata_config); |
| | | // PCA9555_Set_All_Output(0);//å
¨é¨æä½ |
| | | |
| | | //æµè¯ |
| | | //PCA9555_Set_All_Output(1);//å
¨é¨æé« |
| | | //PCA9555_Set_All_Output(0);//å
¨é¨æä½ |
| | | |
| | | } |
| | | void check_input_change(void) |
| | | { |
| | | uint16_t gpio_state; |
| | | gpio_state=(uint16_t)pca9555writedata_input[0]<<8|pca9555writedata_input[1]; |
| | | if(LORA_IRQ_POSITION&gpio_state) |
| | | { |
| | | |
| | | } |
| | | //uart_change_check(gpio_state); |
| | | } |
| | | |
| | | static void pca_handler(enum IO_PIN_T pin) |
| | | { |
| | | PCA9555_readdata(PCA9555_DEVICE_ADDR,pca9555writedata_input);//读è¾å
¥å¯åå¨çå¼ |
| | | check_input_change(); |
| | | } |
| | | |
| | | //void pca_input_detection_init(GPIO_IRQ_HANDLER_T irq_handler) |
| | | //{ |
| | | // pca_input_detect_irq_handler=irq_handler; |
| | | // gpio_pin_set_dir(PCA_INPUT_DETECT , GPIO_DIR_IN, 0); |
| | | // io_pull_set(PCA_INPUT_DETECT, IO_PULL_UP, IO_PULL_UP_LEVEL2); |
| | | // gpio_enable_irq(PCA_INPUT_DETECT, GPIO_IRQ_TYPE_FALLING_EDGE, pca_input_detect_irq_handler); |
| | | // power_wakeup_enable((enum POWER_WAKEUP_SOURCE_T)PCA_INPUT_DETECT, POWER_WAKEUP_LEVEL_LOW); |
| | | //} |
| | | |
¶Ô±ÈÐÂÎļþ |
| | |
| | | #include "board.h" |
| | | #define IIC2_READ_SDA gpio_pin_get_val(SDA_PIN) |
| | | #define SDA_1 gpio_pin_set(SDA_PIN) |
| | | #define SCL_1 gpio_pin_set(SCL_PIN) |
| | | |
| | | #define PCA9555_SLA (0x40 >> 1) // å®ä¹PAC9555çå¨ä»¶å°å |
| | | #define PCA9555_REG_IN0 0x00 // å®ä¹è¾å
¥å¯åå¨0å°å |
| | | #define PCA9555_REG_IN1 0x01 // å®ä¹è¾å
¥å¯åå¨1å°å |
| | | #define PCA9555_REG_OUT0 0x02 // å®ä¹è¾åºå¯åå¨0å°å |
| | | #define PCA9555_REG_OUT1 0x03 // å®ä¹è¾åºå¯åå¨1å°å |
| | | #define PCA9555_REG_POL0 0x04 // å®ä¹ææ§å转å¯åå¨0å°å |
| | | #define PCA9555_REG_POL1 0x05 // å®ä¹ææ§å转å¯åå¨1å°å |
| | | #define PCA9555_REG_CFG0 0x06 // å®ä¹æ¹åé
ç½®å¯åå¨0å°å |
| | | #define PCA9555_REG_CFG1 0x07 // å®ä¹æ¹åé
ç½®å¯åå¨1å°å |
| | | #define PCA9555_DEVICE_ADDR 0x40 // å®ä¹PCA9555å°å |
| | | #define PCA_OUTPUT_CONFIG_MASK 0x00 |
| | | #define PCA_INPUT_CONFIG_MASK 0xff |
| | | #define SDA_0 gpio_pin_clr(SDA_PIN) |
| | | #define SCL_0 gpio_pin_clr(SCL_PIN) |
| | | //è¾åºåé
ç½® |
| | | #define MAX_GPIO_NUM 16 |
| | | //0ç» |
| | | #define MCU_A 0x01 |
| | | #define CHG_G 0x02 |
| | | #define LORA_IRQ 0x03 |
| | | #define LORA_NRST 0x04 |
| | | #define ADC_MINIUS 0x05 |
| | | #define INPUT_5V 0x06 |
| | | #define PWR_ON 0x07 |
| | | #define PWR_ENABLE 0x08 |
| | | //1ç» |
| | | #define GPS_LED 0x09 |
| | | #define TTS_ENABLE 0x0A |
| | | #define WAKE_UP 0x0B |
| | | #define AIR780E_ENBALE 0x0C |
| | | #define SOS_ENBALE 0x0D |
| | | #define GPS_BACKUP 0x0E |
| | | #define GPS_POWER 0x0F |
| | | #define MAIN_RI 0x10 |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | //è¾å
¥å¯åå¨INT夿æ°ç»å¯¹åºä½ç½® |
| | | //input 0ç» |
| | | #define MCU_A_POSITION (1<<(MAX_GPIO_NUM-MCU_A)) |
| | | #define CHG_G_POSITION (1<<(MAX_GPIO_NUM-CHG_G)) |
| | | #define LORA_IRQ_POSITION (1<<(MAX_GPIO_NUM-LORA_IRQ)) |
| | | #define LORA_NRST_POSITION (1<<(MAX_GPIO_NUM-LORA_NRST)) |
| | | #define ADC_MINIUS_POSITION (1<<(MAX_GPIO_NUM-ADC_MINIUS)) |
| | | #define INPUT_5V_POSITION (1<<(MAX_GPIO_NUM-INPUT_5V)) |
| | | #define PWR_ON_POSITION (1<<(MAX_GPIO_NUM-PWR_ON)) |
| | | #define PWR_ENABLE_POSITION (1<<(MAX_GPIO_NUM-PWR_ENABLE)) |
| | | //input 1ç» |
| | | #define GPS_LED_POSITION (1<<(MAX_GPIO_NUM-GPS_LED)) |
| | | #define TTS_ENABLE_POSITION (1<<(MAX_GPIO_NUM-TTS_ENABLE)) |
| | | #define WAKE_UP_POSITION (1<<(MAX_GPIO_NUM-WAKE_UP)) |
| | | #define AIR780E_ENBALE_POSITION (1<<(MAX_GPIO_NUM-AIR780E_ENBALE)) |
| | | #define SOS_ENBALE_POSITION (1<<(MAX_GPIO_NUM-SOS_ENBALE)) |
| | | #define GPS_BACKUP_POSITION (1<<(MAX_GPIO_NUM-GPS_BACKUP)) |
| | | #define GPS_POWER_POSITION (1<<(MAX_GPIO_NUM-GPS_POWER)) |
| | | #define MAIN_RI_POSITION (1<<(MAX_GPIO_NUM-MAIN_RI)) |
| | | //uint8_t gps_led_output_state,tts_enbale_output_state,wake_up_output_state,air780e_enable_output_state,sos_enable_output_state,gps_backup_output_state,gps_power_output_state,main_ri_output_state;//1ç»output IOå£ä»å·¦å°å³1.0~1.7 |
| | | //uint8_t mcu_a_output_state,chg_g_output_state,lora_irq_output_state,lora_nrst_output_state,adc_minius_output_state,input_5v_output_state,pwr_on_output_state,pwr_enable_output_state;//2ç»output IOå£ä»å·¦å°å³0.0~0.7 |
| | | void IIC_gpio_pca_init(void); |
| | | void IIC2_pca_Start(void); |
| | | void IIC_pca_Ready(void); |
| | | void IIC2_pca_Stop(void); |
| | | uint8_t IIC2_Wait_pca_Ack(void); |
| | | void IIC2_pca_send_Ack(void); |
| | | void IIC2_pca_send_NAck(void); |
| | | void IIC2_Send_pca_Byte(uint8_t txd); |
| | | uint8_t IIC2_Read_pca_Byte(unsigned char ack); |
| | | void IIC_Write_Pca9555(unsigned char addr,unsigned char reg_addr,unsigned char low_byte,unsigned char high_byte); |
| | | void IIC_Read_Pca9555(uint8_t addr,uint8_t reg_addr,uint8_t* pBuffer,uint16_t num); |
| | | void PCA9555_write_output_port_data(unsigned char addr,unsigned char data_L,unsigned char data_H); |
| | | void PCA9555_write_config_port_data(unsigned char addr,unsigned char data_L,unsigned char data_H); |
| | | void PCA9555_readdata(unsigned char addr,unsigned char* pBuffer); |
| | | void PCA9555_Set_All_Output(unsigned char value); |
| | | void PCA9555_Set_One_Value_Output(unsigned char num,unsigned char value); |
| | | void PCA9555_Set_One_Value_Config(unsigned char num,unsigned char value); |
| | | void PCA9555_Set_One_Value_Polarity_input(unsigned char num,unsigned char value); |
| | | void PCA9555_init(); |
| | | //æå±å½æ° |
| | | int read_userkey_input_pca_lora(uint8_t flag); |
¶Ô±ÈÐÂÎļþ |
| | |
| | | #include "mk_trace.h" |
| | | #include "mk_uwb.h" |
| | | #include "mk_phy.h" |
| | | #include "mk_misc.h" |
| | | #include "mk_power.h" |
| | | #include "mk_sleep_timer.h" |
| | | #include "lib_ranging.h" |
| | | #include "dw_app.h" |
| | | #include "board.h" |
| | | #include "mk_calib.h" |
| | | |
| | | #if defined(MK_SS_TWR_DW_INIT) |
| | | |
| | | extern int TagRange(void); |
| | | |
| | | /* Ranging period: 1s */ |
| | | #define RANGING_PERIOD_MS (1000) |
| | | |
| | | /* This is the delay from the end of the poll frame transmission to the enable of the receiver */ |
| | | #define POLL_TX_TO_RESP_RX_DLY_US 750U //yuan700 |
| | | |
| | | #define RESP_RX_TO_FINAL_TX_DLY_US 550U |
| | | |
| | | /* Poll delay: 1s */ |
| | | #define POLL_DELAY 100U //yuan100U |
| | | |
| | | /* Receive response timeout */ |
| | | #define RESP_RX_TIMEOUT_US 2500U //Yuan500 10mssuccess 300jixian |
| | | |
| | | /* Field index in frame */ |
| | | #define MSG_SEQ_NUM_IDX 2 |
| | | #define FINAL_MSG_POLL_TX_TS_IDX 10 |
| | | #define FINAL_MSG_RESP_RX_TS_IDX 14 |
| | | #define FINAL_MSG_FINAL_TX_TS_IDX 18 |
| | | #define DELAY_DEFAULT 50000 |
| | | #define DELAY_BETWEEN_TWO_FRAME_UUS 600 //yuan1400 |
| | | #define HALF_SECOND_TIME 62400000 |
| | | |
| | | uint16_t CmpTagInList(uint16_t tagid); |
| | | uint16_t AddNewTagIntoList(uint16_t tagid); |
| | | void AnchorListUpdate(void); |
| | | void Rank_ANchor_list_by_dis(void); |
| | | struct mk_uwb_configure |
| | | { |
| | | uint8_t phy_work_mode; /* PHY_TX / PHY_RX / PHT_TX|PHY_RX */ |
| | | struct UWB_CONFIG_T phy_cfg; |
| | | }; |
| | | uint32_t dev_id; |
| | | uint8_t group_id; |
| | | /* Default communication configuration. */ |
| | | static struct mk_uwb_configure config = {//yuan |
| | | .phy_work_mode = (uint8_t)(PHY_TX | PHY_RX), |
| | | .phy_cfg.ch_num = 5, /* Channel number. */ |
| | | .phy_cfg.code_index = 9, /* TRX preamble code */ |
| | | .phy_cfg.mean_prf = MEAN_PRF_64M, /* Mean prf 64/128/256M */ |
| | | .phy_cfg.data_bit_rate = DATA_BR_6M8, /* Data rate 6.8M */ |
| | | .phy_cfg.sync_sym = PREAM_LEN_128, /* Preamble duration, length of preamble 128 */ |
| | | .phy_cfg.sfd_sym = NON_STD_NSFD5_8, /* Identifier for SFD sequence */ |
| | | .phy_cfg.ranging_bit = 1, /* ranging bit set 1 */ |
| | | .phy_cfg.trx_mode = TRX_MODE_15_4A, /* IEEE802.15.4z - BPRF mode */ |
| | | .phy_cfg.sts_pkt_cfg = STS_PKT_CFG_0, /* SP0 Frame */ |
| | | .phy_cfg.sts_segnum = STS_SEGNUM_BPRF_1, /* Number of STS segments in the frame */ |
| | | .phy_cfg.sts_seglen = STS_SEGLEN_BPRF_64, /* Number of symbols in an STS segment */ |
| | | .phy_cfg.rx_ant_id = UWB_RX_ANT_3, /* UWB RX antenna port */ |
| | | }; |
| | | ///* Default communication configuration. */ |
| | | //static struct mk_uwb_configure config = { |
| | | // .phy_work_mode = (uint8_t)(PHY_TX | PHY_RX), |
| | | // .phy_cfg.ch_num = 5, /* Channel number. */ |
| | | // .phy_cfg.code_index = 3, /* TX preamble code. */ |
| | | // .phy_cfg.mean_prf = MEAN_PRF_16M, /* Data rate 6.8M */ |
| | | // .phy_cfg.data_bit_rate = DATA_BR_110K, /* data rate 6.8M. */ |
| | | // .phy_cfg.sync_sym = PREAM_LEN_1024, /* Preamble duration, length of preamble 128 */ |
| | | // .phy_cfg.sfd_sym = NSFD_64, /* Identifier for SFD sequence */ |
| | | // .phy_cfg.ranging_bit = 1, /* ranging bit set. */ |
| | | // .phy_cfg.trx_mode = TRX_MODE_15_4A, /* IEEE802.15.4z - BPRF mode */ |
| | | // .phy_cfg.sts_pkt_cfg = STS_PKT_CFG_0, /* SP0 Frame */ |
| | | // .phy_cfg.sts_segnum = STS_SEGNUM_BPRF_1, /* Number of STS segments in the frame */ |
| | | // .phy_cfg.sts_seglen = STS_SEGLEN_BPRF_64, /* Number of symbols in an STS segment */ |
| | | // .phy_cfg.rx_ant_id = UWB_RX_ANT_3, /* UWB RX antenna port */ |
| | | //}; |
| | | /* Buffer to store received frame */ |
| | | static uint8_t rx_buf[150]; |
| | | static uint8_t uwb_sendbuffer[150]; |
| | | /* Frames used in the ranging process |
| | | * Poll message: |
| | | * - byte 0 - 1: 0x8841 to indicate a data frame using 16-bit addressing. |
| | | * - byte 2: sequence number, incremented for each new frame. |
| | | * - byte 3 - 4: PAN Id 0x4B4d |
| | | * - byte 5 - 6: Destination address |
| | | * - byte 7 - 8: Source address |
| | | * - byte 9: Message type (0x02 RANGING_POLL / 0x03 RANGING_RESPONSE / 0x04 RANGING_FINAL) |
| | | * Response message: |
| | | * - byte 10: activity code (0x07 to tell the initiator to go on with the ranging exchange) |
| | | * Final message: |
| | | * - byte 10 - 13: poll message transmission timestamp. |
| | | * - byte 14 - 17: response message reception timestamp. |
| | | * - byte 18 - 21: final message transmission timestamp. |
| | | */ |
| | | static uint8_t tx_poll_msg[] = {0x41, 0x88, 0, 0x4D, 0x4B, 0x53, 0x45, 0x4D, 0x49, 0x02}; |
| | | static uint8_t rx_resp_msg[] = {0x41, 0x88, 0, 0x4D, 0x4B, 0x4D, 0x49, 0x53, 0x45, 0x03, 0x07}; |
| | | static uint8_t tx_final_msg[] = {0x41, 0x88, 0, 0x4D, 0x4B, 0x53, 0x45, 0x4D, 0x49, 0x04, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; |
| | | |
| | | /* Count value of phy counter when transmitting and receiving frames */ |
| | | static uint32_t poll_tx_en_start_u32; |
| | | static uint32_t resp_rx_en_start_u32; |
| | | static uint32_t final_tx_en_start_u32; |
| | | |
| | | /* 41 bits timestamps of frames transmission/reception. */ |
| | | static int64_t poll_tx_ts_i64; |
| | | static int64_t resp_rx_ts_i64; |
| | | static int64_t final_tx_ts_i64; |
| | | |
| | | /* Frame sequence number, incremented after each transmission. */ |
| | | static uint8_t frame_seq_nb = 0; |
| | | |
| | | static volatile uint16_t rx_state; |
| | | static volatile uint16_t rx_state1; |
| | | static volatile uint16_t rx_length; |
| | | //DW |
| | | uint16_t rec_nearbaseid; |
| | | uint8_t temp_tag_num; |
| | | int32_t test2; |
| | | static uint8_t receive_flag=0; |
| | | static uint8_t rec_tag_index,tag_num_tosend; |
| | | |
| | | uint32_t start_receive_count,end_receive_count,poll_timeout,current_count,temp_resp; |
| | | uint16_t taglist_total_num,taglist_current_index; //å½ååè¡¨æ»æ°é |
| | | uint8_t taglist_keeptime[MAX_TAG_LIST_NUM]; //æ¯ä¸ªæ ç¾åæ´»æ¶é´ |
| | | uint16_t taglist_id[MAX_TAG_LIST_NUM],taglist_dist[MAX_TAG_LIST_NUM]; //æ ç¾è·ç¦»åæ ç¾çID |
| | | |
| | | int32_t mainbase_dist,nearbase_distlist[MAX_NEARBASE_NUM],true_nearbase_distlist[MAX_NEARBASE_NUM],true_exsistbase_list[MAX_NEARBASE_NUM],ancsync_time,nextpoll_delaytime,offsettimeus; |
| | | uint8_t anclost_times=0 , mainbase_lost_count=0,exsistbase_list[MAX_NEARBASE_NUM],get_newbase=0,nearbase_num,last_nearbase_num,next_nearbase_num; |
| | | uint16_t nearbaseid_list[MAX_NEARBASE_NUM],mainbase_id,true_nearbase_idlist[MAX_NEARBASE_NUM],rec_nearbaseid,rec_nearbasepos; |
| | | uint16_t u16_nearbase_distlist[MAX_NEARBASE_NUM]; |
| | | uint32_t temp_count1=0; |
| | | uint32_t temp_count2=0; |
| | | uint32_t temp_count3=0; |
| | | uint32_t temp_count4=0; |
| | | uint32_t tempflag=0; |
| | | int32_t freq_offset,freq_offset_filter; |
| | | int temp_flag,poll_tx_num,resp_rx_num; |
| | | extern double distance; |
| | | uint32_t count1,count2; |
| | | enum SIMPLE_FSM_T |
| | | { |
| | | SIMPLE_IDLE = 0, |
| | | SIMPLE_POLL = 1, |
| | | SIMPLE_RESPONSE = 2, |
| | | SIMPLE_FINAL = 3, |
| | | }; |
| | | void uwb_poll_buffer_construct(void) |
| | | { |
| | | for(uint8_t i=0;i<nearbase_num;i++) //æ ç¾è·ç¦»32ä½è½¬æ16ä½ |
| | | { |
| | | u16_nearbase_distlist[i] = nearbase_distlist[i]; |
| | | } |
| | | uwb_sendbuffer[GROUP_ID_IDX] = group_id; |
| | | memcpy(&uwb_sendbuffer[TAG_ID_IDX],&dev_id,2); |
| | | //uwb_sendbuffer[BATTARY_IDX] = bat_percent; |
| | | uwb_sendbuffer[SEQUENCE_IDX] = frame_seq_nb++; |
| | | uwb_sendbuffer[NEARBASENUM_INDEX] = nearbase_num; |
| | | memcpy(&uwb_sendbuffer[NEARBASEID_INDEX],&nearbaseid_list,nearbase_num*2);//åºç«id |
| | | memcpy(&uwb_sendbuffer[NEARBASEID_INDEX+nearbase_num*2],&u16_nearbase_distlist,nearbase_num*2); |
| | | uwb_sendbuffer[MESSAGE_TYPE_IDX] = MBX_POLL; |
| | | memcpy(&uwb_sendbuffer[ANCHOR_ID_IDX],&mainbase_id,2); |
| | | } |
| | | |
| | | static enum SIMPLE_FSM_T state = SIMPLE_IDLE; |
| | | |
| | | /** |
| | | * @brief Correct TX timestamp of the ranging frame. |
| | | * |
| | | * @param[in] timestamp PHY timer count of TX |
| | | * @return TX timestamp (unit: 15.65ps) |
| | | */ |
| | | static int64_t ranging_tx_time_correct(uint32_t timestamp) |
| | | { |
| | | int64_t tx_timestamp = ranging_tx_time(timestamp); |
| | | |
| | | // correct antenna delay (TX using the same antenna as RX) |
| | | tx_timestamp += ranging_ant_delays_get(config.phy_cfg.rx_ant_id) / 2; |
| | | |
| | | return tx_timestamp; |
| | | } |
| | | |
| | | /** |
| | | * @brief Correct RX timestamp of the ranging frame. |
| | | * |
| | | * @param[in] ind MAC RX report |
| | | * @return RX timestamp (unit: 15.65ps) |
| | | */ |
| | | static int64_t ranging_rx_time_correct(const struct MAC_HW_REPORT_T *ind) |
| | | { |
| | | int64_t rx_timestamp = ranging_rx_time(ind); |
| | | |
| | | // correct antenna delay |
| | | rx_timestamp -= ranging_ant_delays_get(config.phy_cfg.rx_ant_id) / 2; |
| | | |
| | | return rx_timestamp; |
| | | } |
| | | |
| | | /* RX done process handler. */ |
| | | static void rx_int_callback(struct MAC_HW_REPORT_T *rx_report) |
| | | { |
| | | // Power off radio |
| | | power_off_radio(); |
| | | |
| | | rx_state = rx_report->err_code; |
| | | |
| | | /** UWB RX success */ |
| | | if (rx_state == UWB_RX_OK) |
| | | { |
| | | /* Received data does not contain FCS */ |
| | | rx_length = rx_report->pkt_len; |
| | | memcpy(rx_buf, rx_report->pkt_data, rx_length); |
| | | /* Calculate rx timestamp */ |
| | | resp_rx_ts_i64 = ranging_rx_time_correct(rx_report); |
| | | temp_count1=phy_timer_count_get(); |
| | | //è·ååå°ç«¯æ¶éåå·® |
| | | resp_rx_num++; |
| | | freq_offset=phy_freq_offset_get(); |
| | | |
| | | // freq_offset_filter=average_filter(freq_offset);//è·åé¢å |
| | | //int32_t ppm = freq_offset_filter / (int32_t)(ch_center_freq_map[UWB_CH_NUM] * 1e-6); |
| | | //calib_xtal38m4_load_cap_auto_tune(ppm);//å©ç¨çµå®¹è°æ´æ¶æ¯éé
é¢ååºå¨å®æ´çä¸å
ä¹åè°æ´ï¼éè¦å
³éXTAL_AUTO_TUNE_EN å®å®ä¹é¿å
æ¶å
ä¸éæ ¡åå¯¼è´æµè·é误 |
| | | //LOG_INFO(TRACE_MODULE_APP, "poll_tx_num is %d,resp_rx_num is %d,distance is %lf\r\n",poll_tx_num,resp_rx_num,distance); |
| | | receive_flag=1; |
| | | |
| | | } |
| | | else |
| | | { |
| | | /* UWB_PLD_ERR payload error */ |
| | | /* UWB_PHR_ERR PHR error */ |
| | | /* UWB_SFD_ERR Sfd error */ |
| | | /* UWB_BD_ERR Preamble detection error */ |
| | | /* UWB_TO_ERR Receive timeout */ |
| | | /* UWB_STS_ERR STS error */ |
| | | rx_state1=rx_report->err_code; |
| | | rx_length = 0; |
| | | receive_flag=2; |
| | | temp_count2=phy_timer_count_get(); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | /* TX done process handler. */ |
| | | static void tx_int_callback(struct MAC_HW_REPORT_T *tx_report) |
| | | { |
| | | // Power off radio |
| | | power_off_radio(); |
| | | |
| | | /** UWB TX success */ |
| | | if (tx_report->err_code == UWB_TX_OK) |
| | | { |
| | | poll_tx_num++; |
| | | temp_count4=phy_timer_count_get();//æµè¯ |
| | | if(temp_flag){ |
| | | count2=phy_timer_count_get(); |
| | | temp_flag=0; |
| | | return; |
| | | } |
| | | count1=temp_count1; |
| | | temp_flag=1; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | //注æï¼å ä¸ºæ°æ³¨åçæ ç¾å¹¶ä¸ç¥éåºç«å·²ç»æ¶å°äºï¼æä»¥è¦å¨ä¸ä¸å
ç«å»å°æ°çæ ç¾IDååºï¼å¦åæ ç¾ä¼ä¸ç´æ¢å åºç«çpollå
ã |
| | | //æ¹æ³æ¯å°æ°æ³¨åçæ ç¾æ·»å å°ä¸æ¬¡åéçæ ç¾å表头é¨ï¼å
¶ä»æ ç¾ä¾æ¬¡ååæªå¨ã |
| | | uint16_t AddNewTagIntoList(uint16_t tagid) |
| | | { |
| | | uint16_t newindex_cal = taglist_current_index+25;//å½åç´¢å¼+25ï¼ä¸ºä¸æ¬¡ç´¢å¼è¦ååºçå¼çæå¤§å¼ï¼å¦ææ»æ°å°äºè¿ä¸ªå¼ï¼å³å¯æ¾å°æåé¢ã |
| | | if(newindex_cal>=taglist_total_num) //妿å½åç´¢å¼æ¯æåä¸å
ï¼é£ä¹å°±å å°æ»ç´¢å¼çåé¢ï¼å¦æä¸æ¯å°±å å°ä¸ä¸æ¬¡èµ·å§ç´¢å¼ä½ç½®ã |
| | | { |
| | | newindex_cal = taglist_total_num; |
| | | |
| | | }else{ |
| | | for(uint16_t i=taglist_total_num;i>newindex_cal;i--) //ä»åå¾åæªå°æ¹??å°±æ¯æå
¥ |
| | | { |
| | | taglist_id[i]=taglist_id[i-1]; |
| | | taglist_dist[i]=taglist_dist[i-1]; |
| | | taglist_keeptime[i]=taglist_keeptime[i-1]; |
| | | } |
| | | } |
| | | taglist_total_num++; |
| | | taglist_id[newindex_cal] = tagid; |
| | | taglist_dist[newindex_cal] = 0; |
| | | taglist_keeptime[newindex_cal] = TAG_KEEPTIMES; |
| | | return newindex_cal; |
| | | } |
| | | uint8_t FindNearBasePos(uint16_t baseid)//寻æ¾å½åå表ä¸çåºç«è¿åç´¢å¼ |
| | | { |
| | | uint8_t i; |
| | | for(i=0;i<nearbase_num;i++) |
| | | { |
| | | if(baseid==nearbaseid_list[i]) |
| | | return i; |
| | | } |
| | | if(i==nearbase_num) |
| | | return nearbase_num; |
| | | } |
| | | |
| | | void AnchorListUpdate(void) |
| | | { |
| | | next_nearbase_num = 0; |
| | | int j=0; |
| | | for(int i=0;i<nearbase_num;i++) |
| | | { |
| | | if(exsistbase_list[i]>0) |
| | | { |
| | | exsistbase_list[i]--; |
| | | next_nearbase_num++; |
| | | true_exsistbase_list[j]=exsistbase_list[i]; |
| | | true_nearbase_idlist[j]=nearbaseid_list[i]; |
| | | true_nearbase_distlist[j++]=nearbase_distlist[i]; |
| | | |
| | | } |
| | | } |
| | | nearbase_num = next_nearbase_num;//æ´æ°ç°ååºç«æ° |
| | | last_nearbase_num = next_nearbase_num;//æ´æ°å½ååºç«æ° |
| | | } |
| | | |
| | | void Rank_ANchor_list_by_dis(void)//æç
§ç®åçåºç«è·ç¦»è¿è¡å泡æåºç¨ä¸´æ¶æ°ç»æ¹å¼å°æè¿çæ¾å°æåé¢ï¼æè¿çæ¾å°æåé¢ |
| | | { |
| | | for(int i=0;i<last_nearbase_num-1;i++) |
| | | { |
| | | for(int j=0;j<last_nearbase_num-1;j++) |
| | | { |
| | | if(true_nearbase_distlist[j]>true_nearbase_distlist[j+1]) |
| | | { |
| | | uint32_t temp_dist,temp_id,temp_exsis; |
| | | temp_dist=true_nearbase_distlist[j]; |
| | | temp_id = true_nearbase_idlist[j]; |
| | | temp_exsis=true_exsistbase_list[j]; |
| | | true_nearbase_distlist[j]=true_nearbase_distlist[j+1]; |
| | | true_nearbase_idlist[j]=true_nearbase_idlist[j+1]; |
| | | true_exsistbase_list[j]=true_exsistbase_list[j+1]; |
| | | |
| | | true_nearbase_distlist[j+1]=temp_dist; |
| | | true_nearbase_idlist[j+1]=temp_id; |
| | | true_exsistbase_list[j+1]=temp_exsis; |
| | | } |
| | | } |
| | | } |
| | | for (int i=0;i<last_nearbase_num;i++) |
| | | { |
| | | nearbaseid_list[i]=true_nearbase_idlist[i]; |
| | | nearbase_distlist[i]=true_nearbase_distlist[i]; |
| | | exsistbase_list[i] = true_exsistbase_list[i]; |
| | | } |
| | | } |
| | | uint16_t CmpTagInList(uint16_t tagid)//æ¾è¿ä¸ªæ°ä¸å
çåºç«å¨ä¸å¨ç°åçtaglistä¸å¨çè¯å¯¹åºä½ç½®æ´æ°åæ´»æ¶é´ï¼ä¸å¨å°±å¢å ï¼ç¡®ä¿æææ°éå°äºæå¤§è®¾ç½®æ°ï¼ |
| | | { |
| | | uint16_t temp; |
| | | for(uint8_t i=0;i<taglist_total_num;i++) |
| | | { |
| | | if(memcmp(&tagid,&taglist_id[i],2)==0) |
| | | { |
| | | taglist_keeptime[i] = TAG_KEEPTIMES; |
| | | return i; |
| | | } |
| | | } |
| | | if(taglist_total_num<MAX_TAG_LIST_NUM) |
| | | temp = AddNewTagIntoList(tagid); |
| | | return temp; |
| | | } |
| | | uint32_t count_index; |
| | | int tt=1; |
| | | int TagRange(void) |
| | | { |
| | | // The following peripherals will be initialized in the uwb_open function |
| | | // phy/mac/aes/lsp/phy timers initialized |
| | | uwb_open(); |
| | | |
| | | // Set calibration parameters |
| | | uwb_calibration_params_set(config.phy_cfg.ch_num); |
| | | |
| | | // set advanced parameters |
| | | struct PHY_ADV_CONFIG_T adv_config = { |
| | | .thres_fap_detect = 40, |
| | | .nth_scale_factor = 4, |
| | | .ranging_performance_mode = 0, |
| | | .skip_weakest_port_en = 0, |
| | | }; |
| | | phy_adv_params_configure(&adv_config); |
| | | |
| | | // uwb configure |
| | | uwb_configure(config.phy_work_mode, board_param.tx_power_fcc[CALIB_CH(config.phy_cfg.ch_num)], &config.phy_cfg); |
| | | |
| | | ranging_frame_type_set(config.phy_cfg.sts_pkt_cfg); |
| | | |
| | | // Register rx interrupt callback function |
| | | mac_register_process_handler(tx_int_callback, rx_int_callback); |
| | | |
| | | //#if LOW_POWER_EN |
| | | // // Initialize low power mode |
| | | // power_init(); |
| | | // // Enable sleep timer |
| | | // sleep_timer_open(true, SLEEP_TIMER_MODE_ONESHOT, NULL); |
| | | //#endif |
| | | uwb_poll_buffer_construct(); |
| | | temp_tag_num=0;//ä¸´æ¶æ°é为0 |
| | | poll_tx_en_start_u32 = phy_timer_count_get()+US_TO_PHY_TIMER_COUNT(POLL_DELAY);//åéå¿
é¡»è¦å»¶æ¶åéæå¯ä»¥ç¨äºæµè·å¦åç«å³åéä¼è·åæ¶é´æ³ä¸å¯¹ï¼éè¦è®¡ç®ç¨åºè¿è¡æ¶é´ï¼é¿å
设置è¿å»æ¶é´ |
| | | tempflag=uwb_tx(uwb_sendbuffer,13+4*nearbase_num,1,poll_tx_en_start_u32);//ç«å³åé |
| | | #ifdef BOXING |
| | | gpio_pin_set(IO_PIN_5);//æµè¯ |
| | | #endif |
| | | //LOG_INFO(TRACE_MODULE_APP, "è¿å
¥æµè·",poll_tx_num,resp_rx_num,distance); |
| | | poll_tx_ts_i64 = ranging_tx_time_correct(poll_tx_en_start_u32 + phy_shr_duration());//ä¿®æ£æ¶é´æ³ |
| | | temp_count1=phy_timer_count_get(); |
| | | while(mac_is_busy());//çå¾
åé宿 |
| | | gpio_pin_clr(IO_PIN_5);//æµè¯ |
| | | gpio_pin_set(IO_PIN_5);//æµè¯ |
| | | temp_count2=phy_timer_count_get(); |
| | | resp_rx_en_start_u32 = poll_tx_en_start_u32+ US_TO_PHY_TIMER_COUNT(POLL_TX_TO_RESP_RX_DLY_US);//设置åéå¤å°såæ¥æ¶ætargetç¬ç«æ¶é´èµ·ç¹ç®+ US_TO_PHY_TIMER_COUNT(POLL_TX_TO_RESP_RX_DLY_US为åéåè¦å¤ä¹
å¼å¯æ¥æ¶æ¶é´ |
| | | temp_resp=resp_rx_en_start_u32; |
| | | //tempflag=uwb_rx(1, resp_rx_en_start_u32, RESP_RX_TIMEOUT_US);//å¼å¯æ¥åå¹¶è®¾ç½®æ¥æ¶è¶
æ¶ |
| | | tempflag=uwb_rx(0,0, RESP_RX_TIMEOUT_US); |
| | | |
| | | |
| | | start_receive_count=phy_timer_count_get(); |
| | | poll_timeout=nearbase_num*US_TO_PHY_TIMER_COUNT(DELAY_BETWEEN_TWO_FRAME_UUS)+US_TO_PHY_TIMER_COUNT(RESP_RX_TIMEOUT_US);//å¤ä¸ä¸ªå¤0.4msé»è®¤0.4ms计ç®ä¸º0.125*4*100000,é»è®¤å¼å¯1mss |
| | | end_receive_count=start_receive_count+poll_timeout; |
| | | |
| | | if(end_receive_count>=UINT32_MAX) |
| | | {end_receive_count-=UINT32_MAX;} |
| | | current_count=phy_timer_count_get(); |
| | | count_index=end_receive_count+HALF_SECOND_TIME; |
| | | // if(tt){ |
| | | while(current_count<end_receive_count||current_count>end_receive_count+HALF_SECOND_TIME)//å¾ªç¯æ¥åå
ä½,è¥ä¸º124.8K忝+62400000 |
| | | { |
| | | |
| | | current_count=phy_timer_count_get();//䏿巿°å½å计æ°å¨å¼ |
| | | temp_count2=phy_timer_count_get(); |
| | | while(mac_is_busy());//çå¾
æ¥æ¶å®æ |
| | | temp_count3=phy_timer_count_get(); |
| | | if(receive_flag==1)//æåæ¥æ¶æ°æ® |
| | | { |
| | | receive_flag=0; |
| | | tempflag=uwb_rx(0, 0, RESP_RX_TIMEOUT_US);//ç«å³å¼å¯æ¥å并设置0è¶
æ¶ |
| | | //æ¥æ¶æåå夿æ¯å¦ä¸ºåä¸ç» |
| | | if (rx_buf[MESSAGE_TYPE_IDX] == MBX_RESPONSE&&!memcmp(&rx_buf[TAG_ID_IDX],&dev_id,2)&&rx_buf[GROUP_ID_IDX]==group_id) //å¤ææ¥æ¶å°çæ°æ®æ¯å¦æ¯responseæ°æ® |
| | | { |
| | | memcpy(&rec_nearbaseid,&rx_buf[ANCHOR_ID_IDX],2); |
| | | rec_nearbasepos=FindNearBasePos(rec_nearbaseid); |
| | | SetANCTimestap(rec_nearbasepos,&rx_buf[RESP_MSG_POLL_RX_TS_IDX],&rx_buf[RESP_MSG_RESP_TX_TS_IDX],(uint32_t)resp_rx_ts_i64,&rx_buf[RESP_MSG_ANC_DISTOFFSET],test2,(uint32_t)poll_tx_ts_i64); |
| | | if(rec_nearbasepos>=nearbase_num) //åç°æ°çåºç« |
| | | { |
| | | //get_newbase=1; |
| | | nearbase_num++; |
| | | nearbaseid_list[rec_nearbasepos] = rec_nearbaseid; |
| | | } |
| | | exsistbase_list[rec_nearbasepos]=KEEP_TIMES;//æ´æ°åæ´»æ¶é´ |
| | | |
| | | memset(rx_buf, 0, sizeof(rx_buf));//æ¸
ç©ºæ¥æ¶å°çç¨å®çæ°ç» |
| | | rx_length=0;//æ¸
0é¿åº¦ |
| | | // uwb_rx(0, 0, RESP_RX_TIMEOUT_US);//ç«å³å¼å¯æ¥å并设置0è¶
æ¶ |
| | | // while(mac_is_busy()); |
| | | //break;//æåæ¥æ¶å°±éåº |
| | | |
| | | } |
| | | |
| | | // #ifdef BOXING |
| | | // gpio_pin_clr(IO_PIN_5);//æµè¯ |
| | | // #endif |
| | | }else if(receive_flag==2){//æ¥æ¶åºé |
| | | receive_flag=0; |
| | | tempflag=uwb_rx(0, 0, RESP_RX_TIMEOUT_US);//ç«å³å¼å¯æ¥å并设置0è¶
æ¶ |
| | | temp_count3=phy_timer_count_get(); |
| | | // while(mac_is_busy()); |
| | | temp_count1=phy_timer_count_get(); |
| | | } |
| | | #ifdef BOXING |
| | | gpio_pin_clr(IO_PIN_5);//æµè¯ |
| | | gpio_pin_set(IO_PIN_5);//æµè¯ |
| | | #endif |
| | | } |
| | | // } |
| | | #ifdef BOXING |
| | | gpio_pin_clr(IO_PIN_5);//æµè¯ |
| | | #endif |
| | | delay_us(1); |
| | | uwb_rx_force_off(1); |
| | | //dwt_forecetrxoff(); |
| | | CalculateDists(poll_tx_ts_i64); //计ç®è·ç¦»å¹¶æ´æ°è·ç¦»è¡¨ |
| | | AnchorListUpdate();//æ´æ°åæ´»åºç«å表 |
| | | // Rank_ANchor_list_by_dis();//åæ³¡æåºéæ°æè·ç¦»éæ°æååºç«å表æå°è·ç¦»åè´§åºç«æ¾å°æåé¢ |
| | | } |
| | | #endif |
| | |
| | | //#include "pan_param.h" |
| | | //#include "pan_rf.h" |
| | | #include "lora_3029.h" |
| | | #include "pan_rf.h" |
| | | #include "PCA9555.h" |
| | | #define DEBUG_MODE |
| | | extern int simple_main(void); |
| | | extern int temp_main(void); |
| | |
| | | nomove_count++; |
| | | } |
| | | uint8_t flag_sleeptimer,flag_secondtask,secondtask_count; |
| | | uint8_t lora_wg_up=0; |
| | | extern uint8_t lora_tx_flag; |
| | | static void sleep_timer_callback(void *dev, uint32_t time) |
| | | { |
| | | g_start_send_flag=1; |
| | | // #ifdef DEBUG_BOXING |
| | | //// gpio_pin_clr(IO_PIN_5);//æµè¯ |
| | | // gpio_pin_set(IO_PIN_5);//æµè¯ |
| | | // lora_wg_up=1; |
| | | lora_tx_flag++; |
| | | // IO_control_init(); |
| | | // UWBPoll(); |
| | | // |
| | |
| | | uint32_t successful_cnt=0; |
| | | uint8_t flag_4guart_needinit=0; |
| | | #define TX_LEN 10 |
| | | #define RX_LEN 100 |
| | | #define RX_LEN 200 |
| | | uint8_t tx_test_buf[TX_LEN] = {0, 1, 2, 3, 4, 5, 6, 7, 8, 9}; |
| | | uint8_t RF_RX_temp[RX_LEN]={0}; |
| | | extern uint8_t RX_Buffer[RX_LEN]; |
| | | extern uint16_t BufferSize; |
| | | static uint16_t source_id; |
| | | extern struct RxDoneMsg RxDoneParams; |
| | | uint32_t time_flag_lorarx=0; |
| | | uint32_t lora_huanxing_count=0; |
| | | static void Lora_irq_handler(enum IO_PIN_T pin) |
| | | { |
| | | ceshi++; |
| | | |
| | | rf_irq_process(); |
| | | //g_start_send_flag=1; |
| | | if(rf_get_transmit_flag() == RADIO_FLAG_TXDONE) |
| | | { |
| | | rf_set_transmit_flag(RADIO_FLAG_IDLE); |
| | | rf_enter_continous_rx(); |
| | | } |
| | | |
| | | |
| | | if(rf_get_recv_flag() == RADIO_FLAG_RXDONE) |
| | | { |
| | | rf_set_recv_flag(RADIO_FLAG_IDLE); |
| | | uint16_t Lora_wangguanid=0; |
| | | extern uint16_t wg_report_freq,wg_report_id; |
| | | extern uint32_t wg_lost_count; |
| | | wg_state_enum wg_state = WG_Lost; |
| | | extern uint16_t current_count; |
| | | extern uint8_t rec_index,rec_secdelay; |
| | | extern uint8_t yuyin_no_sleep_flag,no_rx_flag; |
| | | uint16_t wangguan_up_id; |
| | | uint8_t LoraUp_flag; |
| | | uint8_t imu_enable,motor_enable; |
| | | extern uint8_t shengji_flag; |
| | | uint16_t rec_wenjian_daxiao; |
| | | uint16_t recnum[3]; |
| | | uint16_t recv_flag=0; |
| | | uint16_t tx_flag=0; |
| | | uint16_t CRC16=0; |
| | | uint16_t DEST_ID=0; |
| | | uint16_t rec_value,rec_delaytime,rx_count,datalen_offset; |
| | | |
| | | // memcpy(RF_RX_temp,RxDoneParams.Payload,RxDoneParams.Size); |
| | | // //OnRxDone(); |
| | | // if(RF_RX_temp[0]==0x04&&RF_RX_temp[1]=='I'&&RF_RX_temp[2]=='N'&&RF_RX_temp[3]=='G') |
| | | // { |
| | | lora_huanxing_count++; |
| | | time_flag_lorarx=phy_timer_count_get(); |
| | | |
| | | //LORA_REV_uwb_up=1; |
| | | UwbRange(); |
| | | |
| | | // } |
| | | rf_enter_continous_rx(); //éæ°è¿å
¥æ¥æ¶æ¨¡å¼ |
| | | // gpio_pin_set(IO_PIN_5);//æµè¯ |
| | | gpio_pin_clr(IO_PIN_5); |
| | | //UwbRange(); |
| | | // DDL_Printf("Rx : SNR: %f ,RSSI: %d \r\n", RxDoneParams.Snr, RxDoneParams.Rssi); |
| | | //int i=0; |
| | | // for(i = 0; i < RxDoneParams.Size; i++) |
| | | // { |
| | | // printf("0x%02x ", RxDoneParams.Payload[i]); |
| | | // } |
| | | // error_cnt ++; |
| | | } |
| | | if((rf_get_recv_flag() == RADIO_FLAG_RXTIMEOUT) || (rf_get_recv_flag() == RADIO_FLAG_RXERR)) |
| | | // |
| | | uint16_t Loratx_flag=0; |
| | | uint16_t Lorarx_flag=0; |
| | | uint16_t Lorarx_time_out_flag=0; |
| | | static void Lora_irq_handler(enum IO_PIN_T pin) |
| | | { |
| | | uint16_t checksum1; |
| | | rf_irq_process(); |
| | | //è¿éæ ¹æ®SDKçé£ä¸ªé»è¾ ç¨ä½ çæ¥å£çç |
| | | tx_flag=rf_get_transmit_flag(); |
| | | recv_flag=rf_get_recv_flag(); |
| | | if(recv_flag == RADIO_FLAG_RXDONE) |
| | | { |
| | | rf_set_recv_flag(RADIO_FLAG_IDLE); |
| | | rf_set_recv_flag(RADIO_FLAG_IDLE); |
| | | |
| | | memcpy(RX_Buffer,RxDoneParams.Payload,RxDoneParams.Size); |
| | | BufferSize=RxDoneParams.Size; |
| | | lora_huanxing_count++; |
| | | if(RX_Buffer[0]==0x04&&RX_Buffer[1]=='I'&&RX_Buffer[2]=='N'&&RX_Buffer[3]=='G') |
| | | { |
| | | |
| | | time_flag_lorarx=phy_timer_count_get(); |
| | | UwbRange(); |
| | | //rf_enter_continous_rx(); //éæ°è¿å
¥æ¥æ¶æ¨¡å¼ |
| | | //LORA_REV_uwb_up=1; |
| | | } |
| | | if(RX_Buffer[MSG_TYPE_IDX]==LORA_MSGTYPE_WGRESPTAG) |
| | | { |
| | | checksum1=Checksum_u16(RX_Buffer,BufferSize-2); |
| | | |
| | | memcpy(&DEST_ID,&RX_Buffer[DEST_ID_IDX],2); |
| | | memcpy(&CRC16,&RX_Buffer[BufferSize-2],2); |
| | | if(!memcmp(&checksum1,&RX_Buffer[BufferSize-2],2)) |
| | | if(!memcmp(&dev_id,&RX_Buffer[DEST_ID_IDX],2)) |
| | | { |
| | | memcpy(&source_id,&RX_Buffer[SOURCE_ID_IDX],2); |
| | | if(wg_state==WG_Lost) |
| | | { |
| | | wg_state = WG_Connected; |
| | | wg_report_id = source_id; |
| | | } |
| | | if(!memcmp(&wg_report_id,&RX_Buffer[SOURCE_ID_IDX],2)) |
| | | { |
| | | wg_lost_count = 0; |
| | | switch(RX_Buffer[PWTAG_RW_FLAG_IDX]) |
| | | { |
| | | case WGRSP_RWTAG_NONE: |
| | | // current_count = HAL_LPTIM_ReadCounter(&hlptim1); |
| | | // wg_report_freq = RX_Buffer[POLL_FREQ_IDX]+400; |
| | | // memcpy(&rec_delaytime,&RX_Buffer[NEXTPOLL_TIME_IDX],2); |
| | | // if(report_ancnum<2) |
| | | // { |
| | | // datalen_offset = report_ancnum*85; |
| | | // }else{ |
| | | // datalen_offset = (report_ancnum-1)*46+85; |
| | | // } |
| | | // rec_secdelay = RX_Buffer[PWTAG_SECDELAY_IDX]; |
| | | // if(BufferSize!=13||rec_secdelay>20) |
| | | // { |
| | | // rec_secdelay = 0; |
| | | // } |
| | | // |
| | | // target_count = current_count + rec_delaytime*3.2768 - delaytime-datalen_offset; |
| | | // while(target_count>=32768) |
| | | // target_count-=32768; |
| | | // __HAL_LPTIM_COMPARE_SET(&hlptim1, target_count); |
| | | // rx_count = HAL_LPTIM_ReadCounter(&hlptim1); |
| | | // printf("tx %d,rx %d,delay %d",current_count>>5,rx_count>>5,rec_delaytime); |
| | | break; |
| | | case WGRSP_RWTAG_READ: |
| | | no_rx_flag = 1; |
| | | LoraSendComMap(WGRSP_RWTAG_READ); |
| | | break; |
| | | case WGRSP_RWTAG_WRITE: |
| | | rec_index = RX_Buffer[PWTAG_WRITE_IDX_IDX]; |
| | | switch(rec_index) |
| | | { |
| | | case 0xdd: //è¯é³ä¸å |
| | | break; |
| | | // case 0x20: //è鸣 |
| | | // memcpy(&rec_value,&RX_Buffer[PWTAG_WRITE_VALUE_IDX],2); |
| | | // motor_keeptime = rec_value; |
| | | // break; |
| | | default : |
| | | memcpy(&rec_value,&RX_Buffer[PWTAG_WRITE_VALUE_IDX],2); |
| | | g_com_map[rec_index/2] = rec_value; |
| | | save_com_map_to_flash(); |
| | | LoraRspWriteCommap(SUBMSG_WRITE_ANCPARA); |
| | | //flag_writepara_needreset = 1; |
| | | no_rx_flag = 1; |
| | | } |
| | | |
| | | break; |
| | | case WGRSP_RWTAG_UPDATE: |
| | | rec_index = RX_Buffer[PWTAG_WRITE_IDX_IDX]; |
| | | switch(rec_index) |
| | | { |
| | | case 0xaa: //å级ä¸å |
| | | memcpy(&rec_wenjian_daxiao,&RX_Buffer[WRITEPARA_VALUE_IDX],2);//æä»¶å¤§å° |
| | | if(rec_wenjian_daxiao>0XAC00||rec_wenjian_daxiao==0) |
| | | {}//æä»¶è¿å¤§ï¼è¶
åºèå´ |
| | | else |
| | | { |
| | | memcpy(&wangguan_up_id,&RX_Buffer[SOURCE_ID_IDX],2);//ç½å
³ID å ç¨2个åè |
| | | shengji_flag=1; |
| | | LoraUp_flag=1; |
| | | imu_enable=0; |
| | | } |
| | | // LoraUp_Poll(); |
| | | break; |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | } |
| | | if(tx_flag == RADIO_FLAG_TXDONE) |
| | | { |
| | | //rf_set_mode(RF_MODE_STB3); |
| | | rf_set_transmit_flag(RADIO_FLAG_IDLE); |
| | | Loratx_flag++; |
| | | |
| | | // #ifdef DEBUG_BOXING |
| | | // //gpio_pin_clr(IO_PIN_5);//æµè¯ |
| | | // gpio_pin_set(IO_PIN_5);//æµè¯ |
| | | // #endif |
| | | rf_enter_single_timeout_rx(100); |
| | | // rf_enter_single_rx(); |
| | | // rf_enter_continous_rx(); |
| | | |
| | | } |
| | | if((recv_flag == RADIO_FLAG_RXTIMEOUT)) |
| | | { |
| | | // #ifdef DEBUG_BOXING |
| | | // gpio_pin_clr(IO_PIN_5);//æµè¯ |
| | | // // gpio_pin_set(IO_PIN_5);//æµè¯ |
| | | // #endif |
| | | |
| | | //è¿ä¸ªè¶
æ¶æ¥æ¶æ¯ä¼èªå¨éå¯çï¼æä»¥å¿
é¡»å°è¯çç¶æç½®æSTB3è¿æ ·å°±éåºäºè¿ç»æ¥æ¶ç¶æ |
| | | rf_set_mode(RF_MODE_STB3); |
| | | //è¿ä¸ªè¶
æ¶æ¥æ¶æ¯ä¼èªå¨éå¯çï¼æä»¥å¿
é¡»å°è¯çç¶æç½®æSTB3è¿æ ·å°±éåºäºè¿ç»æ¥æ¶ç¶æ |
| | | |
| | | Lorarx_time_out_flag++; |
| | | rf_set_recv_flag(RADIO_FLAG_IDLE); |
| | | |
| | | // rf_clr_irq(REG_IRQ_RX_TIMEOUT); |
| | | // rf_enter_single_timeout_rx(100); |
| | | } |
| | | if((recv_flag == RADIO_FLAG_RXERR)) |
| | | { |
| | | rf_set_recv_flag(RADIO_FLAG_IDLE); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | void Board_LORA_NVIC_Init(GPIO_IRQ_HANDLER_T irq_handler) //LORA 䏿é
ç½® |
| | | { |
| | | // io_pin_mux_set(_4G_USART_RX_Pin,IO_FUNC0);//æåå
io å为æ®éGPIO |
| | |
| | | } |
| | | |
| | | uint8_t io14_state; |
| | | |
| | | uint16_t lora_freq=0; |
| | | uint16_t lora_up_count=0; |
| | | uint8_t TXBuffer[8]={0,1,2,3,4,5,6,7}; |
| | | uint8_t test_buf[10]={0,1,1,1,1,1,1,1,1,1}; |
| | | int main(void) |
| | | { |
| | | board_clock_run(); |
| | |
| | | //board_led_init(); |
| | | |
| | | spi_init(); |
| | | //PCA9555_init(); |
| | | Board_LORA_NVIC_Init(Lora_irq_handler); |
| | | Lora_init(); |
| | | rf_set_default_para(DEFAULT_up_FREQ,DEFAULT_up_SF); |
| | | //lora_freq=DEFAULT_up_FREQ+g_com_map[GROUP_ID]; |
| | | // rf_set_default_para(DEFAULT_up_FREQ+g_com_map[GROUP_ID],DEFAULT_up_SF); |
| | | rf_set_default_para(DEFAULT_WG_SET_FREQ,DEFAULT_WG_SET_SF); |
| | | //rf_enter_continous_rx(); |
| | | // rf_enter_continous_rx(); |
| | | // if((rf_single_tx_data(TXBuffer,10,0))!= OK) |
| | | // { |
| | | // |
| | | // } |
| | | //rf_set_default_para(DEFAULT_WG_SET_FREQ,DEFAULT_WG_SET_SF); |
| | | // rf_set_default_para(DEFAULT_up_FREQ,DEFAULT_up_SF); |
| | | // |
| | | rf_enter_continous_rx(); |
| | | //rf_enter_continous_tx(); |
| | | // rf_set_transmit_flag(RADIO_FLAG_TXDONE); |
| | | // rf_set_transmit_flag(RADIO_FLAG_TXDONE); |
| | | // if(rf_continous_tx_send_data(tx_test_buf, TX_LEN) != 0) |
| | |
| | | ////å é度计åå§åå¿
é¡»å¨IO_control_initä¹åå 为å¤ç¨SDAå¼è |
| | | // adc_get(&sample[0], NUM_SAMPLES, adc_callback);//adcéæ · |
| | | Program_Init(); |
| | | |
| | | |
| | | // rf_single_tx_data(TXBuffer,10,2); |
| | | // uart_receive(UART_ID1,m_EUART_DMA_RXBuf,EUART_RX_BUF_SIZE,uart_receive_callback); |
| | | // |
| | | //// Initialize low power mode |
| | |
| | | // AIR780E_Reset(); //4G模åéå¯ï¼èæ¶1.5ç§,è¿ä¸ªæ¯æ æ³åæ¥çå
³é® |
| | | sleep_timer_open(true, SLEEP_TIMER_MODE_RELOAD, sleep_timer_callback); |
| | | |
| | | // sleep_timer_start(__MS_TO_32K_CNT(1000));//æµè¯ |
| | | sleep_timer_start(__MS_TO_32K_CNT(1000));//æµè¯ |
| | | #ifdef DEBUG_BOXING |
| | | io_pin_mux_set(IO_PIN_5,IO_FUNC0); |
| | | gpio_pin_set_dir(IO_PIN_5,GPIO_DIR_OUT,0); |
| | | io_pull_set(IO_PIN_5,IO_PULL_DOWN,IO_PULL_UP_LEVEL4); |
| | | #endif |
| | | //rf_enter_single_timeout_rx(1000); |
| | | // board_acceleration_detection_init(move_handler); |
| | | //rf_enter_single_timeout_rx(900); |
| | | //rf_enter_single_timeout_rx(500); |
| | | //rf_enter_single_rx(); |
| | | Uwbinit(); |
| | | while (1) |
| | | { |
| | | |
| | | { |
| | | // rf_irq_process(); |
| | | |
| | | //rf_enter_single_rx(); |
| | | |
| | | Lora_Tx_Poll(); |
| | | // if((rf_single_tx_data(TXBuffer,10,0))!= OK) |
| | | // { |
| | | // |
| | | // } |
| | | // #ifdef DEBUG_BOXING |
| | | // gpio_pin_clr(IO_PIN_5);//æµè¯ |
| | | // gpio_pin_set(IO_PIN_5);//æµè¯ |
| | | |
| | | // test_Delay_us(1000); |
| | | // gpio_pin_set(IO_PIN_5);//æµè¯ |
| | | // test_Delay_us(1000); |
| | | // test_Delay_us(100000); |
| | | // test_Delay_us(100000); |
| | | // test_Delay_us(100000); |
| | | // gpio_pin_clr(IO_PIN_5);//æµè¯ |
| | | // test_Delay_us(2000); |
| | | // gpio_pin_set(IO_PIN_5);//æµè¯ |
| | |
| | | // UwbRange(); |
| | | // } |
| | | |
| | | // if(g_start_send_flag) |
| | | // { |
| | | // g_start_send_flag=0; |
| | | // // Lora_Report_poll(); |
| | | // // Lora_UploadHeartBeartPoll(); |
| | | // } |
| | | |
| | | |
| | | |
| | | |
| | | // UwbRange(); |
| | | // rf_irq_process(); |
| | |
| | | #include "mk_spi.h" |
| | | #include "global_param.h" |
| | | #include "pan_port.h" |
| | | #include "pan_rf.h" |
| | | //#include "WS2812.h" |
| | | //#include "pan_port.h" |
| | | //#include "pan_param.h" |
| | |
| | | uint32_t ret = 0; |
| | | uint32_t cnt = 0; |
| | | ret=rf_init(); |
| | | set_test_mode1_reg(); |
| | | |
| | | set_test_mode1_reg(); |
| | | if(ret== 1) |
| | | { |
| | | // printf("LORA Init Fail"); |
| | |
| | | // printf("LORA Init OK\r\n"); |
| | | } |
| | | } |
| | | wg_state_enum wg_state = WG_Lost; |
| | | extern wg_state_enum wg_state; |
| | | uint8_t lora_sendbuffer[200]; |
| | | uint8_t seq_num; |
| | | extern uint16_t lora_up_uwb_flag; |
| | |
| | | wg_report_id = DEFAULT_WG_ID; |
| | | wg_report_freq = REPORT_MANGE_CHANNEL_FRQ; //妿䏢失龿¥å°±è¿å
¥WG管çä¿¡éã |
| | | wg_report_sf = REPORT_CHANNEL_SF; |
| | | // wg_report_freq = TEST_MANAGE_CHANNEL_FRQ; |
| | | // wg_report_sf = TEST_MANAGE_CHANNEL_SF; |
| | | } |
| | | } else { |
| | | if(wg_lost_count>WG_LOST_SWITCH_THRES) |
| | |
| | | |
| | | //uint16_t wg_report_freq,wg_report_id; |
| | | uint8_t lora_sendbuffer[200]; |
| | | void Lora_UploadHeartBeartPoll(void) |
| | | void LoraHeartBeartPoll(void) |
| | | { |
| | | |
| | | // lora_up_uwb_flag=2; |
| | | // rf_set_default_para(); |
| | | |
| | | rf_enter_continous_tx(); |
| | | /*****************************å¿è·³å
ä¸ä¼ å
容************************************/ |
| | | lora_sendbuffer[MSG_TYPE_IDX] = LORA_MSGTYPE_TAGHEARTBEAT; |
| | | lora_sendbuffer[MSG_LENGTH] = 14; |
| | |
| | | lora_sendbuffer[HB_UWBPOWER_IDX] = g_com_map[POWER]; |
| | | lora_sendbuffer[HB_LORAPOWER_IDX] = g_com_map[LORA_POWER]; |
| | | checksum = Checksum_u16(lora_sendbuffer,14); |
| | | memcpy(&lora_sendbuffer[14],&checksum,2); |
| | | memcpy(&lora_sendbuffer[14],&checksum,2); |
| | | LORA_3029_SINGLE_SEND(lora_sendbuffer,16,0); |
| | | |
| | | /*****************************å¿è·³å
ä¸ä¼ å
容*************************************/ |
| | | rf_set_transmit_flag(RADIO_FLAG_TXDONE); |
| | | |
| | | if(rf_get_transmit_flag()==RADIO_FLAG_TXDONE) |
| | | { |
| | | if(rf_continous_tx_send_data(lora_sendbuffer, 16)==OK) |
| | | { |
| | | //LOG_INFO(TRACE_MODULE_APP,"设å¤ID: %x .\r\n"); |
| | | } |
| | | while (rf_get_transmit_flag() == RADIO_FLAG_IDLE) |
| | | ; |
| | | //rf_enter_continous_rx();; |
| | | rf_set_transmit_flag(RADIO_FLAG_IDLE); |
| | | } |
| | | |
| | | |
| | | } |
| | | #define HEATBEAT_UPDATE_TIME 3600 |
| | | #define HEATBEAT_UPDATE_TIME 100 |
| | | uint16_t heatbeat_count = HEATBEAT_UPDATE_TIME-1 ; |
| | | uint16_t flag_getwgresp = 0; |
| | | uint16_t test_temp[10]={0x1306,9688,1000}; |
| | | uint16_t test_temp2[10]={0xff,0xcd,0x19}; |
| | | int16_t intheight; //æ°å |
| | | void Lora_Report_poll(void) |
| | | extern uint16_t recnum[3]; |
| | | void LoraReportPoll(void) |
| | | { |
| | | LoraReportFreqPoll(); |
| | | flag_getwgresp = 0; //ç½å
³å夿 å¿ä½ && WG_Connected == wg_state |
| | | uint32_t ret = 0; |
| | | ret = rf_init(); |
| | | |
| | | set_test_mode1_reg(); |
| | | if(ret==OK) |
| | | { |
| | | rf_set_default_para(wg_report_freq*1000000,wg_report_sf); |
| | | } |
| | | // |
| | | // |
| | | if(heatbeat_count++>HEATBEAT_UPDATE_TIME) //妿å¿è·³å
å°è¾¾ä¸ä¼ æ¶é´ï¼å¹¶ä¸ç½å
³å¤äºé¾æ¥ç¶æï¼å°±ä¸ä¼ å¿è·³å
|
| | | { |
| | | heatbeat_count = 0; |
| | | Lora_UploadHeartBeartPoll(); |
| | | //rf_irq_process(); |
| | | return; |
| | | } |
| | | for(uint16_t i=0; i<report_ancnum-1; i++) |
| | | { |
| | | // delay_ms(100); |
| | | #ifdef _USE_BAR |
| | | GetPressAndHeight(); |
| | | intheight = Height*100; |
| | | #endif |
| | | #ifdef _SMT_TEST |
| | | printf("æ°åå¼ï¼%d",intheight); |
| | | #endif |
| | | |
| | | TagListUpdate(); |
| | | |
| | | LoraReportFreqPoll(); |
| | | flag_getwgresp = 0; |
| | | // wg_report_freq = REPORT_MANGE_CHANNEL_FRQ; |
| | | rf_set_default_para(wg_report_freq,REPORT_CHANNEL_SF); |
| | | // SwitchLoraSettings(wg_report_freq,REPORT_CHANNEL_SF,g_com_map[LORA_POWER]); |
| | | if(heatbeat_count++>HEATBEAT_UPDATE_TIME && WG_Connected == wg_state) //妿å¿è·³å
å°è¾¾ä¸ä¼ æ¶é´ï¼å¹¶ä¸ç½å
³å¤äºé¾æ¥ç¶æï¼å°±ä¸ä¼ å¿è·³å
|
| | | { |
| | | heatbeat_count = 0; |
| | | LoraHeartBeartPoll(); |
| | | return; |
| | | } |
| | | for(uint16_t i=0; i<report_ancnum-1; i++) |
| | | { |
| | | for(uint16_t j=0; j<report_ancnum-1-i; j++) |
| | | { |
| | | if(report_ancdist[j]>report_ancdist[j+1]) |
| | |
| | | report_ancdist[j+1] = dist; |
| | | } |
| | | } |
| | | } |
| | | if(report_ancnum>0) |
| | | { |
| | | //uwbled=0x11; //blue |
| | | } |
| | | else |
| | | { |
| | | //uwbled=0x1100; //red |
| | | } |
| | | if(report_ancnum>LORA_REPORT_MAXANC_NUM) //èèloraä¼ è¾æ¶é´ï¼æå¤åé10个åºç«æ°æ®ã |
| | | report_ancnum = LORA_REPORT_MAXANC_NUM; |
| | | |
| | | } |
| | | |
| | | if(report_ancnum>LORA_REPORT_MAXANC_NUM) //èèloraä¼ è¾æ¶é´ï¼æå¤åé10个åºç«æ°æ®ã |
| | | report_ancnum = LORA_REPORT_MAXANC_NUM; |
| | | #ifdef USE_GPS |
| | | lora_sendbuffer[MSG_TYPE_IDX] = LORA_MSGTYPE_TAGMSGTOWG_GPS; |
| | | lora_sendbuffer[MSG_LENGTH] = 4*report_ancnum+ANCID_IDX; |
| | | lora_sendbuffer[MSG_LENGTH] = 4*report_ancnum+30; |
| | | #else |
| | | lora_sendbuffer[MSG_TYPE_IDX] = LORA_MSGTYPE_TAGMSGTOWG; |
| | | lora_sendbuffer[MSG_LENGTH] = 4*report_ancnum+ANCID_IDX; |
| | | #endif |
| | | |
| | | // 2000f026 02020002 //000220200 |
| | | memcpy(&lora_sendbuffer[SOURCE_ID_IDX],&g_com_map[DEV_ID],2); |
| | | memcpy(&lora_sendbuffer[DEST_ID_IDX],&wg_report_id,2); |
| | | lora_sendbuffer[SEQNUM_IDX] = seq_num++; |
| | | lora_sendbuffer[BAT_IDX] = bat_percent; |
| | | //GET_USERKEYè¿ä¸ªæ¯é£ä¸ªloraââbusyé£ä¸ªå¼è |
| | | |
| | | // lora_sendbuffer[STATE_IDX] = !GET_USERKEY|stationary_flag<<1; |
| | | #ifdef USE_GPS |
| | | memcpy(&lora_sendbuffer[GPS_JINGDU_IDX],&gps_jingdu,8); |
| | | memcpy(&lora_sendbuffer[GPS_WEIDU_IDX],&gps_weidu,8); |
| | | memcpy(&lora_sendbuffer[GPS_WEIDU_IDX],&gps_jingdu,8); |
| | | memcpy(&lora_sendbuffer[GPS_HEIGHT_IDX],&gps_height,8); |
| | | lora_sendbuffer[GPS_STATE_IDX] = gps_state; |
| | | lora_sendbuffer[GPS_SATEL_NUM_IDX] = gps_satel_num; |
| | | lora_sendbuffer[GPS_SPOWER_IDX] = gps_signalpower; |
| | | lora_sendbuffer[GPS_CHAFENLINGQI] = gps_chafenlingqi; |
| | | #endif |
| | | |
| | | memcpy(&lora_sendbuffer[BAR_HEIGHT_IDX],&intheight,2); |
| | | // memcpy(&lora_sendbuffer[BAR_HEIGHT_IDX],&bar_height,2); |
| | | memcpy(&report_ancid,test_temp,10); |
| | | memcpy(&report_ancdist,test_temp2,10); |
| | | report_ancnum=3; |
| | | lora_sendbuffer[ANCNUM_IDX] = report_ancnum; |
| | | |
| | | memcpy(&lora_sendbuffer[ANCID_IDX],report_ancid,report_ancnum*2); |
| | | memcpy(&lora_sendbuffer[ANCID_IDX+report_ancnum*2],report_ancdist,report_ancnum*2); |
| | | |
| | | checksum = Checksum_u16(lora_sendbuffer,4*report_ancnum+ANCID_IDX); |
| | | memcpy(&lora_sendbuffer[ANCID_IDX+report_ancnum*4],&checksum,2); |
| | | rf_enter_continous_tx(); |
| | | //rf_irq_process(); |
| | | rf_set_transmit_flag(RADIO_FLAG_TXDONE); |
| | | |
| | | if(rf_get_transmit_flag()==RADIO_FLAG_TXDONE) |
| | | { |
| | | if(rf_continous_tx_send_data(lora_sendbuffer,ANCID_IDX+report_ancnum*4+2)==OK) |
| | | { |
| | | //LOG_INFO(TRACE_MODULE_APP,"设å¤ID: %x .\r\n"); |
| | | } |
| | | while (rf_get_transmit_flag() == RADIO_FLAG_IDLE) |
| | | ; |
| | | //rf_enter_continous_rx();; |
| | | rf_set_transmit_flag(RADIO_FLAG_IDLE); |
| | | |
| | | } |
| | | // rf_enter_continous_rx(); |
| | | |
| | | //rf_enter_continous_tx(); |
| | | // LORA_3029_SEND(lora_sendbuffer,ANCID_IDX+report_ancnum*4+2); |
| | | LORA_3029_SINGLE_SEND(lora_sendbuffer,ANCID_IDX+report_ancnum*4+2,0); |
| | | |
| | | // rf_single_tx_data(lora_sendbuffer,ANCID_IDX+report_ancnum*4+2,2); |
| | | //rf_enter_continous_rx(); |
| | | |
| | | //LED_TB_ON; |
| | | // bat_percent=Get_Battary(); |
| | | |
| | | for(uint8_t i=0;i<3;i++) |
| | | recnum[i] = 0; |
| | | |
| | | } |
| | | extern uint8_t report_ancnum; |
| | | static uint16_t delaytime = 1200; |
| | | static uint16_t source_id; |
| | | uint8_t rec_index,rec_secdelay; |
| | | uint16_t rec_value,rec_delaytime,rx_count; |
| | | uint16_t rec_value,rec_delaytime,rx_count,datalen_offset; |
| | | //uint16_t rec_value,rec_delaytime,rx_count; |
| | | //uint16_t rec_value,rec_delaytime,rx_count,datalen_offset; |
| | | int32_t target_count; |
| | | uint8_t shengji_flag,time=5; |
| | | extern uint32_t uwbled,gpsled,loraled,powerled; |
| | | extern struct RxDoneMsg RxDoneParams; |
| | | void OnRxDone( uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr ) |
| | | { uint16_t checksum1; |
| | | BufferSize = size; |
| | | memcpy(RX_Buffer,RxDoneParams.Payload,RxDoneParams.Size); |
| | | // memcpy( RX_Buffer, payload, BufferSize ); |
| | | RssiValue = rssi; |
| | | SnrValue = snr; |
| | | //Radio.Standby(); |
| | | no_rx_flag = 0; |
| | | lora_up_rec_flag=1; |
| | | // if(RX_Buffer[MSG_TYPE_IDX]==LORA_MSGTYPE_RANGEPOLL) |
| | | //void OnRxDone( uint8_t *payload, uint16_t size, int16_t rssi, int8_t snr ) |
| | | //{ uint16_t checksum1; |
| | | // BufferSize = size; |
| | | // memcpy(RX_Buffer,RxDoneParams.Payload,RxDoneParams.Size); |
| | | // // memcpy( RX_Buffer, payload, BufferSize ); |
| | | // RssiValue = rssi; |
| | | // SnrValue = snr; |
| | | // //Radio.Standby(); |
| | | // no_rx_flag = 0; |
| | | // lora_up_rec_flag=1; |
| | | //// if(RX_Buffer[MSG_TYPE_IDX]==LORA_MSGTYPE_RANGEPOLL) |
| | | //// { |
| | | //// UwbRange(); |
| | | //// rf_delay_us(time*1000); |
| | | //// // UWB_RXStart(10); |
| | | //// // delay_ms(time); |
| | | //// } |
| | | // if(RX_Buffer[MSG_TYPE_IDX]==LORA_MSGTYPE_WGRESPTAG) |
| | | // { |
| | | // UwbRange(); |
| | | // rf_delay_us(time*1000); |
| | | // // UWB_RXStart(10); |
| | | // // delay_ms(time); |
| | | // } |
| | | if(RX_Buffer[MSG_TYPE_IDX]==LORA_MSGTYPE_WGRESPTAG) |
| | | { |
| | | checksum1=Checksum_u16(RX_Buffer,BufferSize-2); |
| | | if(!memcmp(&checksum1,&RX_Buffer[BufferSize-2],2)) |
| | | if(!memcmp(&dev_id,&RX_Buffer[DEST_ID_IDX],2)) |
| | | { |
| | | memcpy(&source_id,&RX_Buffer[SOURCE_ID_IDX],2); |
| | | if(wg_state==WG_Lost) |
| | | { |
| | | wg_state = WG_Connected; |
| | | wg_report_id = source_id; |
| | | } |
| | | if(!memcmp(&wg_report_id,&RX_Buffer[SOURCE_ID_IDX],2)) |
| | | { |
| | | wg_lost_count = 0; |
| | | // loraled=GREEN; |
| | | switch(RX_Buffer[PWTAG_RW_FLAG_IDX]) |
| | | { |
| | | case WGRSP_RWTAG_NONE: |
| | | // current_count = HAL_LPTIM_ReadCounter(&hlptim1); |
| | | wg_report_freq = RX_Buffer[POLL_FREQ_IDX]+400; |
| | | memcpy(&rec_delaytime,&RX_Buffer[NEXTPOLL_TIME_IDX],2); |
| | | rec_secdelay = RX_Buffer[PWTAG_SECDELAY_IDX]; |
| | | if(BufferSize!=13||rec_secdelay>20) |
| | | { |
| | | rec_secdelay = 0; |
| | | } |
| | | |
| | | if(report_ancnum<2) |
| | | { |
| | | datalen_offset = report_ancnum*85; |
| | | }else{ |
| | | datalen_offset = (report_ancnum-1)*46+85; |
| | | } |
| | | |
| | | target_count = current_count + rec_delaytime*3.2768 - delaytime-datalen_offset; |
| | | while(target_count>=32768) |
| | | target_count-=32768; |
| | | // __HAL_LPTIM_COMPARE_SET(&hlptim1, target_count); |
| | | // rx_count = HAL_LPTIM_ReadCounter(&hlptim1); |
| | | // printf("tx %d,rx %d,delay %d",current_count>>5,rx_count>>5,rec_delaytime); |
| | | break; |
| | | case WGRSP_RWTAG_READ: |
| | | no_rx_flag = 1; |
| | | //LoraSendComMap(WGRSP_RWTAG_READ); |
| | | break; |
| | | case WGRSP_RWTAG_WRITE: |
| | | rec_index = RX_Buffer[PWTAG_WRITE_IDX_IDX]; |
| | | if(rec_index<=DEV_ID) |
| | | return; |
| | | if(rec_index==0xDD) |
| | | { |
| | | // if(usart5_state==1) |
| | | // { |
| | | // Usart5Init(); |
| | | // usart5_state=0; |
| | | // } |
| | | // HAL_GPIO_WritePin(GPIOC, GPIO_PIN_7, GPIO_PIN_SET); |
| | | // HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_SET); |
| | | // memcpy(&xiafayuyin_data,&RX_Buffer[PWTAG_WRITE_VALUE_IDX],BufferSize-PWTAG_WRITE_VALUE_IDX-2); |
| | | // yuyin_sendflag=1; |
| | | // yuyinzidongguan_time=0; |
| | | // yuyin_no_sleep_flag=1; |
| | | // SYN_FrameInfo(0,xiafayuyin_data); //ææ¾å
容 |
| | | // memset(xiafayuyin_data,0,sizeof(xiafayuyin_data)); |
| | | // LoraRspWriteCommap(SUBMSG_WRITE_ANCPARA); |
| | | no_rx_flag = 1; |
| | | }else{ |
| | | memcpy(&rec_value,&RX_Buffer[PWTAG_WRITE_VALUE_IDX],2); |
| | | g_com_map[rec_index/2] = rec_value; |
| | | save_com_map_to_flash(); |
| | | // LoraRspWriteCommap(SUBMSG_WRITE_ANCPARA); |
| | | // flag_writepara_needreset = 1; |
| | | no_rx_flag = 1; |
| | | } |
| | | break; |
| | | case WGRSP_RWTAG_UPDATE: |
| | | rec_index = RX_Buffer[PWTAG_WRITE_IDX_IDX]; |
| | | switch(rec_index) |
| | | { |
| | | case 0xaa: //å级ä¸å |
| | | // memcpy(&rec_wenjian_daxiao,&RX_Buffer[WRITEPARA_VALUE_IDX],2);//æä»¶å¤§å° |
| | | // if(rec_wenjian_daxiao>APP_SIZE||rec_wenjian_daxiao==0) |
| | | // {}//æä»¶è¿å¤§ï¼è¶
åºèå´ |
| | | // else |
| | | // checksum1=Checksum_u16(RX_Buffer,BufferSize-2); |
| | | // if(!memcmp(&checksum1,&RX_Buffer[BufferSize-2],2)) |
| | | // if(!memcmp(&dev_id,&RX_Buffer[DEST_ID_IDX],2)) |
| | | // { |
| | | // memcpy(&source_id,&RX_Buffer[SOURCE_ID_IDX],2); |
| | | // if(wg_state==WG_Lost) |
| | | // { |
| | | // wg_state = WG_Connected; |
| | | // wg_report_id = source_id; |
| | | // } |
| | | // if(!memcmp(&wg_report_id,&RX_Buffer[SOURCE_ID_IDX],2)) |
| | | // { |
| | | // wg_lost_count = 0; |
| | | // // loraled=GREEN; |
| | | // switch(RX_Buffer[PWTAG_RW_FLAG_IDX]) |
| | | // { |
| | | // case WGRSP_RWTAG_NONE: |
| | | // // current_count = HAL_LPTIM_ReadCounter(&hlptim1); |
| | | // wg_report_freq = RX_Buffer[POLL_FREQ_IDX]+400; |
| | | // memcpy(&rec_delaytime,&RX_Buffer[NEXTPOLL_TIME_IDX],2); |
| | | // rec_secdelay = RX_Buffer[PWTAG_SECDELAY_IDX]; |
| | | // if(BufferSize!=13||rec_secdelay>20) |
| | | // { |
| | | // rec_secdelay = 0; |
| | | // } |
| | | // |
| | | // if(report_ancnum<2) |
| | | // { |
| | | // datalen_offset = report_ancnum*85; |
| | | // }else{ |
| | | // datalen_offset = (report_ancnum-1)*46+85; |
| | | // } |
| | | // |
| | | // target_count = current_count + rec_delaytime*3.2768 - delaytime-datalen_offset; |
| | | // while(target_count>=32768) |
| | | // target_count-=32768; |
| | | //// __HAL_LPTIM_COMPARE_SET(&hlptim1, target_count); |
| | | //// rx_count = HAL_LPTIM_ReadCounter(&hlptim1); |
| | | // // printf("tx %d,rx %d,delay %d",current_count>>5,rx_count>>5,rec_delaytime); |
| | | // break; |
| | | // case WGRSP_RWTAG_READ: |
| | | // no_rx_flag = 1; |
| | | // //LoraSendComMap(WGRSP_RWTAG_READ); |
| | | // break; |
| | | // case WGRSP_RWTAG_WRITE: |
| | | // rec_index = RX_Buffer[PWTAG_WRITE_IDX_IDX]; |
| | | // if(rec_index<=DEV_ID) |
| | | // return; |
| | | // if(rec_index==0xDD) |
| | | // { |
| | | // memcpy(&wangguan_up_id,&RX_Buffer[SOURCE_ID_IDX],2);//ç½å
³ID å ç¨2个åè |
| | | // shengji_flag=1; |
| | | // LoraUp_flag=1; |
| | | //// if(usart5_state==1) |
| | | //// { |
| | | //// Usart5Init(); |
| | | //// usart5_state=0; |
| | | //// } |
| | | //// HAL_GPIO_WritePin(GPIOC, GPIO_PIN_7, GPIO_PIN_SET); |
| | | //// HAL_GPIO_WritePin(GPIOC, GPIO_PIN_13, GPIO_PIN_SET); |
| | | //// memcpy(&xiafayuyin_data,&RX_Buffer[PWTAG_WRITE_VALUE_IDX],BufferSize-PWTAG_WRITE_VALUE_IDX-2); |
| | | //// yuyin_sendflag=1; |
| | | //// yuyinzidongguan_time=0; |
| | | //// yuyin_no_sleep_flag=1; |
| | | //// SYN_FrameInfo(0,xiafayuyin_data); //ææ¾å
容 |
| | | //// memset(xiafayuyin_data,0,sizeof(xiafayuyin_data)); |
| | | // // LoraRspWriteCommap(SUBMSG_WRITE_ANCPARA); |
| | | // no_rx_flag = 1; |
| | | // }else{ |
| | | // memcpy(&rec_value,&RX_Buffer[PWTAG_WRITE_VALUE_IDX],2); |
| | | // g_com_map[rec_index/2] = rec_value; |
| | | // save_com_map_to_flash(); |
| | | // // LoraRspWriteCommap(SUBMSG_WRITE_ANCPARA); |
| | | //// flag_writepara_needreset = 1; |
| | | // no_rx_flag = 1; |
| | | // } |
| | | break; |
| | | } |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | // if(!no_rx_flag&&LoraUp_flag==0) |
| | | // { |
| | | // if(RX_Buffer[MSG_TYPE_IDX]!=LORA_MSGTYPE_RANGEPOLL) |
| | | // SwitchLoraSettings(UWB_CHANNEL_FRQ+g_com_map[GROUP_ID],UWB_CHANNEL_SF,0); |
| | | // Radio.Rx(0); |
| | | // } |
| | | } |
| | | // break; |
| | | // case WGRSP_RWTAG_UPDATE: |
| | | // rec_index = RX_Buffer[PWTAG_WRITE_IDX_IDX]; |
| | | // switch(rec_index) |
| | | // { |
| | | // case 0xaa: //å级ä¸å |
| | | //// memcpy(&rec_wenjian_daxiao,&RX_Buffer[WRITEPARA_VALUE_IDX],2);//æä»¶å¤§å° |
| | | //// if(rec_wenjian_daxiao>APP_SIZE||rec_wenjian_daxiao==0) |
| | | //// {}//æä»¶è¿å¤§ï¼è¶
åºèå´ |
| | | //// else |
| | | //// { |
| | | //// memcpy(&wangguan_up_id,&RX_Buffer[SOURCE_ID_IDX],2);//ç½å
³ID å ç¨2个åè |
| | | //// shengji_flag=1; |
| | | //// LoraUp_flag=1; |
| | | //// } |
| | | // break; |
| | | // } |
| | | // break; |
| | | // } |
| | | // } |
| | | // } |
| | | // } |
| | | //// if(!no_rx_flag&&LoraUp_flag==0) |
| | | //// { |
| | | //// if(RX_Buffer[MSG_TYPE_IDX]!=LORA_MSGTYPE_RANGEPOLL) |
| | | //// SwitchLoraSettings(UWB_CHANNEL_FRQ+g_com_map[GROUP_ID],UWB_CHANNEL_SF,0); |
| | | //// Radio.Rx(0); |
| | | //// } |
| | | //} |
| | | //void LORA_mode_select(void) |
| | | //{ |
| | | // if(TX_RX_SELECT==1) |
| | |
| | | |
| | | |
| | | //} |
| | | //extern uint8_t Lora_tx_ancnum; |
| | | //extern u8 lora_seq_nb2; |
| | | extern uint16_t lora_yingda_num; |
| | | uint8_t lora_tx_flag=0; |
| | | uint8_t lora_txanchor_power_flag; |
| | | extern uint16_t Lora_tx_ancid[50]; |
| | | extern uint16_t Lora_tx_ancdist[50]; |
| | | extern uint8_t Lora_tx_anc_electricity[50]; |
| | | uint8_t lora_seq_nb1; |
| | | |
| | | extern uint8_t lora_sendbuffer[200]; |
| | | void LoraSendComMap(uint8_t cmd) |
| | | { |
| | | uint8_t data_length = 0x50; |
| | | uint16_t checksum = 0; |
| | | lora_sendbuffer[MSG_TYPE_IDX] = LORA_MSGTYPE_READPARARESP; |
| | | lora_sendbuffer[MSG_LENGTH] = data_length+11; |
| | | memcpy(&lora_sendbuffer[SOURCE_ID_IDX],&g_com_map[DEV_ID],2); |
| | | memcpy(&lora_sendbuffer[DEST_ID_IDX],&wg_report_id,2); |
| | | lora_sendbuffer[RP_CMD_IDX] = cmd; |
| | | lora_sendbuffer[RP_INDEX_IDX] = 2; |
| | | lora_sendbuffer[RP_LEN_IDX] = data_length; |
| | | memcpy(&lora_sendbuffer[9], &g_com_map[1], data_length); |
| | | checksum = Checksum_u16(lora_sendbuffer,11+data_length); |
| | | memcpy(&lora_sendbuffer[11+data_length],&checksum,2); |
| | | LORA_3029_SINGLE_SEND(lora_sendbuffer,data_length+13,0); |
| | | // Delay_Ms(100); |
| | | } |
| | | void LoraRspWriteCommap(uint8_t index) |
| | | { |
| | | uint8_t data_length = 2; |
| | | uint16_t checksum = 0; |
| | | lora_sendbuffer[MSG_TYPE_IDX] = LORA_MSGTYPE_READPARARESP; |
| | | lora_sendbuffer[MSG_LENGTH] = data_length+9; |
| | | memcpy(&lora_sendbuffer[SOURCE_ID_IDX],&g_com_map[DEV_ID],2); |
| | | memcpy(&lora_sendbuffer[DEST_ID_IDX],&wg_report_id,2); |
| | | lora_sendbuffer[RP_CMD_IDX] = WGRSP_RWTAG_WRITE; |
| | | lora_sendbuffer[RP_INDEX_IDX] = index; |
| | | lora_sendbuffer[RP_LEN_IDX] = data_length; |
| | | memcpy(&lora_sendbuffer[7], &g_com_map[index/2], data_length); |
| | | checksum = Checksum_u16(lora_sendbuffer,9+data_length); |
| | | memcpy(&lora_sendbuffer[9+data_length],&checksum,2); |
| | | // Radio.Send(lora_sendbuffer,data_length+11); |
| | | LORA_3029_SINGLE_SEND(lora_sendbuffer,data_length+11,0); |
| | | // Delay_Ms(100); |
| | | } |
| | | uint8_t t22[20],ti; |
| | | uint8_t no_yingdaflag; |
| | | uint8_t aRxBuffer[1]; |
| | | |
| | | extern uint8_t group_id; |
| | | uint16_t lora_send_count; |
| | | uint8_t mode_flag=0; |
| | | void Lora_Tx_Poll() |
| | | { |
| | | |
| | | // if(lora_tx_flag) |
| | | // { |
| | | // OnMaster(); |
| | | //// |
| | | // //rf_enter_continous_rx(); |
| | | // } |
| | | if(lora_tx_flag) |
| | | { |
| | | if(lora_send_count++%10==0||lora_jianting_flag) |
| | | { |
| | | lora_tx_flag=0; |
| | | #ifdef GROUPID_SWITCH |
| | | if(rec_secdelay>0) |
| | | { |
| | | rec_secdelay--; |
| | | // if(lora_jianting_flag) |
| | | // { |
| | | // if(++group_id>GROUP_NUM) |
| | | // { |
| | | // group_id = 1; |
| | | // } |
| | | // t22[ti++] = group_id; |
| | | // if(ti>=20) |
| | | // ti=0; |
| | | // group_min_dist[group_id] = 0xffff; |
| | | // Radio.Standby(); |
| | | // SwitchLoraSettings(UWB_CHANNEL_FRQ+group_id,UWB_CHANNEL_SF,0); |
| | | // Radio.Rx(0); |
| | | // } |
| | | return; |
| | | } |
| | | // //æ¾3个å°ç»ä¸æè¿è·ç¦»æå¤§çå°ç»ï¼ä¸ä¼ æ¥æå忢å°è¿ä¸ªå°ç»ï¼å 为ä¸ä¼ æ¥æä¼æ¶é´å ç¨ã |
| | | // if(group_min_dist[1]>group_min_dist[2]) //妿1大äº2 |
| | | // { |
| | | // group_maxdist_index = group_min_dist[1]>group_min_dist[3]?1:3; //å 1å3 æå¤§å¼ |
| | | // group_mindist_index = group_min_dist[2]<group_min_dist[3]?2:3;//å 2å3 æå°å¼ |
| | | // |
| | | // }else{ |
| | | // group_maxdist_index = group_min_dist[2]>group_min_dist[3]?2:3; //å 2å3 æå¤§å¼ |
| | | // group_mindist_index = group_min_dist[1]<group_min_dist[3]?1:3;//å 1å3 æå°å¼ |
| | | // } |
| | | //// group_id = 1; |
| | | // group_id = group_maxdist_index; |
| | | #endif |
| | | t22[ti++] = group_id; |
| | | if(ti>=20) |
| | | ti=0; |
| | | // group_min_dist[group_id] = 0xffff; |
| | | // Radio.Standby(); |
| | | |
| | | //rf_set_default_para(UWB_CHANNEL_FRQ+group_id,UWB_CHANNEL_SF); |
| | | // SwitchLoraSettings(UWB_CHANNEL_FRQ+group_id,UWB_CHANNEL_SF,0); |
| | | //rf_enter_single_timeout_rx(0); |
| | | // rf_enter_continous_rx(); |
| | | //LedTask(); |
| | | //LoraHeartBeartPoll(); |
| | | |
| | | // rf_get_mode(); |
| | | LoraReportPoll(); |
| | | // LedOff_task(); |
| | | |
| | | } |
| | | } |
| | | |
| | | } |
| | | uint8_t TX_RX_SELECT=0; |
| | | //void OnMaster() |
| | | //{ |
| | | // |
| | | // rf_set_default_para(DEFAULT_WG_SET_FREQ,DEFAULT_WG_SET_SF); |
| | | // rf_enter_continous_tx();//send_frame1, 19 |
| | | // // LORA_3029_SEND(send_frame1, 19); |
| | | |
| | | // |
| | | //} |
| | | int LORA_3029_SINGLE_SEND(uint8_t *buffer, uint8_t size,uint8_t time) |
| | | { |
| | | if((rf_single_tx_data(lora_sendbuffer,size,time))!= OK) |
| | | { |
| | | //while(1); |
| | | } |
| | | rf_delay_us(1); |
| | | |
| | | //rf_enter_single_rx(); |
| | | //rf_enter_single_timeout_rx(700); |
| | | } |
| | | |
| | | int LORA_3029_CONTINOUS_SEND(uint8_t *buffer, uint8_t size) |
| | | { |
| | | |
| | | |
| | | } |
| | | // rf_enter_continous_tx(); |
| | | |
| | | |
| | | |
| | | // //rf_set_default_para(DEFAULT_WG_SET_FREQ,DEFAULT_WG_SET_SF); |
| | | // |
| | | // |
| | | // |
| | | // rf_set_transmit_flag(RADIO_FLAG_TXDONE); |
| | | // |
| | | // |
| | | // if(rf_get_transmit_flag() == RADIO_FLAG_TXDONE) |
| | | // { |
| | | // // |
| | | // if(rf_continous_tx_send_data(send_frame1, 20) == OK) |
| | | // { |
| | | // //printf("tx ok!\n"); |
| | | // } |
| | | //// while (rf_get_transmit_flag() ==!RADIO_FLAG_TXDONE) |
| | | //// ; |
| | | // while (rf_get_transmit_flag() ==!RADIO_FLAG_TXDONE) |
| | | // ; |
| | | // |
| | | // } |
| | | // |
| | | |
| | | |
| | | |
| | |
| | | #define __LORA_3029_H |
| | | #include "mk_io.h" |
| | | |
| | | #define LORA_CS IO_PIN_14 |
| | | #define LORA_CS IO_PIN_8 |
| | | #define LORA_MOSI IO_PIN_11 |
| | | #define LORA_MISO IO_PIN_12 |
| | | #define LORA_CLK IO_PIN_13 |
| | | #define LORA_DIO IO_PIN_4 |
| | | #define LORA_DIO IO_PIN_7 |
| | | #define ANC_MAX_NUM 50 |
| | | #define LORA_REPORT_MAXANC_NUM 7 |
| | | //#define TEST_FREQ |
| | |
| | | #define REPORT_CHANNEL_SF 7 |
| | | #else |
| | | #define LORA_UPCHANNEL_FRQ 476 |
| | | #define LORA_UPCHANNEL_SF 7 |
| | | #define LORA_UPCHANNEL_SF 8 |
| | | |
| | | #define UWB_CHANNEL_FRQ 470 |
| | | #define UWB_CHANNEL_SF 5 |
| | |
| | | |
| | | #define LR_DATA_CHANNEL_FRQ 475 |
| | | #define LR_DATA_CHANNEL_SF 9 |
| | | |
| | | //#define TEST_MANAGE_CHANNEL_FRQ 457 |
| | | //#define TEST_MANAGE_CHANNEL_SF 5 |
| | | |
| | | #endif |
| | | |
| | | //LORA æ°æ®æ ¼å¼ |
| | |
| | | WG_Connected,// 䏿¥ä¸ åç½å
³é讯æ£å¸¸ |
| | | }wg_state_enum; |
| | | |
| | | void Lora_UploadHeartBeartPoll(void); |
| | | void LoraHeartBeartPoll(void); |
| | | void Lora_Tx_Poll(); |
| | | void OnMaster(); |
| | | int LORA_3029_SINGLE_SEND(uint8_t *buffer, uint8_t size,uint8_t time); |
| | | int LORA_3029_CONTINOUS_SEND(uint8_t *buffer, uint8_t size); |
| | | #endif |
| | |
| | | while(mac_is_busy()); |
| | | gpio_pin_clr(SCL_PIN); |
| | | } |
| | | uint16_t uwb_searchcount,range_timeout_us = 1700; |
| | | uint16_t uwb_searchcount,range_timeout_us = 2000; |
| | | uint8_t flag_recsuccess; |
| | | |
| | | extern uint8_t g_start_send_flag,search_open_flag = 1,link_success_flag; |
| | |
| | | uint32_t UWB_shoudao_count=0; |
| | | uint32_t UWB_fachu_count=0; |
| | | uint32_t UWB_qiangzhanfachu_count=0; |
| | | |
| | | uint32_t UWB_1003_count,UWB_6666_count=0; |
| | | int UwbRange(void) |
| | | { |
| | | uint8_t i; |
| | |
| | | // temp_count3=phy_timer_count_get(); |
| | | //gpio_pin_set(SCL_PIN); |
| | | time_count_dkjs=phy_timer_count_get(); |
| | | gpio_pin_set(IO_PIN_5);//æµè¯ |
| | | // gpio_pin_set(IO_PIN_5);//æµè¯ |
| | | // gpio_pin_clr(IO_PIN_5); |
| | | uwb_rxflag=uwb_rx(0, 0, range_timeout_us);//å¼å¯æ¥æ¶ |
| | | // gpio_pin_clr(IO_PIN_5);//æµè¯ |
| | |
| | | time_count_sdsj=phy_timer_count_get(); |
| | | UWB_shoudao_count++; |
| | | // gpio_pin_set(IO_PIN_5);//æµè¯ |
| | | gpio_pin_clr(IO_PIN_5); |
| | | // gpio_pin_clr(IO_PIN_5); |
| | | #ifdef DEBUG_BOXING |
| | | // gpio_pin_set(IO_PIN_5);//æµè¯ |
| | | // gpio_pin_clr(IO_PIN_5);//æµè¯ |
| | |
| | | //rec_nearbase_num=25; |
| | | |
| | | memcpy(&tag_id_recv,&rx_buf[TAG_ID_IDX],2); |
| | | |
| | | memcpy(rec_ancidlist,&rx_buf[FZ_NEARBASEID_INDEX],2*rec_nearbase_num); |
| | | memcpy(rec_ancdistlist,&rx_buf[FZ_NEARBASEID_INDEX+2*rec_nearbase_num],2*rec_nearbase_num); |
| | | memcpy(&rec_antdelay,&rx_buf[FZ_NEARBASEID_INDEX+rec_nearbase_num*4],2); |
| | |
| | | { |
| | | rec_ancdistlist[i]+=(int16_t)g_com_map[DIST_OFFSET]; |
| | | PushAnchorDataArray(tag_id_recv,rec_ancdistlist[i],battary); |
| | | if(tag_id_recv==0x1003) |
| | | { |
| | | UWB_1003_count++; |
| | | } |
| | | else if(tag_id_recv==0x6666) |
| | | { |
| | | UWB_6666_count++; |
| | | } |
| | | UWB_fachu_count++; |
| | | // #ifdef DEBUG_BOXING |
| | | //// gpio_pin_clr(IO_PIN_5);//æµè¯ |
| | |
| | | // uwb_rxflag=uwb_rx(0, 0, range_timeout_us); |
| | | } |
| | | #ifdef DEBUG_BOXING |
| | | gpio_pin_clr(IO_PIN_5);//æµè¯ |
| | | // gpio_pin_clr(IO_PIN_5);//æµè¯ |
| | | // gpio_pin_set(IO_PIN_5);//æµè¯ |
| | | #endif |
| | | |
| | |
| | | <Name></Name> |
| | | </SetRegEntry> |
| | | </TargetDriverDllRegistry> |
| | | <Breakpoint/> |
| | | <Breakpoint> |
| | | <Bp> |
| | | <Number>0</Number> |
| | | <Type>0</Type> |
| | | <LineNumber>676</LineNumber> |
| | | <EnabledFlag>1</EnabledFlag> |
| | | <Address>10844</Address> |
| | | <ByteObject>0</ByteObject> |
| | | <HtxType>0</HtxType> |
| | | <ManyObjects>0</ManyObjects> |
| | | <SizeOfObject>0</SizeOfObject> |
| | | <BreakByAccess>0</BreakByAccess> |
| | | <BreakIfRCount>1</BreakIfRCount> |
| | | <Filename><1>.\include\main\main.c</Filename> |
| | | <ExecCommand></ExecCommand> |
| | | <Expression>\\uwb_simple_example\include/main/main.c\676</Expression> |
| | | </Bp> |
| | | </Breakpoint> |
| | | <WatchWindow1> |
| | | <Ww> |
| | | <count>0</count> |
| | |
| | | <Ww> |
| | | <count>0</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>RF_RX_temp</ItemText> |
| | | <ItemText>packet_transmit</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>1</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>RX_Buffer</ItemText> |
| | | <ItemText>RADIO_FLAG_IDLE</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>2</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>DEFAULT_FREQ</ItemText> |
| | | <ItemText>tx_flag</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>3</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>DEFAULT_SF</ItemText> |
| | | <ItemText>wg_report_freq,0x0A</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>4</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>RF_RX_temp</ItemText> |
| | | <ItemText>REPORT_CHANNEL_SF</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>5</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>rx_buf</ItemText> |
| | | <ItemText>RX_Buffer</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>6</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>uwb_rxflag</ItemText> |
| | | <ItemText>CRC16</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>7</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>rec_nearbase_num</ItemText> |
| | | <ItemText>DEST_ID</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>8</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>send_buffer</ItemText> |
| | | <ItemText>wg_state</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>9</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>tag_id_recv</ItemText> |
| | | <ItemText>SOURCE_ID_IDX</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>10</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>resp_tx_en_start_u32,0x0A</ItemText> |
| | | <ItemText>lora_sendbuffer</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>11</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>range_timeout_us,0x0A</ItemText> |
| | | <ItemText>Loratx_flag</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>12</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>time_count_dkjs,0x0A</ItemText> |
| | | <ItemText>Lorarx_time_out_flag,0x0A</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>13</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>time_flag_lorarx,0x0A</ItemText> |
| | | <ItemText>recv_flag</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>14</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>UwbRange</ItemText> |
| | | <ItemText>rx_timeout,0x0A</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>15</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>time_count_sdsj,0x0A</ItemText> |
| | | <ItemText>wg_report_id</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>16</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>UWB_fachu_count</ItemText> |
| | | <ItemText>wg_report_freq,0x0A</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>17</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>UWB_shoudao_count</ItemText> |
| | | <ItemText>wg_report_sf</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>18</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>lora_huanxing_count</ItemText> |
| | | <ItemText>REG_OP_MODE</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>19</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>UWB_qiangzhanfachu_count</ItemText> |
| | | <ItemText>temreg</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>20</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>rec_nearbase_num</ItemText> |
| | | <ItemText>lora_huanxing_count</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>21</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>lora_sendbuffer</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>22</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>report_ancid</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>23</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>report_ancdist</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>24</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>tx_flag</ItemText> |
| | | </Ww> |
| | | <Ww> |
| | | <count>25</count> |
| | | <WinNumber>2</WinNumber> |
| | | <ItemText>lora_sendbuffer</ItemText> |
| | | </Ww> |
| | | </WatchWindow2> |
| | | <MemoryWindow1> |
| | |
| | | <RteFlg>0</RteFlg> |
| | | <bShared>0</bShared> |
| | | </File> |
| | | <File> |
| | | <GroupNumber>3</GroupNumber> |
| | | <FileNumber>32</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | | <bDave2>0</bDave2> |
| | | <PathWithFileName>.\include\drivers\PCA9555.c</PathWithFileName> |
| | | <FilenameWithoutPath>PCA9555.c</FilenameWithoutPath> |
| | | <RteFlg>0</RteFlg> |
| | | <bShared>0</bShared> |
| | | </File> |
| | | <File> |
| | | <GroupNumber>3</GroupNumber> |
| | | <FileNumber>33</FileNumber> |
| | | <FileType>5</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | | <bDave2>0</bDave2> |
| | | <PathWithFileName>.\include\drivers\PCA9555.h</PathWithFileName> |
| | | <FilenameWithoutPath>PCA9555.h</FilenameWithoutPath> |
| | | <RteFlg>0</RteFlg> |
| | | <bShared>0</bShared> |
| | | </File> |
| | | </Group> |
| | | |
| | | <Group> |
| | |
| | | <RteFlg>0</RteFlg> |
| | | <File> |
| | | <GroupNumber>4</GroupNumber> |
| | | <FileNumber>32</FileNumber> |
| | | <FileNumber>34</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>4</GroupNumber> |
| | | <FileNumber>33</FileNumber> |
| | | <FileNumber>35</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>4</GroupNumber> |
| | | <FileNumber>34</FileNumber> |
| | | <FileNumber>36</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>4</GroupNumber> |
| | | <FileNumber>35</FileNumber> |
| | | <FileNumber>37</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>4</GroupNumber> |
| | | <FileNumber>36</FileNumber> |
| | | <FileNumber>38</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>4</GroupNumber> |
| | | <FileNumber>37</FileNumber> |
| | | <FileNumber>39</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>4</GroupNumber> |
| | | <FileNumber>38</FileNumber> |
| | | <FileNumber>40</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>4</GroupNumber> |
| | | <FileNumber>39</FileNumber> |
| | | <FileNumber>41</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>4</GroupNumber> |
| | | <FileNumber>40</FileNumber> |
| | | <FileNumber>42</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>4</GroupNumber> |
| | | <FileNumber>41</FileNumber> |
| | | <FileNumber>43</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>4</GroupNumber> |
| | | <FileNumber>42</FileNumber> |
| | | <FileNumber>44</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>4</GroupNumber> |
| | | <FileNumber>43</FileNumber> |
| | | <FileNumber>45</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>4</GroupNumber> |
| | | <FileNumber>44</FileNumber> |
| | | <FileNumber>46</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>4</GroupNumber> |
| | | <FileNumber>45</FileNumber> |
| | | <FileNumber>47</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | <RteFlg>0</RteFlg> |
| | | <File> |
| | | <GroupNumber>5</GroupNumber> |
| | | <FileNumber>46</FileNumber> |
| | | <FileNumber>48</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>5</GroupNumber> |
| | | <FileNumber>47</FileNumber> |
| | | <FileNumber>49</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>5</GroupNumber> |
| | | <FileNumber>48</FileNumber> |
| | | <FileNumber>50</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>5</GroupNumber> |
| | | <FileNumber>49</FileNumber> |
| | | <FileNumber>51</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>5</GroupNumber> |
| | | <FileNumber>50</FileNumber> |
| | | <FileNumber>52</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>5</GroupNumber> |
| | | <FileNumber>51</FileNumber> |
| | | <FileNumber>53</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>5</GroupNumber> |
| | | <FileNumber>52</FileNumber> |
| | | <FileNumber>54</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>5</GroupNumber> |
| | | <FileNumber>53</FileNumber> |
| | | <FileNumber>55</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>5</GroupNumber> |
| | | <FileNumber>54</FileNumber> |
| | | <FileNumber>56</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>5</GroupNumber> |
| | | <FileNumber>55</FileNumber> |
| | | <FileNumber>57</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | <RteFlg>0</RteFlg> |
| | | <File> |
| | | <GroupNumber>6</GroupNumber> |
| | | <FileNumber>56</FileNumber> |
| | | <FileNumber>58</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>6</GroupNumber> |
| | | <FileNumber>57</FileNumber> |
| | | <FileNumber>59</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>6</GroupNumber> |
| | | <FileNumber>58</FileNumber> |
| | | <FileNumber>60</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>1</tvExp> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | | <bDave2>0</bDave2> |
| | | <PathWithFileName>.\include\components\wsf\sources\platform\pal_uart.c</PathWithFileName> |
| | |
| | | <RteFlg>0</RteFlg> |
| | | <File> |
| | | <GroupNumber>8</GroupNumber> |
| | | <FileNumber>59</FileNumber> |
| | | <FileNumber>61</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>8</GroupNumber> |
| | | <FileNumber>60</FileNumber> |
| | | <FileNumber>62</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | <RteFlg>0</RteFlg> |
| | | <File> |
| | | <GroupNumber>9</GroupNumber> |
| | | <FileNumber>61</FileNumber> |
| | | <FileNumber>63</FileNumber> |
| | | <FileType>4</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | <RteFlg>0</RteFlg> |
| | | <File> |
| | | <GroupNumber>10</GroupNumber> |
| | | <FileNumber>62</FileNumber> |
| | | <FileNumber>64</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>10</GroupNumber> |
| | | <FileNumber>63</FileNumber> |
| | | <FileNumber>65</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>10</GroupNumber> |
| | | <FileNumber>64</FileNumber> |
| | | <FileNumber>66</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>10</GroupNumber> |
| | | <FileNumber>65</FileNumber> |
| | | <FileNumber>67</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>10</GroupNumber> |
| | | <FileNumber>66</FileNumber> |
| | | <FileNumber>68</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>10</GroupNumber> |
| | | <FileNumber>67</FileNumber> |
| | | <FileNumber>69</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>10</GroupNumber> |
| | | <FileNumber>68</FileNumber> |
| | | <FileNumber>70</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | <RteFlg>0</RteFlg> |
| | | <File> |
| | | <GroupNumber>11</GroupNumber> |
| | | <FileNumber>69</FileNumber> |
| | | <FileNumber>71</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>11</GroupNumber> |
| | | <FileNumber>70</FileNumber> |
| | | <FileNumber>72</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | </File> |
| | | <File> |
| | | <GroupNumber>11</GroupNumber> |
| | | <FileNumber>71</FileNumber> |
| | | <FileNumber>73</FileNumber> |
| | | <FileType>1</FileType> |
| | | <tvExp>0</tvExp> |
| | | <tvExpOptDlg>0</tvExpOptDlg> |
| | |
| | | <FileType>5</FileType> |
| | | <FilePath>.\include\drivers\mk_timer.h</FilePath> |
| | | </File> |
| | | <File> |
| | | <FileName>PCA9555.c</FileName> |
| | | <FileType>1</FileType> |
| | | <FilePath>.\include\drivers\PCA9555.c</FilePath> |
| | | </File> |
| | | <File> |
| | | <FileName>PCA9555.h</FileName> |
| | | <FileType>5</FileType> |
| | | <FilePath>.\include\drivers\PCA9555.h</FilePath> |
| | | </File> |
| | | </Files> |
| | | </Group> |
| | | <Group> |
¶Ô±ÈÐÂÎļþ |
| | |
| | | #include "mk_trace.h" |
| | | #include "mk_uwb.h" |
| | | #include "mk_phy.h" |
| | | #include "mk_misc.h" |
| | | #include "mk_power.h" |
| | | #include "mk_sleep_timer.h" |
| | | #include "lib_ranging.h" |
| | | #include "dw_app.h" |
| | | #include "board.h" |
| | | #include "mk_calib.h" |
| | | |
| | | #if defined(MK_SS_TWR_DW_INIT) |
| | | |
| | | extern int TagRange(void); |
| | | |
| | | /* Ranging period: 1s */ |
| | | #define RANGING_PERIOD_MS (1000) |
| | | |
| | | /* This is the delay from the end of the poll frame transmission to the enable of the receiver */ |
| | | #define POLL_TX_TO_RESP_RX_DLY_US 750U //yuan700 |
| | | |
| | | #define RESP_RX_TO_FINAL_TX_DLY_US 550U |
| | | |
| | | /* Poll delay: 1s */ |
| | | #define POLL_DELAY 100U //yuan100U |
| | | |
| | | /* Receive response timeout */ |
| | | #define RESP_RX_TIMEOUT_US 2500U //Yuan500 10mssuccess 300jixian |
| | | |
| | | /* Field index in frame */ |
| | | #define MSG_SEQ_NUM_IDX 2 |
| | | #define FINAL_MSG_POLL_TX_TS_IDX 10 |
| | | #define FINAL_MSG_RESP_RX_TS_IDX 14 |
| | | #define FINAL_MSG_FINAL_TX_TS_IDX 18 |
| | | #define DELAY_DEFAULT 50000 |
| | | #define DELAY_BETWEEN_TWO_FRAME_UUS 600 //yuan1400 |
| | | #define HALF_SECOND_TIME 62400000 |
| | | |
| | | uint16_t CmpTagInList(uint16_t tagid); |
| | | uint16_t AddNewTagIntoList(uint16_t tagid); |
| | | void AnchorListUpdate(void); |
| | | void Rank_ANchor_list_by_dis(void); |
| | | struct mk_uwb_configure |
| | | { |
| | | uint8_t phy_work_mode; /* PHY_TX / PHY_RX / PHT_TX|PHY_RX */ |
| | | struct UWB_CONFIG_T phy_cfg; |
| | | }; |
| | | uint32_t dev_id; |
| | | uint8_t group_id; |
| | | /* Default communication configuration. */ |
| | | static struct mk_uwb_configure config = {//yuan |
| | | .phy_work_mode = (uint8_t)(PHY_TX | PHY_RX), |
| | | .phy_cfg.ch_num = 5, /* Channel number. */ |
| | | .phy_cfg.code_index = 9, /* TRX preamble code */ |
| | | .phy_cfg.mean_prf = MEAN_PRF_64M, /* Mean prf 64/128/256M */ |
| | | .phy_cfg.data_bit_rate = DATA_BR_6M8, /* Data rate 6.8M */ |
| | | .phy_cfg.sync_sym = PREAM_LEN_128, /* Preamble duration, length of preamble 128 */ |
| | | .phy_cfg.sfd_sym = NON_STD_NSFD5_8, /* Identifier for SFD sequence */ |
| | | .phy_cfg.ranging_bit = 1, /* ranging bit set 1 */ |
| | | .phy_cfg.trx_mode = TRX_MODE_15_4A, /* IEEE802.15.4z - BPRF mode */ |
| | | .phy_cfg.sts_pkt_cfg = STS_PKT_CFG_0, /* SP0 Frame */ |
| | | .phy_cfg.sts_segnum = STS_SEGNUM_BPRF_1, /* Number of STS segments in the frame */ |
| | | .phy_cfg.sts_seglen = STS_SEGLEN_BPRF_64, /* Number of symbols in an STS segment */ |
| | | .phy_cfg.rx_ant_id = UWB_RX_ANT_3, /* UWB RX antenna port */ |
| | | }; |
| | | ///* Default communication configuration. */ |
| | | //static struct mk_uwb_configure config = { |
| | | // .phy_work_mode = (uint8_t)(PHY_TX | PHY_RX), |
| | | // .phy_cfg.ch_num = 5, /* Channel number. */ |
| | | // .phy_cfg.code_index = 3, /* TX preamble code. */ |
| | | // .phy_cfg.mean_prf = MEAN_PRF_16M, /* Data rate 6.8M */ |
| | | // .phy_cfg.data_bit_rate = DATA_BR_110K, /* data rate 6.8M. */ |
| | | // .phy_cfg.sync_sym = PREAM_LEN_1024, /* Preamble duration, length of preamble 128 */ |
| | | // .phy_cfg.sfd_sym = NSFD_64, /* Identifier for SFD sequence */ |
| | | // .phy_cfg.ranging_bit = 1, /* ranging bit set. */ |
| | | // .phy_cfg.trx_mode = TRX_MODE_15_4A, /* IEEE802.15.4z - BPRF mode */ |
| | | // .phy_cfg.sts_pkt_cfg = STS_PKT_CFG_0, /* SP0 Frame */ |
| | | // .phy_cfg.sts_segnum = STS_SEGNUM_BPRF_1, /* Number of STS segments in the frame */ |
| | | // .phy_cfg.sts_seglen = STS_SEGLEN_BPRF_64, /* Number of symbols in an STS segment */ |
| | | // .phy_cfg.rx_ant_id = UWB_RX_ANT_3, /* UWB RX antenna port */ |
| | | //}; |
| | | /* Buffer to store received frame */ |
| | | static uint8_t rx_buf[150]; |
| | | static uint8_t uwb_sendbuffer[150]; |
| | | /* Frames used in the ranging process |
| | | * Poll message: |
| | | * - byte 0 - 1: 0x8841 to indicate a data frame using 16-bit addressing. |
| | | * - byte 2: sequence number, incremented for each new frame. |
| | | * - byte 3 - 4: PAN Id 0x4B4d |
| | | * - byte 5 - 6: Destination address |
| | | * - byte 7 - 8: Source address |
| | | * - byte 9: Message type (0x02 RANGING_POLL / 0x03 RANGING_RESPONSE / 0x04 RANGING_FINAL) |
| | | * Response message: |
| | | * - byte 10: activity code (0x07 to tell the initiator to go on with the ranging exchange) |
| | | * Final message: |
| | | * - byte 10 - 13: poll message transmission timestamp. |
| | | * - byte 14 - 17: response message reception timestamp. |
| | | * - byte 18 - 21: final message transmission timestamp. |
| | | */ |
| | | static uint8_t tx_poll_msg[] = {0x41, 0x88, 0, 0x4D, 0x4B, 0x53, 0x45, 0x4D, 0x49, 0x02}; |
| | | static uint8_t rx_resp_msg[] = {0x41, 0x88, 0, 0x4D, 0x4B, 0x4D, 0x49, 0x53, 0x45, 0x03, 0x07}; |
| | | static uint8_t tx_final_msg[] = {0x41, 0x88, 0, 0x4D, 0x4B, 0x53, 0x45, 0x4D, 0x49, 0x04, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}; |
| | | |
| | | /* Count value of phy counter when transmitting and receiving frames */ |
| | | static uint32_t poll_tx_en_start_u32; |
| | | static uint32_t resp_rx_en_start_u32; |
| | | static uint32_t final_tx_en_start_u32; |
| | | |
| | | /* 41 bits timestamps of frames transmission/reception. */ |
| | | static int64_t poll_tx_ts_i64; |
| | | static int64_t resp_rx_ts_i64; |
| | | static int64_t final_tx_ts_i64; |
| | | |
| | | /* Frame sequence number, incremented after each transmission. */ |
| | | static uint8_t frame_seq_nb = 0; |
| | | |
| | | static volatile uint16_t rx_state; |
| | | static volatile uint16_t rx_state1; |
| | | static volatile uint16_t rx_length; |
| | | //DW |
| | | uint16_t rec_nearbaseid; |
| | | uint8_t temp_tag_num; |
| | | int32_t test2; |
| | | static uint8_t receive_flag=0; |
| | | static uint8_t rec_tag_index,tag_num_tosend; |
| | | |
| | | uint32_t start_receive_count,end_receive_count,poll_timeout,current_count,temp_resp; |
| | | uint16_t taglist_total_num,taglist_current_index; //å½ååè¡¨æ»æ°é |
| | | uint8_t taglist_keeptime[MAX_TAG_LIST_NUM]; //æ¯ä¸ªæ ç¾åæ´»æ¶é´ |
| | | uint16_t taglist_id[MAX_TAG_LIST_NUM],taglist_dist[MAX_TAG_LIST_NUM]; //æ ç¾è·ç¦»åæ ç¾çID |
| | | |
| | | int32_t mainbase_dist,nearbase_distlist[MAX_NEARBASE_NUM],true_nearbase_distlist[MAX_NEARBASE_NUM],true_exsistbase_list[MAX_NEARBASE_NUM],ancsync_time,nextpoll_delaytime,offsettimeus; |
| | | uint8_t anclost_times=0 , mainbase_lost_count=0,exsistbase_list[MAX_NEARBASE_NUM],get_newbase=0,nearbase_num,last_nearbase_num,next_nearbase_num; |
| | | uint16_t nearbaseid_list[MAX_NEARBASE_NUM],mainbase_id,true_nearbase_idlist[MAX_NEARBASE_NUM],rec_nearbaseid,rec_nearbasepos; |
| | | uint16_t u16_nearbase_distlist[MAX_NEARBASE_NUM]; |
| | | uint32_t temp_count1=0; |
| | | uint32_t temp_count2=0; |
| | | uint32_t temp_count3=0; |
| | | uint32_t temp_count4=0; |
| | | uint32_t tempflag=0; |
| | | int32_t freq_offset,freq_offset_filter; |
| | | int temp_flag,poll_tx_num,resp_rx_num; |
| | | extern double distance; |
| | | uint32_t count1,count2; |
| | | enum SIMPLE_FSM_T |
| | | { |
| | | SIMPLE_IDLE = 0, |
| | | SIMPLE_POLL = 1, |
| | | SIMPLE_RESPONSE = 2, |
| | | SIMPLE_FINAL = 3, |
| | | }; |
| | | void uwb_poll_buffer_construct(void) |
| | | { |
| | | for(uint8_t i=0;i<nearbase_num;i++) //æ ç¾è·ç¦»32ä½è½¬æ16ä½ |
| | | { |
| | | u16_nearbase_distlist[i] = nearbase_distlist[i]; |
| | | } |
| | | uwb_sendbuffer[GROUP_ID_IDX] = group_id; |
| | | memcpy(&uwb_sendbuffer[TAG_ID_IDX],&dev_id,2); |
| | | //uwb_sendbuffer[BATTARY_IDX] = bat_percent; |
| | | uwb_sendbuffer[SEQUENCE_IDX] = frame_seq_nb++; |
| | | uwb_sendbuffer[NEARBASENUM_INDEX] = nearbase_num; |
| | | memcpy(&uwb_sendbuffer[NEARBASEID_INDEX],&nearbaseid_list,nearbase_num*2);//åºç«id |
| | | memcpy(&uwb_sendbuffer[NEARBASEID_INDEX+nearbase_num*2],&u16_nearbase_distlist,nearbase_num*2); |
| | | uwb_sendbuffer[MESSAGE_TYPE_IDX] = MBX_POLL; |
| | | memcpy(&uwb_sendbuffer[ANCHOR_ID_IDX],&mainbase_id,2); |
| | | } |
| | | |
| | | static enum SIMPLE_FSM_T state = SIMPLE_IDLE; |
| | | |
| | | /** |
| | | * @brief Correct TX timestamp of the ranging frame. |
| | | * |
| | | * @param[in] timestamp PHY timer count of TX |
| | | * @return TX timestamp (unit: 15.65ps) |
| | | */ |
| | | static int64_t ranging_tx_time_correct(uint32_t timestamp) |
| | | { |
| | | int64_t tx_timestamp = ranging_tx_time(timestamp); |
| | | |
| | | // correct antenna delay (TX using the same antenna as RX) |
| | | tx_timestamp += ranging_ant_delays_get(config.phy_cfg.rx_ant_id) / 2; |
| | | |
| | | return tx_timestamp; |
| | | } |
| | | |
| | | /** |
| | | * @brief Correct RX timestamp of the ranging frame. |
| | | * |
| | | * @param[in] ind MAC RX report |
| | | * @return RX timestamp (unit: 15.65ps) |
| | | */ |
| | | static int64_t ranging_rx_time_correct(const struct MAC_HW_REPORT_T *ind) |
| | | { |
| | | int64_t rx_timestamp = ranging_rx_time(ind); |
| | | |
| | | // correct antenna delay |
| | | rx_timestamp -= ranging_ant_delays_get(config.phy_cfg.rx_ant_id) / 2; |
| | | |
| | | return rx_timestamp; |
| | | } |
| | | |
| | | /* RX done process handler. */ |
| | | static void rx_int_callback(struct MAC_HW_REPORT_T *rx_report) |
| | | { |
| | | // Power off radio |
| | | power_off_radio(); |
| | | |
| | | rx_state = rx_report->err_code; |
| | | |
| | | /** UWB RX success */ |
| | | if (rx_state == UWB_RX_OK) |
| | | { |
| | | /* Received data does not contain FCS */ |
| | | rx_length = rx_report->pkt_len; |
| | | memcpy(rx_buf, rx_report->pkt_data, rx_length); |
| | | /* Calculate rx timestamp */ |
| | | resp_rx_ts_i64 = ranging_rx_time_correct(rx_report); |
| | | temp_count1=phy_timer_count_get(); |
| | | //è·ååå°ç«¯æ¶éåå·® |
| | | resp_rx_num++; |
| | | freq_offset=phy_freq_offset_get(); |
| | | |
| | | // freq_offset_filter=average_filter(freq_offset);//è·åé¢å |
| | | //int32_t ppm = freq_offset_filter / (int32_t)(ch_center_freq_map[UWB_CH_NUM] * 1e-6); |
| | | //calib_xtal38m4_load_cap_auto_tune(ppm);//å©ç¨çµå®¹è°æ´æ¶æ¯éé
é¢ååºå¨å®æ´çä¸å
ä¹åè°æ´ï¼éè¦å
³éXTAL_AUTO_TUNE_EN å®å®ä¹é¿å
æ¶å
ä¸éæ ¡åå¯¼è´æµè·é误 |
| | | //LOG_INFO(TRACE_MODULE_APP, "poll_tx_num is %d,resp_rx_num is %d,distance is %lf\r\n",poll_tx_num,resp_rx_num,distance); |
| | | receive_flag=1; |
| | | |
| | | } |
| | | else |
| | | { |
| | | /* UWB_PLD_ERR payload error */ |
| | | /* UWB_PHR_ERR PHR error */ |
| | | /* UWB_SFD_ERR Sfd error */ |
| | | /* UWB_BD_ERR Preamble detection error */ |
| | | /* UWB_TO_ERR Receive timeout */ |
| | | /* UWB_STS_ERR STS error */ |
| | | rx_state1=rx_report->err_code; |
| | | rx_length = 0; |
| | | receive_flag=2; |
| | | temp_count2=phy_timer_count_get(); |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | /* TX done process handler. */ |
| | | static void tx_int_callback(struct MAC_HW_REPORT_T *tx_report) |
| | | { |
| | | // Power off radio |
| | | power_off_radio(); |
| | | |
| | | /** UWB TX success */ |
| | | if (tx_report->err_code == UWB_TX_OK) |
| | | { |
| | | poll_tx_num++; |
| | | temp_count4=phy_timer_count_get();//æµè¯ |
| | | if(temp_flag){ |
| | | count2=phy_timer_count_get(); |
| | | temp_flag=0; |
| | | return; |
| | | } |
| | | count1=temp_count1; |
| | | temp_flag=1; |
| | | } |
| | | } |
| | | |
| | | |
| | | |
| | | //注æï¼å ä¸ºæ°æ³¨åçæ ç¾å¹¶ä¸ç¥éåºç«å·²ç»æ¶å°äºï¼æä»¥è¦å¨ä¸ä¸å
ç«å»å°æ°çæ ç¾IDååºï¼å¦åæ ç¾ä¼ä¸ç´æ¢å åºç«çpollå
ã |
| | | //æ¹æ³æ¯å°æ°æ³¨åçæ ç¾æ·»å å°ä¸æ¬¡åéçæ ç¾å表头é¨ï¼å
¶ä»æ ç¾ä¾æ¬¡ååæªå¨ã |
| | | uint16_t AddNewTagIntoList(uint16_t tagid) |
| | | { |
| | | uint16_t newindex_cal = taglist_current_index+25;//å½åç´¢å¼+25ï¼ä¸ºä¸æ¬¡ç´¢å¼è¦ååºçå¼çæå¤§å¼ï¼å¦ææ»æ°å°äºè¿ä¸ªå¼ï¼å³å¯æ¾å°æåé¢ã |
| | | if(newindex_cal>=taglist_total_num) //妿å½åç´¢å¼æ¯æåä¸å
ï¼é£ä¹å°±å å°æ»ç´¢å¼çåé¢ï¼å¦æä¸æ¯å°±å å°ä¸ä¸æ¬¡èµ·å§ç´¢å¼ä½ç½®ã |
| | | { |
| | | newindex_cal = taglist_total_num; |
| | | |
| | | }else{ |
| | | for(uint16_t i=taglist_total_num;i>newindex_cal;i--) //ä»åå¾åæªå°æ¹??å°±æ¯æå
¥ |
| | | { |
| | | taglist_id[i]=taglist_id[i-1]; |
| | | taglist_dist[i]=taglist_dist[i-1]; |
| | | taglist_keeptime[i]=taglist_keeptime[i-1]; |
| | | } |
| | | } |
| | | taglist_total_num++; |
| | | taglist_id[newindex_cal] = tagid; |
| | | taglist_dist[newindex_cal] = 0; |
| | | taglist_keeptime[newindex_cal] = TAG_KEEPTIMES; |
| | | return newindex_cal; |
| | | } |
| | | uint8_t FindNearBasePos(uint16_t baseid)//寻æ¾å½åå表ä¸çåºç«è¿åç´¢å¼ |
| | | { |
| | | uint8_t i; |
| | | for(i=0;i<nearbase_num;i++) |
| | | { |
| | | if(baseid==nearbaseid_list[i]) |
| | | return i; |
| | | } |
| | | if(i==nearbase_num) |
| | | return nearbase_num; |
| | | } |
| | | |
| | | void AnchorListUpdate(void) |
| | | { |
| | | next_nearbase_num = 0; |
| | | int j=0; |
| | | for(int i=0;i<nearbase_num;i++) |
| | | { |
| | | if(exsistbase_list[i]>0) |
| | | { |
| | | exsistbase_list[i]--; |
| | | next_nearbase_num++; |
| | | true_exsistbase_list[j]=exsistbase_list[i]; |
| | | true_nearbase_idlist[j]=nearbaseid_list[i]; |
| | | true_nearbase_distlist[j++]=nearbase_distlist[i]; |
| | | |
| | | } |
| | | } |
| | | nearbase_num = next_nearbase_num;//æ´æ°ç°ååºç«æ° |
| | | last_nearbase_num = next_nearbase_num;//æ´æ°å½ååºç«æ° |
| | | } |
| | | |
| | | void Rank_ANchor_list_by_dis(void)//æç
§ç®åçåºç«è·ç¦»è¿è¡å泡æåºç¨ä¸´æ¶æ°ç»æ¹å¼å°æè¿çæ¾å°æåé¢ï¼æè¿çæ¾å°æåé¢ |
| | | { |
| | | for(int i=0;i<last_nearbase_num-1;i++) |
| | | { |
| | | for(int j=0;j<last_nearbase_num-1;j++) |
| | | { |
| | | if(true_nearbase_distlist[j]>true_nearbase_distlist[j+1]) |
| | | { |
| | | uint32_t temp_dist,temp_id,temp_exsis; |
| | | temp_dist=true_nearbase_distlist[j]; |
| | | temp_id = true_nearbase_idlist[j]; |
| | | temp_exsis=true_exsistbase_list[j]; |
| | | true_nearbase_distlist[j]=true_nearbase_distlist[j+1]; |
| | | true_nearbase_idlist[j]=true_nearbase_idlist[j+1]; |
| | | true_exsistbase_list[j]=true_exsistbase_list[j+1]; |
| | | |
| | | true_nearbase_distlist[j+1]=temp_dist; |
| | | true_nearbase_idlist[j+1]=temp_id; |
| | | true_exsistbase_list[j+1]=temp_exsis; |
| | | } |
| | | } |
| | | } |
| | | for (int i=0;i<last_nearbase_num;i++) |
| | | { |
| | | nearbaseid_list[i]=true_nearbase_idlist[i]; |
| | | nearbase_distlist[i]=true_nearbase_distlist[i]; |
| | | exsistbase_list[i] = true_exsistbase_list[i]; |
| | | } |
| | | } |
| | | uint16_t CmpTagInList(uint16_t tagid)//æ¾è¿ä¸ªæ°ä¸å
çåºç«å¨ä¸å¨ç°åçtaglistä¸å¨çè¯å¯¹åºä½ç½®æ´æ°åæ´»æ¶é´ï¼ä¸å¨å°±å¢å ï¼ç¡®ä¿æææ°éå°äºæå¤§è®¾ç½®æ°ï¼ |
| | | { |
| | | uint16_t temp; |
| | | for(uint8_t i=0;i<taglist_total_num;i++) |
| | | { |
| | | if(memcmp(&tagid,&taglist_id[i],2)==0) |
| | | { |
| | | taglist_keeptime[i] = TAG_KEEPTIMES; |
| | | return i; |
| | | } |
| | | } |
| | | if(taglist_total_num<MAX_TAG_LIST_NUM) |
| | | temp = AddNewTagIntoList(tagid); |
| | | return temp; |
| | | } |
| | | uint32_t count_index; |
| | | int tt=1; |
| | | int TagRange(void) |
| | | { |
| | | // The following peripherals will be initialized in the uwb_open function |
| | | // phy/mac/aes/lsp/phy timers initialized |
| | | uwb_open(); |
| | | |
| | | // Set calibration parameters |
| | | uwb_calibration_params_set(config.phy_cfg.ch_num); |
| | | |
| | | // set advanced parameters |
| | | struct PHY_ADV_CONFIG_T adv_config = { |
| | | .thres_fap_detect = 40, |
| | | .nth_scale_factor = 4, |
| | | .ranging_performance_mode = 0, |
| | | .skip_weakest_port_en = 0, |
| | | }; |
| | | phy_adv_params_configure(&adv_config); |
| | | |
| | | // uwb configure |
| | | uwb_configure(config.phy_work_mode, board_param.tx_power_fcc[CALIB_CH(config.phy_cfg.ch_num)], &config.phy_cfg); |
| | | |
| | | ranging_frame_type_set(config.phy_cfg.sts_pkt_cfg); |
| | | |
| | | // Register rx interrupt callback function |
| | | mac_register_process_handler(tx_int_callback, rx_int_callback); |
| | | |
| | | //#if LOW_POWER_EN |
| | | // // Initialize low power mode |
| | | // power_init(); |
| | | // // Enable sleep timer |
| | | // sleep_timer_open(true, SLEEP_TIMER_MODE_ONESHOT, NULL); |
| | | //#endif |
| | | uwb_poll_buffer_construct(); |
| | | temp_tag_num=0;//ä¸´æ¶æ°é为0 |
| | | poll_tx_en_start_u32 = phy_timer_count_get()+US_TO_PHY_TIMER_COUNT(POLL_DELAY);//åéå¿
é¡»è¦å»¶æ¶åéæå¯ä»¥ç¨äºæµè·å¦åç«å³åéä¼è·åæ¶é´æ³ä¸å¯¹ï¼éè¦è®¡ç®ç¨åºè¿è¡æ¶é´ï¼é¿å
设置è¿å»æ¶é´ |
| | | tempflag=uwb_tx(uwb_sendbuffer,13+4*nearbase_num,1,poll_tx_en_start_u32);//ç«å³åé |
| | | #ifdef BOXING |
| | | gpio_pin_set(IO_PIN_5);//æµè¯ |
| | | #endif |
| | | //LOG_INFO(TRACE_MODULE_APP, "è¿å
¥æµè·",poll_tx_num,resp_rx_num,distance); |
| | | poll_tx_ts_i64 = ranging_tx_time_correct(poll_tx_en_start_u32 + phy_shr_duration());//ä¿®æ£æ¶é´æ³ |
| | | temp_count1=phy_timer_count_get(); |
| | | while(mac_is_busy());//çå¾
åé宿 |
| | | gpio_pin_clr(IO_PIN_5);//æµè¯ |
| | | gpio_pin_set(IO_PIN_5);//æµè¯ |
| | | temp_count2=phy_timer_count_get(); |
| | | resp_rx_en_start_u32 = poll_tx_en_start_u32+ US_TO_PHY_TIMER_COUNT(POLL_TX_TO_RESP_RX_DLY_US);//设置åéå¤å°såæ¥æ¶ætargetç¬ç«æ¶é´èµ·ç¹ç®+ US_TO_PHY_TIMER_COUNT(POLL_TX_TO_RESP_RX_DLY_US为åéåè¦å¤ä¹
å¼å¯æ¥æ¶æ¶é´ |
| | | temp_resp=resp_rx_en_start_u32; |
| | | //tempflag=uwb_rx(1, resp_rx_en_start_u32, RESP_RX_TIMEOUT_US);//å¼å¯æ¥åå¹¶è®¾ç½®æ¥æ¶è¶
æ¶ |
| | | tempflag=uwb_rx(0,0, RESP_RX_TIMEOUT_US); |
| | | |
| | | |
| | | start_receive_count=phy_timer_count_get(); |
| | | poll_timeout=nearbase_num*US_TO_PHY_TIMER_COUNT(DELAY_BETWEEN_TWO_FRAME_UUS)+US_TO_PHY_TIMER_COUNT(RESP_RX_TIMEOUT_US);//å¤ä¸ä¸ªå¤0.4msé»è®¤0.4ms计ç®ä¸º0.125*4*100000,é»è®¤å¼å¯1mss |
| | | end_receive_count=start_receive_count+poll_timeout; |
| | | |
| | | if(end_receive_count>=UINT32_MAX) |
| | | {end_receive_count-=UINT32_MAX;} |
| | | current_count=phy_timer_count_get(); |
| | | count_index=end_receive_count+HALF_SECOND_TIME; |
| | | // if(tt){ |
| | | while(current_count<end_receive_count||current_count>end_receive_count+HALF_SECOND_TIME)//å¾ªç¯æ¥åå
ä½,è¥ä¸º124.8K忝+62400000 |
| | | { |
| | | |
| | | current_count=phy_timer_count_get();//䏿巿°å½å计æ°å¨å¼ |
| | | temp_count2=phy_timer_count_get(); |
| | | while(mac_is_busy());//çå¾
æ¥æ¶å®æ |
| | | temp_count3=phy_timer_count_get(); |
| | | if(receive_flag==1)//æåæ¥æ¶æ°æ® |
| | | { |
| | | receive_flag=0; |
| | | tempflag=uwb_rx(0, 0, RESP_RX_TIMEOUT_US);//ç«å³å¼å¯æ¥å并设置0è¶
æ¶ |
| | | //æ¥æ¶æåå夿æ¯å¦ä¸ºåä¸ç» |
| | | if (rx_buf[MESSAGE_TYPE_IDX] == MBX_RESPONSE&&!memcmp(&rx_buf[TAG_ID_IDX],&dev_id,2)&&rx_buf[GROUP_ID_IDX]==group_id) //å¤ææ¥æ¶å°çæ°æ®æ¯å¦æ¯responseæ°æ® |
| | | { |
| | | memcpy(&rec_nearbaseid,&rx_buf[ANCHOR_ID_IDX],2); |
| | | rec_nearbasepos=FindNearBasePos(rec_nearbaseid); |
| | | SetANCTimestap(rec_nearbasepos,&rx_buf[RESP_MSG_POLL_RX_TS_IDX],&rx_buf[RESP_MSG_RESP_TX_TS_IDX],(uint32_t)resp_rx_ts_i64,&rx_buf[RESP_MSG_ANC_DISTOFFSET],test2,(uint32_t)poll_tx_ts_i64); |
| | | if(rec_nearbasepos>=nearbase_num) //åç°æ°çåºç« |
| | | { |
| | | //get_newbase=1; |
| | | nearbase_num++; |
| | | nearbaseid_list[rec_nearbasepos] = rec_nearbaseid; |
| | | } |
| | | exsistbase_list[rec_nearbasepos]=KEEP_TIMES;//æ´æ°åæ´»æ¶é´ |
| | | |
| | | memset(rx_buf, 0, sizeof(rx_buf));//æ¸
ç©ºæ¥æ¶å°çç¨å®çæ°ç» |
| | | rx_length=0;//æ¸
0é¿åº¦ |
| | | // uwb_rx(0, 0, RESP_RX_TIMEOUT_US);//ç«å³å¼å¯æ¥å并设置0è¶
æ¶ |
| | | // while(mac_is_busy()); |
| | | //break;//æåæ¥æ¶å°±éåº |
| | | |
| | | } |
| | | |
| | | // #ifdef BOXING |
| | | // gpio_pin_clr(IO_PIN_5);//æµè¯ |
| | | // #endif |
| | | }else if(receive_flag==2){//æ¥æ¶åºé |
| | | receive_flag=0; |
| | | tempflag=uwb_rx(0, 0, RESP_RX_TIMEOUT_US);//ç«å³å¼å¯æ¥å并设置0è¶
æ¶ |
| | | temp_count3=phy_timer_count_get(); |
| | | // while(mac_is_busy()); |
| | | temp_count1=phy_timer_count_get(); |
| | | } |
| | | #ifdef BOXING |
| | | gpio_pin_clr(IO_PIN_5);//æµè¯ |
| | | gpio_pin_set(IO_PIN_5);//æµè¯ |
| | | #endif |
| | | } |
| | | // } |
| | | #ifdef BOXING |
| | | gpio_pin_clr(IO_PIN_5);//æµè¯ |
| | | #endif |
| | | delay_us(1); |
| | | uwb_rx_force_off(1); |
| | | //dwt_forecetrxoff(); |
| | | CalculateDists(poll_tx_ts_i64); //计ç®è·ç¦»å¹¶æ´æ°è·ç¦»è¡¨ |
| | | AnchorListUpdate();//æ´æ°åæ´»åºç«å表 |
| | | // Rank_ANchor_list_by_dis();//åæ³¡æåºéæ°æè·ç¦»éæ°æååºç«å表æå°è·ç¦»åè´§åºç«æ¾å°æåé¢ |
| | | } |
| | | #endif |