Skip to content

Commit 492ee5d

Browse files
committed
Fixed REG_LR_SYNCH_TIMEOUT register write to only happen when symbNum is different from 0
1 parent acbb99f commit 492ee5d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

src/radio/sx126x/sx126x.c

+5-2
Original file line numberDiff line numberDiff line change
@@ -370,8 +370,11 @@ void SX126xSetLoRaSymbNumTimeout( uint8_t symbNum )
370370
reg = mant << ( 2 * exp + 1 );
371371
SX126xWriteCommand( RADIO_SET_LORASYMBTIMEOUT, &reg, 1 );
372372

373-
reg = exp + ( mant << 3 );
374-
SX126xWriteRegister( REG_LR_SYNCH_TIMEOUT, reg );
373+
if( symbNum != 0 )
374+
{
375+
reg = exp + ( mant << 3 );
376+
SX126xWriteRegister( REG_LR_SYNCH_TIMEOUT, reg );
377+
}
375378
}
376379

377380
void SX126xSetRegulatorMode( RadioRegulatorMode_t mode )

0 commit comments

Comments
 (0)