From ba9bc95d95fbd04e34ca5d61677422d28c089bf8 Mon Sep 17 00:00:00 2001 From: WXK <287788329@qq.com> Date: 星期五, 05 七月 2024 16:41:41 +0800 Subject: [PATCH] 1.25,修改后测试一天一夜已经 不死机。 --- Src/application/dw_app.c | 17 +++++++++++++++++ 1 files changed, 17 insertions(+), 0 deletions(-) diff --git a/Src/application/dw_app.c b/Src/application/dw_app.c index fa32ec2..7a0b0e3 100644 --- a/Src/application/dw_app.c +++ b/Src/application/dw_app.c @@ -175,4 +175,21 @@ dwt_setrxtimeout(tims_ms*1000);//设定接收超时时间,0位没有超时时间 dwt_rxenable(0); uwb_state=1; +} +void UWB_RXON() +{ + UWB_Wkup(); + dwt_forcetrxoff(); + 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), 0); + + + 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_setrxtimeout(0);//设定接收超时时间,0位没有超时时间 + dwt_rxenable(0); +} +void UWB_RXOFF() +{ + 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), 0); + dwt_forcetrxoff(); + dwt_entersleep(); } \ No newline at end of file -- Gitblit v1.9.3