From f01768f46424875af35db20dde373ee529fc7a7f Mon Sep 17 00:00:00 2001 From: AlessandroAU Date: Tue, 16 Jun 2020 03:04:47 +1000 Subject: [PATCH] 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. --- Multiprotocol/SX1276_SPI.ino | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/Multiprotocol/SX1276_SPI.ino b/Multiprotocol/SX1276_SPI.ino index 41a2cb2..c576d40 100644 --- a/Multiprotocol/SX1276_SPI.ino +++ b/Multiprotocol/SX1276_SPI.ino @@ -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)