WXK
2023-11-21 d8dd7c6e256bc607904ef1c1b1a36471c99db873
Src/application/dw_ancapp.c
@@ -229,19 +229,21 @@
//               result = dwt_starttx(DWT_START_TX_DELAYED);
////               uwb_timeout = 0;
//               if(result == 0)
//               {
             uwb_timeout=lp_time;
               while (!((status_reg = dwt_read32bitreg(SYS_STATUS_ID)) & (SYS_STATUS_TXFRS | SYS_STATUS_ALL_RX_ERR)))///不断查询芯片状态直到接收成功或者出现错误
               while (!((status_reg = dwt_read32bitreg(SYS_STATUS_ID)) & SYS_STATUS_TXFRS ))///不断查询芯片状态直到接收成功或者出现错误
         {
                        current_time=HAL_LPTIM_ReadCounter(&hlptim1);
        if(current_time>end_time+((32768/1000)*3)/*||current_time<end_time+15000*/)
        {
//        printf("debug2 timec:%d timee:%d\r\n",current_time,end_time);
        break;}
//                        current_time=HAL_LPTIM_ReadCounter(&hlptim1);
//        if(current_time>end_time+((32768/1000)*3)||current_time<end_time+15000)
//        {
////        printf("debug2 timec:%d timee:%d\r\n",current_time,end_time);
//        break;}
                    if(lp_time-uwb_timeout>2)
                        break;
            };
            dwt_rxenable(0);
//        }
//            dwt_rxenable(0);
}