Expand description
The settings an SX127x is configured with in LoRa mode, and the values its registers take.
Every value comes from the SX1276/77/78/79 datasheet (Rev 7): the carrier word of RegFrf,
the bandwidth, coding rate, spreading factor, header, CRC, and low data rate settings of
RegModemConfig1 to 3, the amplifier modes of Tables 33 and 34, the current limit of
Table 37, the SF6 detection settings, and the sync word. Two sets of values follow
Semtech’s LoRaMac-node reference driver instead, and say so where they are defined: the
IQ polarity bit of the transmit path, which the datasheet describes the wrong way round,
and the register writes of the errata for 500 kHz sensitivity and spurious reception.
The LoRa settings are built from a [LinkSettings], so a radio sends exactly the frames
pamoja-lora computes the airtime of.
Structs§
- Lora
Modulation - The LoRa modem settings of a link, as RegModemConfig1 to 3 and the SF6 detection registers carry them.
- Spurious
Reception - The receive settings of erratum 2.3, receiver spurious reception of a LoRa signal.
- TxPower
- The amplifier settings that produce an output power: RegPaConfig, RegPaDac, and RegOcp.
Enums§
- Lora
Bandwidth - A LoRa signal bandwidth, the Bw bits of RegModemConfig1.
- Modulation
Error - Why a link’s settings cannot be put on an SX127x.
- PaOutput
- Which amplifier output a module wires to its antenna, from Table 33.
- Sync
Word - A LoRa sync word, written to RegSyncWord.
Constants§
- DIO0_
CAD_ DONE - RegDioMapping1 with DIO0 signaling CadDone.
- DIO0_
RX_ DONE - RegDioMapping1 with DIO0 signaling RxDone, from Table 18.
- DIO0_
TX_ DONE - RegDioMapping1 with DIO0 signaling TxDone.
- IMAGE_
CAL_ RUNNING - RegImageCal bit 5: set while a calibration runs.
- IMAGE_
CAL_ START - RegImageCal bit 6: starts an image and RSSI calibration.
- LNA_
BOOSTED - RegLna with the maximum gain and the 150% LNA current of the high frequency port, which LoRaMac-node sets at startup; with AgcAutoOn the gain is the AGC’s.
- LOW_
BAND_ TOP_ HZ - The top of the lowest band, 137 to 175 MHz, where the 250 and 500 kHz bandwidths are not supported.
- MODEM_
CONFIG_ 3_ AGC_ AUTO_ ON - RegModemConfig3 bit 2: the LNA gain comes from the automatic gain control.
- PA_
DAC_ DEFAULT - RegPaDac at its reset value.
- PA_
DAC_ HIGH_ POWER - RegPaDac with the +20 dBm setting of Table 34 on PA_BOOST.
- SYMBOL_
TIMEOUT_ MAX - The longest single reception timeout RegModemConfig2 and RegSymbTimeoutLsb hold, in symbols.
- SYMBOL_
TIMEOUT_ MIN - The shortest single reception timeout the datasheet allows, in symbols.
- TCXO_
INPUT_ ON - RegTcxo with TcxoInputOn set, for a module clocked by a TCXO on XTA.
- XTAL_HZ
- The crystal frequency the synthesizer divides, in hertz.
Functions§
- automatic_
if - Returns RegDetectOptimize with AutomaticIFOn as erratum 2.3 wants it.
- frequency_
bytes - Returns the three bytes written to RegFrfMsb, RegFrfMid, and RegFrfLsb for a frequency.
- frequency_
from_ word - Returns the frequency a RegFrf word selects.
- frequency_
word - Returns the 24-bit RegFrf word for a frequency.
- high_
bw_ optimize - RegHighBwOptimize1 and, where it changes, RegHighBwOptimize2 for a bandwidth.
- image_
cal_ start - Returns RegImageCal to start a calibration.
- invert_
iq - Returns RegInvertIQ for the IQ polarity of each path.
- invert_
iq_ 2 - Returns RegInvertIQ2, which the chip needs set to 0x19 while a path is inverted.
- ocp_
register - Returns RegOcp for a current limit, from Table 37.
- preamble_
bytes - Returns RegPreambleMsb and RegPreambleLsb for a link.
- spurious_
reception - Returns the receive settings of erratum 2.3 for a bandwidth, as Semtech’s LoRaMac-node applies them.
- symbol_
timeout - Returns the single reception timeout for a duration, in the link’s symbols.