From 11e279420324ddd19266d58be21d1abdfc927ea7 Mon Sep 17 00:00:00 2001 From: yincheng.zhong <634916154@qq.com> Date: 星期四, 07 三月 2024 16:19:31 +0800 Subject: [PATCH] V1.9 调整同步信号,提前5ms接收,超时时间增加5ms,同步更稳定 --- Src/radio/radio.c | 12 ++++++++---- 1 files changed, 8 insertions(+), 4 deletions(-) diff --git a/Src/radio/radio.c b/Src/radio/radio.c index b9ac3ce..59ed602 100644 --- a/Src/radio/radio.c +++ b/Src/radio/radio.c @@ -500,19 +500,23 @@ // ERROR: Value not found while( 1 ); } - +uint16_t tt2[10]; void RadioInit( RadioEvents_t *events ) { RadioEvents = events; - + tt2[0] = HAL_LPTIM_ReadCounter(&hlptim1); SX126xInit( RadioOnDioIrq ); + tt2[1] = HAL_LPTIM_ReadCounter(&hlptim1); SX126xSetStandby( STDBY_RC ); + tt2[2] = HAL_LPTIM_ReadCounter(&hlptim1); SX126xSetRegulatorMode( USE_DCDC ); - + tt2[3] = HAL_LPTIM_ReadCounter(&hlptim1); SX126xSetBufferBaseAddress( 0x00, 0x00 ); + tt2[4] = HAL_LPTIM_ReadCounter(&hlptim1); SX126xSetTxParams( 0, RADIO_RAMP_200_US ); + tt2[5] = HAL_LPTIM_ReadCounter(&hlptim1); SX126xSetDioIrqParams( IRQ_RADIO_ALL, IRQ_RADIO_ALL, IRQ_RADIO_NONE, IRQ_RADIO_NONE ); - + tt2[6] = HAL_LPTIM_ReadCounter(&hlptim1); //Initialize driver timeout timers //TimerInit( &TxTimeoutTimer, RadioOnTxTimeoutIrq ); //TimerInit( &RxTimeoutTimer, RadioOnRxTimeoutIrq ); -- Gitblit v1.9.3