I made a fork of a generic library that was developed with support for RFM95 LoRa module that I found online. I Made a few changes and made it compatible with hardware limitations of the MAX32620FTHR and MAX32630FTHR module.
Dependents: MAX326xxFTHR_LoRa_RFM95 MAX326xxFTHR_LoRa_PingPong MAX326xxFTHR_RFM95_LoRa_PingPong MAX326xxFTHR_LoRa_RFM95_PingPong_Example ... more
Fork of SX1276GenericLib by
Diff: sx1276/sx1276-mbed-hal.cpp
- Revision:
- 43:90de42f3c1fd
- Parent:
- 42:72deced1a4c4
diff -r 72deced1a4c4 -r 90de42f3c1fd sx1276/sx1276-mbed-hal.cpp --- a/sx1276/sx1276-mbed-hal.cpp Mon May 08 22:52:31 2017 +0200 +++ b/sx1276/sx1276-mbed-hal.cpp Tue May 09 11:19:51 2017 +0200 @@ -138,8 +138,10 @@ void SX1276Generic::IoInit( void ) { - if (_tcxo) + if (_tcxo) { *_tcxo = 1; + wait_ms(TCXO_STARTUP_MS); + } AntSwInit( ); SpiInit( ); } @@ -306,6 +308,15 @@ void SX1276Generic::SetAntSw( uint8_t opMode ) { + /* + * Note that the Mode RFLR (LoRa) and Mode RF are using identical + * values. Unfortunately booth representations are being used. + */ + if (_tcxo && *_tcxo == 0 && opMode != RFLR_OPMODE_SLEEP) { + *_tcxo = 1; + wait_ms(TCXO_STARTUP_MS); + } + switch( opMode ) { case RFLR_OPMODE_TRANSMITTER: @@ -329,10 +340,12 @@ *_antSwitchTXBoost = 0; } else { if (_antSwitch) - _antSwitch = 0; + *_antSwitch = 0; } break; case RFLR_OPMODE_SLEEP: + if (_tcxo) + *_tcxo = 0; case RFLR_OPMODE_STANDBY: default: if (boardConnected == MURATA_SX1276) {