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
- LoRa modulation basics (dropbox PDF)
- OpenLoRa forum
History
run on mbed-6
2020-07-10, by Wayne Roberts [Fri, 10 Jul 2020 09:23:52 -0700] rev 36
run on mbed-6
add PA test register address
2018-11-25, by Wayne Roberts [Sun, 25 Nov 2018 13:34:04 -0800] rev 35
add PA test register address
add missing register
2018-08-10, by Wayne Roberts [Fri, 10 Aug 2018 13:48:48 -0700] rev 34
add missing register
rename sx127x.h to sx12xx.h to permit drop in replacement with sx126x driver
2018-05-22, by Wayne Roberts [Tue, 22 May 2018 15:54:02 -0700] rev 33
rename sx127x.h to sx12xx.h to permit drop in replacement with sx126x driver
add newline to end of file
2018-03-19, by Wayne Roberts [Mon, 19 Mar 2018 14:23:03 -0700] rev 32
add newline to end of file
correct lora rssi offset for sx1272
2017-08-10, by dudmuck [Thu, 10 Aug 2017 14:48:30 -0700] rev 31
correct lora rssi offset for sx1272
check rf_switch callback is non-null before calling
2017-04-21, by dudmuck [Fri, 21 Apr 2017 14:54:24 -0700] rev 30
check rf_switch callback is non-null before calling
change FunctionPointer to Callback and fix constructor order
2017-04-20, by dudmuck [Thu, 20 Apr 2017 11:14:00 -0700] rev 29
change FunctionPointer to Callback and fix constructor order
FSK modem service: remove check for RX mode, because it runs if not TX
2016-08-31, by dudmuck [Wed, 31 Aug 2016 23:54:04 +0000] rev 28
FSK modem service: remove check for RX mode, because it runs if not TX
hw_reset working under pullup condition. PLL registers defined. PaRamp register defined. FSK modulation shaping supported. FSK continuous TX mode supporting DIO0 high level.
2016-07-28, by dudmuck [Thu, 28 Jul 2016 00:57:22 +0000] rev 27
hw_reset working under pullup condition. PLL registers defined. PaRamp register defined. FSK modulation shaping supported. FSK continuous TX mode supporting DIO0 high level.