| | |
| | | { |
| | | UWB_Wkup(); |
| | | MbxTagUwbRec(); |
| | | HAL_GPIO_WritePin(RADIO_NSS_GPIO_Port, RADIO_NSS_Pin, GPIO_PIN_RESET); //片选lora有效 |
| | | HAL_GPIO_WritePin(RADIO_NSS_GPIO_Port, RADIO_NSS_Pin, GPIO_PIN_RESET); //片选lora有效 |
| | | Radio.Rx(0); |
| | | } |
| | | if(RX_Buffer[MSG_TYPE_IDX]==LORA_MSGTYPE_WGRESPTAG) |
| | | { |
| | |
| | | } |
| | | } |
| | | } |
| | | } |
| | | if(!no_rx_flag) |
| | | { |
| | | if(lora_jianting_flag&&LoraUp_flag==0) |
| | |
| | | Radio.Rx(0); |
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | void OnTxTimeout( void ) |
| | |
| | | void OnRxTimeout( void ) |
| | | { |
| | | Radio.Standby(); |
| | | if(wg_state==WG_Lost) |
| | | |
| | | { |
| | | current_count = HAL_LPTIM_ReadCounter(&hlptim1); |
| | | target_count-=current_count%3276; |
| | | // current_count = HAL_LPTIM_ReadCounter(&hlptim1); |
| | | // target_count-=current_count%3276; |
| | | target_count-=66;//提前2ms发lora |
| | | while(target_count<0) |
| | | target_count+=32768; |
| | | __HAL_LPTIM_COMPARE_SET(&hlptim1, target_count); |