From 4b421322afff4020c6b2c1bece996a7f9cd67337 Mon Sep 17 00:00:00 2001 From: WXK <287788329@qq.com> Date: 星期四, 18 四月 2024 16:53:09 +0800 Subject: [PATCH] V2.4 --- APL/dw_app.c | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/APL/dw_app.c b/APL/dw_app.c index b54becf..edea878 100644 --- a/APL/dw_app.c +++ b/APL/dw_app.c @@ -80,14 +80,14 @@ 5, #endif DWT_PRF_64M, /* Pulse repetition frequency. */ - DWT_PLEN_128, /* Preamble length. */ + DWT_PLEN_64, /* Preamble length. */ DWT_PAC8, /* Preamble acquisition chunk size. Used in RX only. */ 9, /* TX preamble code. Used in TX only. */ 9, /* RX preamble code. Used in RX only. */ 1, /* Use non-standard SFD (Boolean) */ DWT_BR_6M8, /* Data rate. */ DWT_PHRMODE_STD, /* PHY header mode. */ - (129 + 8 - 8) /* SFD timeout (preamble length + 1 + SFD length - PAC size). Used in RX only. */ + (65 + 8 - 8) /* SFD timeout (preamble length + 1 + SFD length - PAC size). Used in RX only. */ }; uint32_t uwbid=0; @@ -106,13 +106,13 @@ // dwt_setinterrupt( DWT_INT_RFCG | (DWT_INT_ARFE | DWT_INT_RFSL | DWT_INT_SFDT | DWT_INT_RPHE | DWT_INT_RFCE | DWT_INT_RFTO | DWT_INT_RXPTO), 1); - + dwt_setinterrupt( DWT_INT_RFCG | (DWT_INT_ARFE | DWT_INT_RFSL | DWT_INT_SFDT | DWT_INT_RPHE | DWT_INT_RFCE | DWT_INT_RFTO | DWT_INT_RXPTO), 1); /* Apply default antenna delay value. See NOTE 1 below. */ dwt_setrxantennadelay(RX_ANT_DLY); //设置接收天线延迟 dwt_settxantennadelay(TX_ANT_DLY); //设置发射天线延迟 -// dwt_setrxtimeout(1000);//设定接收超时时间,0位没有超时时间 -// dwt_rxenable(0);//打开接收 + dwt_setrxtimeout(1000);//设定接收超时时间,0位没有超时时间 + dwt_rxenable(0);//打开接收 // uwbid=dwt_readdevid(); /* Set expected response's delay and timeout. See NOTE 4 and 5 below. * As this example only handles one incoming frame with always the same delay and timeout, those values can be set here once for all. */ @@ -135,8 +135,8 @@ extern uint8_t g_pairstart; void tag_sleep_configuraion(void) { - dwt_configuresleep(0x940, 0x7); - dwt_entersleep(); +// dwt_configuresleep(0x940, 0x7); +// dwt_entersleep(); } u32 id; void UWB_Wkup(void) -- Gitblit v1.9.3