| | |
| | | } |
| | | sync_interval_count = 0; |
| | | flag_sync_success = 0; |
| | | SwitchLoraToSyncRec(SYNC_CHANNEL_FRQ,7); //切换lora接收频点//因为是从lorasleep唤醒的,可能这里会用的时间多,需要考虑 |
| | | SwitchLoraSettings(SYNC_CHANNEL_FRQ,7); //切换lora接收频点//因为是从lorasleep唤醒的,可能这里会用的时间多,需要考虑 |
| | | |
| | | start_count=HAL_LPTIM_ReadCounter(&hlptim1); //等待接收完成直到超时 |
| | | poll_timeout=sync_listen_ms*10; //单位0.1ms |
| | |
| | | if(end_count>=32768) |
| | | {end_count-=32768;} |
| | | current_count=HAL_LPTIM_ReadCounter(&hlptim1); |
| | | |
| | | SetFlagLoraWaitSync(0); |
| | | Radio.Rx(5000); |
| | | while(GetFlagLoraWaitSync()) |
| | | { |
| | | current_count=HAL_LPTIM_ReadCounter(&hlptim1); |