From 07691209317d73ebe7b89bce522cd43fa4bcadc0 Mon Sep 17 00:00:00 2001
From: zhyinch <zhyinch@gmail.com>
Date: 星期五, 11 六月 2021 17:25:47 +0800
Subject: [PATCH] V1.47 增加NLOS模式

---
 源码/核心板/Src/application/dw_app.c |   12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diff --git "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/dw_app.c" "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/dw_app.c"
index 46c0646..5ab8cdc 100644
--- "a/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/dw_app.c"
+++ "b/\346\272\220\347\240\201/\346\240\270\345\277\203\346\235\277/Src/application/dw_app.c"
@@ -1,6 +1,6 @@
 #include "dw_app.h"
 #include "ADC.h"
-#define TDFILTER
+//#define TDFILTER
 enum enumtagstate
 {
 	DISCPOLL,
@@ -115,6 +115,14 @@
 		}
 	}
 }
+void SetNLOSNTMSettings(void)
+{
+    uint8_t temp;
+    temp = 7;
+    dwt_writetodevice(LDE_IF_ID,LDE_CFG1_OFFSET,1,&temp);
+    dwt_write16bitoffsetreg(LDE_IF_ID,LDE_CFG2_OFFSET,3);
+    // NTM = dwt_read32bitoffsetreg(LDE_IF_ID,LDE_CFG1_OFFSET) & LDE_CFG1_NSTDEV_MASK;
+}
 void Dw1000_Init(void)
 {
 	/* Reset and initialise DW1000.
@@ -127,7 +135,7 @@
     /* Configure DW1000. See NOTE 6 below. */
     dwt_configure(&config);//配置DW1000
 	
-
+    SetNLOSNTMSettings();
 	
     /* Apply default antenna delay value. See NOTE 1 below. */
     dwt_setrxantennadelay(RX_ANT_DLY);		//设置接收天线延迟

--
Gitblit v1.9.3