Driver library for SX1272/SX1276 transceivers

Dependents:   LORA_RX LORA_TX WindConcentrator hid_test ... more

/media/uploads/dudmuck/lora.png

Driver library for SX1272 and SX1276 radio transceivers.

This device uses CSS modulation to provide much improved link budget. The RF hardware is same as in FSK devices, just with added LoRa spread-spectrum modem.

This library provides functions to configure radio chip and transmit & receive packets.

Using This Library

Library function service_radio() must be called continuously from main loop, to service interrupts from radio.

/media/uploads/dudmuck/sx1272rf1_connector_300.jpg

Board Specific implementation

FunctionPointer for rf_switch callback allows the program to implement control of RF switch unique to their board. Example options are:

  • SKY13373 for external power amplifier implementation. Requires two DigitalOut pins.
  • SKY13350 using PA_BOOST. requires two DigitalOut pins.
  • PE4259-63: controlled directly by radio chip, no software function needed. However, in the case of SX1276MB1xAS, the RXTX pin on IO2 should be driven by this callback function when R16 is installed (without R15) on this shield board.

Some configurations may need to force the use of RFO or PA_BOOST, or a board could offer both options. The rf_switch function pointer callback should support the implementation choice on the board.

further reading

Revision:
19:1ee6ef1ab73f
Parent:
18:0ecb6adb7c0b
Child:
23:1df3dddcb43e
--- a/sx127x_lora.h	Tue Jun 02 01:25:47 2015 +0000
+++ b/sx127x_lora.h	Tue Jun 02 17:09:19 2015 +0000
@@ -207,7 +207,7 @@
          */
         void start_tx(uint8_t len);
         
-        /** start receive mode
+        /** start continuous receive mode
          * @note the variable service_action needs to be monitored to indicate read_fifo() needs to be called to pull packet from FIFO.
          */
         void start_rx(void);
@@ -287,8 +287,11 @@
         RegModemConfig3_t   RegModemConfig3;        // 0x26
         RegTest31_t         RegTest31;              // 0x31
         RegTest33_t         RegTest33;              // 0x33
+        RegAutoDrift_t      RegAutoDrift;           // 0x36  sx1276 only
+        RegGainDrift_t      RegGainDrift;           // 0x3a
         RegDriftInvert_t    RegDriftInvert;         // 0x3b
         
+        
         SX127x& m_xcvr;
 
     private: