Skip to content

Commit 3c6c24b

Browse files
committed
Issue #1013 - Added radio image calibration enforcement after radio initialization and radio sleep cold start.
1 parent ad5aba3 commit 3c6c24b

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/radio/sx126x/sx126x.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,9 @@ void SX126xInit( DioIrqHandler dioIrq )
125125
// Initialize RF switch control
126126
SX126xIoRfSwitchInit( );
127127

128+
// Force image calibration
129+
ImageCalibrated = false;
130+
128131
SX126xSetOperatingMode( MODE_STDBY_RC );
129132
}
130133

@@ -255,6 +258,12 @@ void SX126xSetSleep( SleepParams_t sleepConfig )
255258
uint8_t value = ( ( ( uint8_t )sleepConfig.Fields.WarmStart << 2 ) |
256259
( ( uint8_t )sleepConfig.Fields.Reset << 1 ) |
257260
( ( uint8_t )sleepConfig.Fields.WakeUpRTC ) );
261+
262+
if( sleepConfig.Fields.WarmStart == 0 )
263+
{
264+
// Force image calibration
265+
ImageCalibrated = false;
266+
}
258267
SX126xWriteCommand( RADIO_SET_SLEEP, &value, 1 );
259268
SX126xSetOperatingMode( MODE_SLEEP );
260269
}

0 commit comments

Comments
 (0)