Driver library for SX1272/SX1276 transceivers

Dependents:   LORA_RX LORA_TX WindConcentrator hid_test ... more


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.


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

Revisions of sx127x_lora.cpp

Revision Date Message Actions
31:b66d7a057b22 2017-08-10 correct lora rssi offset for sx1272 File  Diff  Annotate
27:da6341d9d5b1 2016-07-28 hw_reset working under pullup condition. PLL registers defined. PaRamp register defined. FSK modulation shaping supported. FSK continuous TX mode supporting DIO0 high level. File  Diff  Annotate
26:4876e515ff4c 2016-07-18 FSK/OOK TX shutdown time corrected on PacketSent event. File  Diff  Annotate
23:1df3dddcb43e 2015-10-20 added lora function to read background signal strength File  Diff  Annotate
19:1ee6ef1ab73f 2015-06-02 improve frequency error tolerance of sx1276 at 500KHz BW. File  Diff  Annotate
18:0ecb6adb7c0b 2015-06-02 sx1276 optimization for frequency error with 500KHz bw File  Diff  Annotate
17:59279bc8cdab 2015-05-27 added support for LoRa inverted spectrum File  Diff  Annotate
16:3de8e1c465eb 2015-05-21 added lora function to set bandwidth in KHz File  Diff  Annotate
15:3f3fc6792f97 2015-05-14 added lora function to get frequency error. Added definition for RX invert_IQ. File  Diff  Annotate
13:1953e70522aa 2015-04-17 lora start_rx: start receiver sooner. File  Diff  Annotate
12:bda42457c34a 2015-04-13 fsk.enable: add option for fast mode switch File  Diff  Annotate
10:7382c260c4b1 2015-02-27 added get_symbol_duration() to determine if LowDataRateOptimize should be used File  Diff  Annotate
9:ae1a71ccd730 2015-02-26 m_xcvr in modem classes made public File  Diff  Annotate
8:c9592cbc9f86 2015-02-18 fixed error in setSf() for SX1276 File  Diff  Annotate
7:927a05f84ede 2015-02-09 added rf_switch callback for board-specific RF front-end implementation. File  Diff  Annotate
6:5d94ee847016 2014-06-30 moved RF switch (femcps/femctx) control to set_opmode() File  Diff  Annotate
4:d987ac2836bf 2014-05-02 fixed FSK AFC File  Diff  Annotate
3:3bf2515b1eed 2014-05-02 brought fsk to functioning File  Diff  Annotate
2:fdae76e1215e 2014-04-30 separated LoRa code from FSK code from common code File  Diff  Annotate