You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, when using sx1276 in FSK mode and calling Radio.Sleep() function it stops two timers:
void SX1276SetSleep( void )
{
TimerStop( &RxTimeoutTimer );
TimerStop( &TxTimeoutTimer );
SX1276SetOpMode( RF_OPMODE_SLEEP );
// Disable TCXO radio is in SLEEP mode
SX1276SetBoardTcxo( false );
SX1276.Settings.State = RF_IDLE;
}
But not RxTimeoutSyncWord timer.
In case if radio was in receiving mode before sleep, and we start anoter transmission before RxTimeoutSyncWord exceeds by calling Radio.Send(), we have unwanted interrupt SX1276OnTimeoutIrq(). This interrupt is caused by not stopped RxTimeoutSyncWord timer. The code inside Irq handler fully reset the chip:
case RF_TX_RUNNING:
// Tx timeout shouldn't happen.
// But it has been observed that when it happens it is a result of a corrupted SPI transfer
// it depends on the platform design.
//
// The workaround is to put the radio in a known state. Thus, we re-initialize it.
// BEGIN WORKAROUND
// Reset the radio
SX1276Reset( );
// Calibrate Rx chain
RxChainCalibration( );
// Initialize radio default values
SX1276SetOpMode( RF_OPMODE_SLEEP );
for( uint8_t i = 0; i < sizeof( RadioRegsInit ) / sizeof( RadioRegisters_t ); i++ )
{
SX1276SetModem( RadioRegsInit[i].Modem );
SX1276Write( RadioRegsInit[i].Addr, RadioRegsInit[i].Value );
}
SX1276SetModem( MODEM_FSK );
// Restore previous network type setting.
SX1276SetPublicNetwork( SX1276.Settings.LoRa.PublicNetwork );
// END WORKAROUND
Hi, when using sx1276 in FSK mode and calling Radio.Sleep() function it stops two timers:
But not RxTimeoutSyncWord timer.
In case if radio was in receiving mode before sleep, and we start anoter transmission before RxTimeoutSyncWord exceeds by calling Radio.Send(), we have unwanted interrupt SX1276OnTimeoutIrq(). This interrupt is caused by not stopped RxTimeoutSyncWord timer. The code inside Irq handler fully reset the chip:
This code solve the problem:
The text was updated successfully, but these errors were encountered: