资源简介
这是经过实测的源码,亲测可用,定位原理是使用TOF方法的6次双向双边真实测距方法,可实现多基站多信标的定位,三个基站一个信标就可以实现定位,本代码使用的是1023长符号前导码序列,可以实现200米以内的测距和高精度定位,定位精度在10-30cm以内
代码片段和文件信息
/*! ------------------------------------------------------------------------------------------------------------------
* @file deca_device.c
* @brief DecaWave device configuration and control functions
*
* @attention
*
* Copyright 2013 (c) DecaWave Ltd Dublin Ireland.
*
* All rights reserved.
*
*/
#include “deca_types.h“
#include “deca_param_types.h“
#include “deca_regs.h“
#include “deca_device_api.h“
#include “deca_sleep.h“
#include “port.h“
// Defines for enable_clocks function
#define FORCE_SYS_XTI 0
#define ENABLE_ALL_SEQ 1
#define FORCE_SYS_PLL 2
#define READ_ACC_ON 7
#define READ_ACC_OFF 8
#define FORCE_OTP_ON 11
#define FORCE_OTP_OFF 12
#define FORCE_TX_PLL 13
// #define DWT_API_ERROR_CHECK // define so API checks config input parameters
// -------------------------------------------------------------------------------------------------------------------
//
// Internal functions for controlling and configuring the device
//
// -------------------------------------------------------------------------------------------------------------------
// Enable and Configure specified clocks
void _dwt_enableclocks(int clocks) ;
// Configure the ucode (FP algorithm) parameters
void _dwt_configlde(int prf);
// Load ucode from OTP/ROM
void _dwt_loaducodefromrom(void);
// Read non-volatile memory
uint32 _dwt_otpread(uint32 address);
// Program the non-volatile memory
uint32 _dwt_otpprogword32(uint32 data uint16 address);
// Upload the device configuration into always on memory
void _dwt_aonarrayupload(void);
// -------------------------------------------------------------------------------------------------------------------
/*!
* Static data for DW1000 DecaWave Transceiver control
*/
// -------------------------------------------------------------------------------------------------------------------
// Structure to hold device data
typedef struct
{
uint32 deviceID ;
uint32 partID ;
uint32 lotID ;
uint8 chan; // Added channel here - used in the reading of accumulator
uint8 longframes ; // Flag in non-standard long frame mode
uint8 otprev ; // OTP revision number (read during initialisation)
uint32 txFCTRL ; // Keep TX_FCTRL register config
uint8 xtrim; // XTAL trim value read from OTP
uint8 dblbuffon; // Double RX buffer mode flag
uint32 sysCFGreg ; // Local copy of system config register
uint16 sleep_mode; // Used for automatic reloading of LDO tune and microcode at wake-up
dwt_callback_data_t cdata; // Callback data structure
uint8 wait4resp ; // wait4response was set with last TX start command
int prfIndex ;
void (*dwt_txcallback)(const dwt_callback_data_t *txd);
void (*dwt_rxcallback)(const dwt_callback_dat
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
目录 0 2018-04-14 18:10 1基站多标签V3.5\
目录 0 2018-04-14 18:10 1基站多标签V3.5\Libraries\
目录 0 2018-04-14 18:10 1基站多标签V3.5\Libraries\CMSIS\
目录 0 2018-04-14 18:10 1基站多标签V3.5\Libraries\CMSIS\CM3\
目录 0 2018-04-14 18:10 1基站多标签V3.5\Libraries\CMSIS\CM3\CoreSupport\
文件 17273 2010-06-07 10:25 1基站多标签V3.5\Libraries\CMSIS\CM3\CoreSupport\core_cm3.c
文件 85714 2011-02-09 14:59 1基站多标签V3.5\Libraries\CMSIS\CM3\CoreSupport\core_cm3.h
目录 0 2018-04-14 18:10 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\
目录 0 2018-04-14 18:10 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\
目录 0 2018-04-14 18:10 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\
文件 26297 2011-03-14 12:31 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\Release_Notes.html
目录 0 2018-04-14 18:10 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\
目录 0 2018-04-14 18:10 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\
文件 12604 2011-03-10 10:54 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\startup_stm32f10x_cl.s
文件 12592 2011-03-10 10:53 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\startup_stm32f10x_hd.s
文件 12239 2011-03-10 10:53 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\startup_stm32f10x_hd_vl.s
文件 9826 2011-03-10 10:53 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\startup_stm32f10x_ld.s
文件 10275 2011-03-10 10:53 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\startup_stm32f10x_ld_vl.s
文件 10275 2011-03-10 10:53 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\startup_stm32f10x_md.s
文件 10757 2011-03-10 10:53 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\startup_stm32f10x_md_vl.s
文件 13252 2011-03-10 10:53 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\TrueSTUDIO\startup_stm32f10x_xl.s
目录 0 2018-04-14 18:10 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\
文件 15766 2011-03-10 10:52 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_cl.s
文件 15503 2011-10-06 21:43 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd.s
文件 15692 2011-03-10 10:52 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_hd_vl.s
文件 12376 2011-03-10 10:52 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld.s
文件 13656 2011-03-10 10:52 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_ld_vl.s
文件 12765 2011-03-10 10:52 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_md.s
文件 14073 2011-03-10 10:51 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_md_vl.s
文件 15955 2011-03-10 10:51 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\arm\startup_stm32f10x_xl.s
目录 0 2018-04-14 18:10 1基站多标签V3.5\Libraries\CMSIS\CM3\DeviceSupport\ST\STM32F10x\startup\gcc_ride7\
............此处省略230个文件信息
- 上一篇:uwb定位stm32源码
- 下一篇:ttp223触摸弹簧按键开关原理图
评论
共有 条评论