Skip to main content

Module config

Module config 

Source
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§

LoraModulation
The LoRa modem settings of a link, as RegModemConfig1 to 3 and the SF6 detection registers carry them.
SpuriousReception
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§

LoraBandwidth
A LoRa signal bandwidth, the Bw bits of RegModemConfig1.
ModulationError
Why a link’s settings cannot be put on an SX127x.
PaOutput
Which amplifier output a module wires to its antenna, from Table 33.
SyncWord
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.