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.cpp

Revision Date Message Actions
36:af9b41b1e285 18 months ago run on mbed-6 File  Diff  Annotate
33:4b9fd8969428 2018-05-22 rename sx127x.h to sx12xx.h to permit drop in replacement with sx126x driver File  Diff  Annotate
30:da4ea47f552a 2017-04-21 check rf_switch callback is non-null before calling File  Diff  Annotate
29:b72ac28d59e9 2017-04-20 change FunctionPointer to Callback and fix constructor order 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
25:fa867fb9d2f6 2015-10-22 fixed typo File  Diff  Annotate
24:cad6e7ce6928 2015-10-22 LnaBoostHF defaults to hi-gain, FSK optimzation for preamble detector File  Diff  Annotate
10:7382c260c4b1 2015-02-27 added get_symbol_duration() to determine if LowDataRateOptimize should be used 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
2:fdae76e1215e 2014-04-30 separated LoRa code from FSK code from common code File  Diff  Annotate
1:7dc60eb4c7ec 2014-04-14 added read/write functions for USB HID application File  Diff  Annotate
0:27aa8733f85d 2014-03-26 initial commit of library driver for SX1272/SX1276 File  Diff  Annotate