From 6948b22fe50de357285ab337aebb8e7d8dad6d97 Mon Sep 17 00:00:00 2001 From: yincheng.zhong <634916154@qq.com> Date: 星期四, 05 九月 2024 10:55:19 +0800 Subject: [PATCH] 增加4G低功耗代码,GPIO唤醒异常,会自动唤醒 --- keil/uwb_app.c | 12 ++++++------ 1 files changed, 6 insertions(+), 6 deletions(-) diff --git a/keil/uwb_app.c b/keil/uwb_app.c index 5677682..fadacac 100644 --- a/keil/uwb_app.c +++ b/keil/uwb_app.c @@ -344,7 +344,7 @@ uwb_tx(send_buffer, 40,1 ,resp_tx_en_start_u32);//立即发送测试size大小 temp_count1=phy_timer_count_get(); while(mac_is_busy()); - gpio_pin_clr(SCL_PIN); +// gpio_pin_clr(SCL_PIN); } uint16_t uwb_searchcount,uwb_timer_reload_value = 496; uint8_t range_success; @@ -380,7 +380,7 @@ range_success = 0; receive_flag = 0; temp_count3=phy_timer_count_get(); - gpio_pin_set(SCL_PIN); +// gpio_pin_set(SCL_PIN); uwb_rx(0, 0, RX_SYNC_WIN_US);//开启接收 temp_count2=phy_timer_count_get(); start_receive_count=phy_timer_count_get(); @@ -441,7 +441,7 @@ range_success = 1; sleep_timer_start(__MS_TO_32K_CNT(uwb_timer_reload_value));//测试 - gpio_pin_clr(SCL_PIN); + // gpio_pin_clr(SCL_PIN); delay_time = (current_count-start_receive_count)>>7; LOG_INFO(TRACE_MODULE_APP,"标签ID:%X,距离: %d 信号强度:%d. 等待时间%d\r\n",g_com_map[BIND_DEV_ID],distance,rssi,delay_time); @@ -498,7 +498,7 @@ mac_register_process_handler(tx_int_callback, rx_int_callback); receive_flag = 0; temp_count3=phy_timer_count_get(); - gpio_pin_set(SCL_PIN); +// gpio_pin_set(SCL_PIN); uwb_rx(0, 0, RX_SYNC_WIN_US_TEMP);//开启接收 start_receive_count=phy_timer_count_get(); poll_timeout=US_TO_PHY_TIMER_COUNT(2000000);//多一个多0.4ms默认0.4ms计算为0.125*4*100000,默认开启1mss @@ -556,7 +556,7 @@ Anchor_RecNearPoll(i); } sleep_timer_start(__MS_TO_32K_CNT(UWB_DELAY_TIME_US));//测试 - gpio_pin_clr(SCL_PIN);//测试 +// gpio_pin_clr(SCL_PIN);//测试 return 1;//返回发送成功标志 } @@ -566,7 +566,7 @@ } // LOG_INFO(TRACE_MODULE_APP,"超时定时器:%x,%x,%x\r\n",start_receive_count,end_receive_count,current_count); - gpio_pin_clr(SCL_PIN);//测试 +// gpio_pin_clr(SCL_PIN);//测试 return 0;//返回绑定失败标志 } //} -- Gitblit v1.9.3