Skip to content

Commit e1a1a66

Browse files
committed
Fix register corruption due to colliding SPI transactions in FSK
In FSK Tx, the Dio1 interrupt may already fire while the SPI transaction for SetOpMode is still in progress. This leads to registers 0x02 and further being overwritten with junk data. This is solved by disabling interrupts for this specific SetOpMode call.
1 parent 3bed4dd commit e1a1a66

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/radio/sx1276/sx1276.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1125,7 +1125,9 @@ static void SX1276SetTx( uint32_t timeout )
11251125

11261126
SX1276.Settings.State = RF_TX_RUNNING;
11271127
TimerStart( &TxTimeoutTimer );
1128+
CRITICAL_SECTION_BEGIN();
11281129
SX1276SetOpMode( RF_OPMODE_TRANSMITTER );
1130+
CRITICAL_SECTION_END();
11291131
}
11301132

11311133
void SX1276StartCad( void )

0 commit comments

Comments
 (0)