| | |
| | | target_count = current_count + rec_delaytime*3.2768 - delaytime; |
| | | while(target_count>=32768) |
| | | target_count-=32768; |
| | | // __HAL_LPTIM_COMPARE_SET(&hlptim1, target_count); |
| | | __HAL_LPTIM_COMPARE_SET(&hlptim1, target_count); |
| | | rx_count = HAL_LPTIM_ReadCounter(&hlptim1); |
| | | // printf("tx %d,rx %d,delay %d",current_count>>5,rx_count>>5,rec_delaytime); |
| | | break; |
| | |
| | | target_count-=current_count%3276; |
| | | while(target_count<0) |
| | | target_count+=32768; |
| | | // __HAL_LPTIM_COMPARE_SET(&hlptim1, target_count); |
| | | __HAL_LPTIM_COMPARE_SET(&hlptim1, target_count); |
| | | SwitchLoraSettings(UWB_CHANNEL_FRQ+g_com_map[GROUP_ID],UWB_CHANNEL_SF,0); |
| | | Radio.Rx(0); |
| | | } |