| | |
| | | |
| | | return rx_timestamp; |
| | | } |
| | | |
| | | int8_t rssi_temp; |
| | | /* RX done process handler. */ |
| | | static void rx_int_callback(struct MAC_HW_REPORT_T *rx_report) |
| | | { |
| | |
| | | temp_count1=phy_timer_count_get(); |
| | | //获取发射端时钟偏差 |
| | | resp_rx_num++; |
| | | rssi_temp = rx_report->rssi; |
| | | freq_offset=phy_freq_offset_get(); |
| | | |
| | | // freq_offset_filter=average_filter(freq_offset);//获取频偏 |
| | |
| | | ranging_frame_type_set(config.phy_cfg.sts_pkt_cfg); |
| | | |
| | | } |
| | | |
| | | int sleep_time_step=SLEEP_COUNT; |
| | | int TagRange(void) |
| | | { |
| | | phy_timer_open(1, IRQ_PRIORITY_HIGH); |
| | |
| | | // #endif |
| | | }else if(receive_flag==2){//接收出错 |
| | | receive_flag=0; |
| | | sleep_timer_start(__MS_TO_32K_CNT(sleep_time_count-phy_timer_count_get()%10));//测试 |
| | | sleep_timer_start(__MS_TO_32K_CNT(SLEEP_COUNT-phy_timer_count_get()%30));//测试 |
| | | sleep_time_step=SLEEP_COUNT-phy_timer_count_get()%10; |
| | | tempflag=uwb_rx(0, 0, RESP_RX_TIMEOUT_US);//立即开启接受并设置0超时 |
| | | temp_count3=phy_timer_count_get(); |
| | | // while(mac_is_busy()); |