impliment datasheet errata note

Some of the default settings of the LoRa modem should be manually modified to optimize the sensitivity of the product when the bandwidth is set to 500 kHz.
This commit is contained in:
AlessandroAU 2020-06-16 03:04:47 +10:00
parent a14c82708f
commit f01768f464

View File

@ -103,6 +103,16 @@ void SX1276_ConfigModem1(uint8_t bandwidth, uint8_t coding_rate, bool implicit_h
data = data | implicit_header_mode;
SX1276_WriteReg(SX1276_1D_MODEMCONFIG1, data);
if (bandwidth == SX1276_MODEM_CONFIG1_BW_500KHZ) //datasheet errata reconmendation http://caxapa.ru/thumbs/972894/SX1276_77_8_ErrataNote_1.1_STD.pdf
{
SX1276_WriteReg(0x36, 0x02);
SX1276_WriteReg(0x3a, 0x64);
}
else
{
SX1276_WriteReg(0x36, 0x03);
}
}
void SX1276_ConfigModem2(uint8_t spreading_factor, bool tx_continuous_mode, bool rx_payload_crc_on)