Driver library for SX1272/SX1276 transceivers

Dependents:   LORA_RX LORA_TX mote_dual_radio WindConcentrator ... 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

Files at this revision

API Documentation at this revision

Comitter:
Wayne Roberts
Date:
Fri Aug 10 13:48:48 2018 -0700
Parent:
33:4b9fd8969428
Commit message:
add missing register

Changed in this revision

sx127x_fsk.h Show annotated file Show diff for this revision Revisions of this file
--- a/sx127x_fsk.h	Tue May 22 15:54:02 2018 -0700
+++ b/sx127x_fsk.h	Fri Aug 10 13:48:48 2018 -0700
@@ -128,6 +128,16 @@
 } RegOokPeak_t; // DEMOD1 0x14
 
 typedef union {
+    struct {    // sx1272 register 0x16
+        uint8_t OokAverageThreshFilt : 2; // 0,1
+        uint8_t OokAverageOffset     : 2; // 2,3
+        uint8_t reserved             : 1; // 4
+        uint8_t OokPeakThreshDec     : 3; // 5,6,7
+    } bits;
+    uint8_t octet;
+} RegOokAvg_t; // at 0x16
+
+typedef union {
     struct {    // sx1272 register 0x1f
         uint8_t PreambleDetectorTol  : 5;   // 0,1,2,3,4    allowed chip errors
         uint8_t PreambleDetectorSize    : 2;    // 5,6    00b=1bytes... 11b=4bytes