 |
SX126x-Arduino
2.0.1
|
Go to the documentation of this file.
34 #define RADIO_TCXO_SETUP_TIME 50 // [ms]
39 #define RADIO_WAKEUP_TIME 3 // [ms]
44 #define AUTO_RX_TX_OFFSET 2
49 #define CRC_IBM_SEED 0xFFFF
54 #define CRC_CCITT_SEED 0x1D0F
59 #define CRC_POLYNOMIAL_IBM 0x8005
64 #define CRC_POLYNOMIAL_CCITT 0x1021
70 #define REG_LR_CRCSEEDBASEADDR 0x06BC
75 #define REG_LR_CRCPOLYBASEADDR 0x06BE
80 #define REG_LR_WHITSEEDBASEADDR_MSB 0x06B8
81 #define REG_LR_WHITSEEDBASEADDR_LSB 0x06B9
86 #define REG_LR_PACKETPARAMS 0x0704
91 #define REG_LR_PAYLOADLENGTH 0x0702
96 #define REG_LR_SYNCWORDBASEADDRESS 0x06C0
101 #define REG_LR_SYNCWORD 0x0740
106 #define LORA_MAC_PRIVATE_SYNCWORD 0x1424
111 #define LORA_MAC_PUBLIC_SYNCWORD 0x3444
116 #define RANDOM_NUMBER_GENERATORBASEADDR 0x0819
121 #define REG_RX_GAIN 0x08AC
126 #define REG_XTA_TRIM 0x0911
131 #define REG_OCP 0x08E7
552 uint16_t PreambleLength;
554 uint8_t PayloadLength;
679 #define XTAL_FREQ (double)32000000
680 #define FREQ_DIV (double)pow(2.0, 25.0)
681 #define FREQ_STEP (double)(XTAL_FREQ / FREQ_DIV)
683 #define RX_BUFFER_SIZE 256
691 void (*txDone)(void);
692 void (*rxDone)(void);
693 void (*rxPreambleDetect)(void);
694 void (*rxSyncWordDone)(void);
695 void (*rxHeaderDone)(
bool isOk);
696 void (*txTimeout)(void);
697 void (*rxTimeout)(void);
699 void (*cadDone)(
bool cadFlag);
923 void SX126xSetPaConfig(uint8_t paDutyCycle, uint8_t hpMax, uint8_t deviceSel, uint8_t paLut);
976 void SX126xSetDioIrqParams(uint16_t irqMask, uint16_t dio1Mask, uint16_t dio2Mask, uint16_t dio3Mask);
1117 #endif // __SX126x_H__
RadioModShapings_t ModulationShaping
Definition: sx126x.h:512
int8_t SX126xGetRssiInst(void)
Returns the instantaneous RSSI value for the last packet received.
Definition: sx126x.cpp:658
@ IRQ_RX_TX_TIMEOUT
Definition: sx126x.h:448
void SX126xSetTx(uint32_t timeout)
Sets the radio in transmission mode.
Definition: sx126x.cpp:257
uint8_t AdcCalib
ADC calibration failed.
Definition: sx126x.h:638
@ LORA_SF11
Definition: sx126x.h:301
uint8_t CmdStatus
Command status.
Definition: sx126x.h:141
@ RADIO_GET_STATUS
Definition: sx126x.h:457
@ IRQ_TX_DONE
Definition: sx126x.h:439
@ IRQ_RADIO_NONE
Definition: sx126x.h:438
@ LORA_CAD_04_SYMBOL
Definition: sx126x.h:235
@ PACKET_TYPE_LORA
Definition: sx126x.h:209
@ RADIO_CLR_ERROR
Definition: sx126x.h:492
@ RX_BW_7300
Definition: sx126x.h:269
RadioStandbyModes_t
Declares the oscillator in use while in standby mode.
Definition: sx126x.h:186
@ RADIO_GET_RSSIINST
Definition: sx126x.h:482
@ IRQ_CAD_DONE
Definition: sx126x.h:446
@ RADIO_CRC_1_BYTES_INV
Definition: sx126x.h:372
Represents a sleep mode configuration.
Definition: sx126x.h:618
RadioLoRaCadSymbols_t
Represents the number of symbols to be used for channel activity detection operation.
Definition: sx126x.h:232
@ MODE_FS
The radio is in standby mode with XOSC oscillator.
Definition: sx126x.h:172
void SX126xSetOperatingMode(RadioOperatingModes_t mode)
Sets/Updates the current Radio OperationMode variable.
Definition: sx126x.cpp:119
@ RADIO_CRC_2_BYTES_CCIT
Definition: sx126x.h:375
RadioIrqMasks_t
Represents the interruption masks available for the radio.
Definition: sx126x.h:437
RadioPacketTypes_t PacketType
Packet to which the modulation parameters are referring to.
Definition: sx126x.h:505
uint8_t Reserved
Reserved.
Definition: sx126x.h:140
@ LORA_BW_020
Definition: sx126x.h:316
RadioTcxoCtrlVoltage_t
Represents the voltage used to control the TCXO on/off from DIO3.
Definition: sx126x.h:420
void SX126xSetStopRxTimerOnPreambleDetect(bool enable)
Decide which interrupt will stop the internal radio rx timer.
Definition: sx126x.cpp:325
@ MOD_SHAPING_G_BT_03
Definition: sx126x.h:256
@ RADIO_SET_TXPARAMS
Definition: sx126x.h:474
@ LORA_SF9
Definition: sx126x.h:299
@ RADIO_GET_RXBUFFERSTATUS
Definition: sx126x.h:480
uint8_t Rc13mCalib
RC 13MHz oscillator calibration failed.
Definition: sx126x.h:636
@ RX_BW_467000
Definition: sx126x.h:287
@ LORA_CRC_ON
CRC activated.
Definition: sx126x.h:403
@ LORA_PACKET_VARIABLE_LENGTH
The packet is on variable size, header included.
Definition: sx126x.h:392
@ LORA_CR_4_8
Definition: sx126x.h:330
@ LORA_PACKET_IMPLICIT
Definition: sx126x.h:395
@ RADIO_CALIBRATE
Definition: sx126x.h:488
@ LORA_CAD_RX
Definition: sx126x.h:246
uint32_t BitRate
Definition: sx126x.h:510
@ RADIO_ADDRESSCOMP_FILT_NODE_BROAD
Definition: sx126x.h:352
@ RADIO_GET_IRQSTATUS
Definition: sx126x.h:486
RadioLoRaIQModes_t
Represents the IQ mode for LoRa packet type.
Definition: sx126x.h:411
@ IRQ_SYNCWORD_VALID
Definition: sx126x.h:442
@ TCXO_CTRL_1_8V
Definition: sx126x.h:423
@ MOD_SHAPING_G_BT_07
Definition: sx126x.h:258
int BUSY
Definition: sx126x.h:655
@ LORA_CRC_OFF
CRC not used.
Definition: sx126x.h:404
int8_t SnrPkt
The SNR of the last packet.
Definition: sx126x.h:579
RadioRxBandwidth_t
Represents the modulation shaping parameter.
Definition: sx126x.h:266
int Spi
Definition: sx126x.h:659
@ RADIO_RESET_STATS
Definition: sx126x.h:484
@ RADIO_SET_FS
Definition: sx126x.h:464
The radio callbacks structure Holds function pointers to be called on radio interrupts.
Definition: sx126x.h:690
void SX126xSetRxTxFallbackMode(uint8_t fallbackMode)
Defines into which mode the chip goes after a TX / RX done.
Definition: sx126x.cpp:388
@ RX_BW_234300
Definition: sx126x.h:284
RadioPacketTypes_t packetType
Packet to which the packet status are referring to.
Definition: sx126x.h:591
@ LORA_CR_4_6
Definition: sx126x.h:328
@ RX_BW_5800
Definition: sx126x.h:268
@ MODE_RX_DC
The radio is in receive mode.
Definition: sx126x.h:175
RadioPacketLengthModes_t
Radio GFSK packet length mode.
Definition: sx126x.h:359
RadioAddressComp_t AddrComp
Activated SyncWord correlators.
Definition: sx126x.h:541
@ IRQ_CRC_ERROR
Definition: sx126x.h:445
@ TCXO_CTRL_3_3V
Definition: sx126x.h:428
int8_t RssiPkt
The RSSI of the last packet.
Definition: sx126x.h:578
RadioPreambleDetection_t PreambleMinDetect
The preamble Rx length minimal for GFSK packet type.
Definition: sx126x.h:539
int Reset
Definition: sx126x.h:654
uint8_t ChipMode
Chip mode.
Definition: sx126x.h:142
@ RADIO_CLR_IRQSTATUS
Definition: sx126x.h:487
void SX126xSetRegulatorMode(RadioRegulatorMode_t mode)
Sets the power regulators operating mode.
Definition: sx126x.cpp:335
@ LORA_IQ_INVERTED
Definition: sx126x.h:413
@ RX_BW_156200
Definition: sx126x.h:282
void SX126xSendPayload(uint8_t *payload, uint8_t size, uint32_t timeout)
Sends a payload.
Definition: sx126x.cpp:153
@ RADIO_CRC_1_BYTES
Definition: sx126x.h:370
uint8_t RC64KEnable
Calibrate RC64K clock.
Definition: sx126x.h:603
@ RADIO_SET_REGULATORMODE
Definition: sx126x.h:490
int8_t RssiAvg
The averaged RSSI.
Definition: sx126x.h:572
@ RADIO_GET_PACKETTYPE
Definition: sx126x.h:472
RadioError_t SX126xGetDeviceErrors(void)
Returns the possible system errors.
Definition: sx126x.cpp:721
uint32_t Fdev
Definition: sx126x.h:511
enum RadioCommands_e RadioCommands_t
Represents all possible opcode understood by the radio.
uint16_t PacketReceived
Definition: sx126x.h:592
uint16_t Value
Definition: sx126x.h:646
@ LORA_CR_4_7
Definition: sx126x.h:329
void SX126xSetPaConfig(uint8_t paDutyCycle, uint8_t hpMax, uint8_t deviceSel, uint8_t paLut)
Sets the transmission parameters.
Definition: sx126x.cpp:377
@ RADIO_CALIBRATEIMAGE
Definition: sx126x.h:489
@ MOD_SHAPING_OFF
Definition: sx126x.h:255
RadioOperatingModes_t SX126xGetOperatingMode(void)
Gets the current Operation Mode of the Radio.
Definition: sx126x.cpp:114
@ RADIO_SET_LORASYMBTIMEOUT
Definition: sx126x.h:497
void SX126xReInit(DioIrqHandler dioIrq)
Re-Initializes the radio driver after CPU wakeup from deep sleep.
Definition: sx126x.cpp:109
void SX126xSetRxBoosted(uint32_t timeout)
Sets the radio in reception mode with Boosted LNA gain.
Definition: sx126x.cpp:281
@ LORA_SF10
Definition: sx126x.h:300
uint16_t PreambleLength
The preamble Tx length for GFSK packet type in bit.
Definition: sx126x.h:538
int DIO2
Definition: sx126x.h:657
@ LORA_SF8
Definition: sx126x.h:298
Structure describing the radio status.
Definition: sx126x.h:136
void SX126xReadBuffer(uint8_t offset, uint8_t *buffer, uint8_t size)
Read data from the buffer holding the payload in the radio.
Definition: sx126x-board.cpp:290
RadioPacketTypes_t
Represents the possible packet type (i.e. modem) used.
Definition: sx126x.h:207
RadioDcFree_t
Radio whitening mode activated or deactivated.
Definition: sx126x.h:382
@ RADIO_PREAMBLE_DETECTOR_OFF
Preamble detection length off.
Definition: sx126x.h:338
uint8_t SX126xSetSyncWord(uint8_t *syncWord)
Sets the Sync Word given by index used in GFSK.
Definition: sx126x.cpp:159
void SX126xSetDio2AsRfSwitchCtrl(uint8_t enable)
Indicates if DIO2 is used to control an RF Switch.
Definition: sx126x.cpp:416
@ RX_BW_39000
Definition: sx126x.h:276
@ IRQ_RADIO_ALL
Definition: sx126x.h:449
@ RADIO_WRITE_REGISTER
Definition: sx126x.h:458
RadioCrcTypes_t CrcLength
Size of the CRC block in the GFSK packet.
Definition: sx126x.h:544
uint8_t SX126xGetPayload(uint8_t *payload, uint8_t *size, uint8_t maxSize)
Reads the payload received. If the received payload is longer than maxSize, then the method returns 1...
Definition: sx126x.cpp:140
The type describing the packet parameters for every packet types.
Definition: sx126x.h:529
void SX126xSetCadParams(RadioLoRaCadSymbols_t cadSymbolNum, uint8_t cadDetPeak, uint8_t cadDetMin, RadioCadExitModes_t cadExitMode, uint32_t cadTimeout)
Sets the Channel Activity Detection (CAD) parameters.
Definition: sx126x.cpp:624
@ RADIO_READ_BUFFER
Definition: sx126x.h:461
@ LORA_CR_4_5
Definition: sx126x.h:327
@ RADIO_SET_RX
Definition: sx126x.h:466
uint8_t ImgEnable
Definition: sx126x.h:609
void SX126xInit(DioIrqHandler dioIrq)
Initializes the radio driver.
Definition: sx126x.cpp:84
void SX126xSetLoRaSymbNumTimeout(uint8_t SymbNum)
Set the number of symbol the radio will wait to validate a reception.
Definition: sx126x.cpp:330
IrqPblSyncHeaderCode_t
Definition: sx126x.h:158
@ RADIO_DC_FREEWHITENING
Definition: sx126x.h:384
uint8_t ADCBulkPEnable
Calibrate ADC bulkP.
Definition: sx126x.h:608
@ RADIO_SET_CAD
Definition: sx126x.h:468
IrqErrorCode_t
Structure describing the error codes for callback functions.
Definition: sx126x.h:151
void() DioIrqHandler(void)
Definition: sx126x.h:668
@ RADIO_PREAMBLE_DETECTOR_32_BITS
Preamble detection length 32 bit.
Definition: sx126x.h:342
@ RADIO_PREAMBLE_DETECTOR_16_BITS
Preamble detection length 16 bits.
Definition: sx126x.h:340
RadioLoRaCodingRates_t
Represents the coding rate values for LoRa packet type.
Definition: sx126x.h:326
@ RADIO_SET_PACONFIG
Definition: sx126x.h:475
void SX126xSetCad(void)
Sets the radio in CAD mode.
Definition: sx126x.cpp:309
@ LORA_PACKET_EXPLICIT
Definition: sx126x.h:394
RadioCommands_e
Represents all possible opcode understood by the radio.
Definition: sx126x.h:456
void SX126xSetLongPreamble(uint8_t enable)
Activate the extention of the timeout when long preamble is used.
@ RADIO_SET_TXCONTINUOUSPREAMBLE
Definition: sx126x.h:470
@ IRQ_RX_DONE
Definition: sx126x.h:440
@ RADIO_RAMP_800_US
Definition: sx126x.h:223
@ RADIO_SET_CADPARAMS
Definition: sx126x.h:476
RadioPacketTypes_t SX126xGetPacketType(void)
Gets the current radio protocol.
Definition: sx126x.cpp:468
@ MODE_CAD
The radio is in receive duty cycle mode.
Definition: sx126x.h:176
@ RADIO_CFG_DIOIRQ
Definition: sx126x.h:485
@ LORA_IQ_NORMAL
Definition: sx126x.h:412
uint8_t Reset
Definition: sx126x.h:622
RadioPacketLengthModes_t HeaderType
If the header is explicit, it will be transmitted in the GFSK packet. If the header is implicit,...
Definition: sx126x.h:542
uint8_t BuckStart
Buck converter failed to start.
Definition: sx126x.h:642
@ LORA_BW_125
Definition: sx126x.h:312
@ IRQ_SYNCWORD_ERROR_CODE
Definition: sx126x.h:153
void SX126xSetTxInfinitePreamble(void)
Sets the radio in continuous preamble transmission mode.
Definition: sx126x.cpp:320
void SX126xSetCrcPolynomial(uint16_t polynomial)
Sets the polynomial used for the CRC calculation.
Definition: sx126x.cpp:183
@ LORA_SF6
Definition: sx126x.h:296
RadioLoRaSpreadingFactors_t
Represents the possible spreading factor values in LoRa packet types.
Definition: sx126x.h:294
@ RADIO_PACKET_VARIABLE_LENGTH
The packet is on variable size, header included.
Definition: sx126x.h:361
PacketStatus_t PacketStatus
Definition: sx126x.h:661
RadioStatus_t SX126xGetStatus(void)
Gets the current radio status.
Definition: sx126x.cpp:648
The type describing the modulation parameters for every packet types.
Definition: sx126x.h:504
@ RADIO_SET_MODULATIONPARAMS
Definition: sx126x.h:478
@ RX_BW_58600
Definition: sx126x.h:278
@ LORA_CAD_ONLY
Definition: sx126x.h:245
@ TCXO_CTRL_2_2V
Definition: sx126x.h:424
uint8_t PayloadLength
Size of the payload in the GFSK packet.
Definition: sx126x.h:543
@ LORA_BW_250
Definition: sx126x.h:311
@ MOD_SHAPING_G_BT_1
Definition: sx126x.h:259
@ RADIO_CRC_2_BYTES_IBM
Definition: sx126x.h:374
void SX126xSetTxParams(int8_t power, RadioRampTimes_t rampTime)
Sets the transmission parameters.
Definition: sx126x.cpp:473
@ MODE_STDBY_RC
The radio is in sleep mode.
Definition: sx126x.h:170
@ IRQ_HEADER_VALID_CODE
Definition: sx126x.h:161
struct RadioStatus_u::@0 Fields
RadioPacketTypes_t PacketType
Packet to which the packet parameters are referring to.
Definition: sx126x.h:530
@ RADIO_RAMP_80_US
Definition: sx126x.h:221
@ RX_BW_9700
Definition: sx126x.h:270
@ LORA_SF12
Definition: sx126x.h:302
Represents the Rx internal counters values when GFSK or LoRa packet type is used.
Definition: sx126x.h:590
RadioDcFree_t DcFree
Definition: sx126x.h:545
uint8_t PllLock
PLL lock failed.
Definition: sx126x.h:641
@ LORA_CAD_08_SYMBOL
Definition: sx126x.h:236
void SX126xSetBufferBaseAddress(uint8_t txBaseAddress, uint8_t rxBaseAddress)
Sets the data buffer base address for transmission and reception.
Definition: sx126x.cpp:639
@ RX_BW_373600
Definition: sx126x.h:286
RadioPreambleDetection_t
Represents the preamble length used to detect the packet on Rx side.
Definition: sx126x.h:337
@ RADIO_WRITE_BUFFER
Definition: sx126x.h:460
void SX126xSetDio3AsTcxoCtrl(RadioTcxoCtrlVoltage_t tcxoVoltage, uint32_t timeout)
Indicates if the Radio main clock is supplied from a tcxo.
Definition: sx126x.cpp:421
uint8_t PaRamp
PA ramp failed.
Definition: sx126x.h:643
@ LORA_BW_010
Definition: sx126x.h:318
@ USE_DCDC
Definition: sx126x.h:200
RadioRegulatorMode_t
Declares the power regulation used to power the device.
Definition: sx126x.h:198
@ RX_BW_78200
Definition: sx126x.h:279
@ IRQ_HEADER_VALID
Definition: sx126x.h:443
int DIO3
Definition: sx126x.h:658
RadioLoRaIQModes_t InvertIQ
Allows to swap IQ for LoRa packet.
Definition: sx126x.h:556
uint8_t SyncWordLength
The synchronization word length for GFSK packet type.
Definition: sx126x.h:540
@ RADIO_SET_TCXOMODE
Definition: sx126x.h:493
RadioCrcTypes_t
Represents the CRC length.
Definition: sx126x.h:368
@ LORA_BW_007
Definition: sx126x.h:319
uint8_t WarmStart
Definition: sx126x.h:623
@ RADIO_SET_RFFREQUENCY
Definition: sx126x.h:473
@ RADIO_RAMP_40_US
Definition: sx126x.h:220
void SX126xSetDioIrqParams(uint16_t irqMask, uint16_t dio1Mask, uint16_t dio2Mask, uint16_t dio3Mask)
Sets the IRQ mask and DIO masks.
Definition: sx126x.cpp:393
@ RX_BW_93800
Definition: sx126x.h:280
@ RADIO_CRC_2_BYTES
Definition: sx126x.h:371
uint8_t Value
Definition: sx126x.h:612
RadioRampTimes_t
Represents the ramping time for power amplifier.
Definition: sx126x.h:217
@ TCXO_CTRL_2_7V
Definition: sx126x.h:426
@ LORA_CAD_02_SYMBOL
Definition: sx126x.h:234
void SX126xSetModulationParams(ModulationParams_t *modParams)
Set the modulation parameters.
Definition: sx126x.cpp:520
@ MODE_RX
The radio is in transmit mode.
Definition: sx126x.h:174
@ LORA_PACKET_FIXED_LENGTH
The packet is known on both sides, no header included in the packet.
Definition: sx126x.h:393
void SX126xWriteBuffer(uint8_t offset, uint8_t *buffer, uint8_t size)
Write data to the buffer holding the payload in the radio.
Definition: sx126x-board.cpp:271
@ RADIO_CRC_2_BYTES_INV
Definition: sx126x.h:373
@ IRQ_CAD_ACTIVITY_DETECTED
Definition: sx126x.h:447
@ RADIO_DC_FREE_OFF
Definition: sx126x.h:383
int8_t SignalRssiPkt
Definition: sx126x.h:580
@ IRQ_CRC_ERROR_CODE
Definition: sx126x.h:154
void SX126xSetWhiteningSeed(uint16_t seed)
Sets the Initial value of the LFSR used for the whitening in GFSK protocols.
Definition: sx126x.cpp:201
@ RX_BW_14600
Definition: sx126x.h:272
void SX126xSetPayload(uint8_t *payload, uint8_t size)
Saves the payload to be send in the radio buffer.
Definition: sx126x.cpp:135
@ RADIO_SET_SLEEP
Definition: sx126x.h:462
@ IRQ_HEADER_ERROR
Definition: sx126x.h:444
@ STDBY_XOSC
Definition: sx126x.h:188
@ LORA_BW_015
Definition: sx126x.h:317
@ LORA_BW_041
Definition: sx126x.h:314
void SX126xSetRxDutyCycle(uint32_t rxTime, uint32_t sleepTime)
Sets the Rx duty cycle management parameters.
Definition: sx126x.cpp:295
uint8_t WakeUpRTC
Get out of sleep mode if wakeup signal received from RTC.
Definition: sx126x.h:621
@ LORA_SF5
Definition: sx126x.h:295
@ RX_BW_19500
Definition: sx126x.h:273
void SX126xReadRegisters(uint16_t address, uint8_t *buffer, uint16_t size)
Read data from the radio memory.
Definition: sx126x-board.cpp:243
@ RADIO_SET_PACKETTYPE
Definition: sx126x.h:471
@ RX_BW_187200
Definition: sx126x.h:283
@ RADIO_PREAMBLE_DETECTOR_24_BITS
Preamble detection length 24 bits.
Definition: sx126x.h:341
uint8_t Rc64kCalib
RC 64kHz oscillator calibration failed.
Definition: sx126x.h:635
@ TCXO_CTRL_3_0V
Definition: sx126x.h:427
@ RX_BW_4800
Definition: sx126x.h:267
RadioLoRaBandwidths_t
Represents the bandwidth values for LoRa packet type.
Definition: sx126x.h:309
void SX126xSetRfFrequency(uint32_t frequency)
Sets the RF frequency.
Definition: sx126x.cpp:442
@ RADIO_SET_STANDBY
Definition: sx126x.h:463
@ TCXO_CTRL_1_6V
Definition: sx126x.h:421
void SX126xCheckDeviceReady(void)
Wakeup the radio if it is in Sleep mode and check that Busy is low.
Definition: sx126x.cpp:124
@ RADIO_GET_STATS
Definition: sx126x.h:483
void SX126xSetPacketType(RadioPacketTypes_t packetType)
Sets the radio for the given protocol.
Definition: sx126x.cpp:461
uint8_t Bandwidth
Definition: sx126x.h:513
RadioPacketTypes_t packetType
Packet to which the packet status are referring to.
Definition: sx126x.h:566
uint32_t SX126xGetRandom(void)
Gets a 32 bits random value generated by the radio.
Definition: sx126x.cpp:219
uint32_t FreqError
Definition: sx126x.h:574
RadioLoRaPacketLengthsMode_t
Holds the Radio lengths mode for the LoRa packet type.
Definition: sx126x.h:391
Represents a calibration configuration.
Definition: sx126x.h:600
@ LORA_CAD_LBT
Definition: sx126x.h:247
int DIO1
Definition: sx126x.h:656
@ MODE_STDBY_XOSC
The radio is in standby mode with RC oscillator.
Definition: sx126x.h:171
@ RX_BW_46900
Definition: sx126x.h:277
uint8_t XoscStart
XOSC oscillator failed to start.
Definition: sx126x.h:640
void SX126xCalibrateImage(uint32_t freq)
Calibrates the Image rejection depending of the frequency.
Definition: sx126x.cpp:345
@ LORA_SF7
Definition: sx126x.h:297
uint8_t Value
Definition: sx126x.h:626
uint8_t CpuBusy
Flag for CPU radio busy.
Definition: sx126x.h:143
@ RADIO_SET_TXFALLBACKMODE
Definition: sx126x.h:494
void SX126xSetTxContinuousWave(void)
Sets the radio in continuous wave transmission mode.
Definition: sx126x.cpp:315
@ LORA_BW_031
Definition: sx126x.h:315
@ RADIO_ADDRESSCOMP_FILT_NODE
Definition: sx126x.h:351
@ RADIO_CRC_OFF
No CRC in use.
Definition: sx126x.h:369
@ USE_LDO
Definition: sx126x.h:199
@ LORA_BW_500
Definition: sx126x.h:310
@ LORA_CAD_01_SYMBOL
Definition: sx126x.h:233
uint8_t PLLEnable
Calibrate PLL.
Definition: sx126x.h:605
@ RADIO_ADDRESSCOMP_FILT_OFF
No correlator turned on, i.e. do not search for SyncWord.
Definition: sx126x.h:350
@ RADIO_SET_PACKETPARAMS
Definition: sx126x.h:479
RadioOperatingModes_t
Represents the operating mode the radio is actually running.
Definition: sx126x.h:168
uint8_t Value
Definition: sx126x.h:137
int8_t RssiSync
The RSSI measured on last packet.
Definition: sx126x.h:573
@ RADIO_RAMP_10_US
Definition: sx126x.h:218
@ TCXO_CTRL_1_7V
Definition: sx126x.h:422
uint8_t ImgCalib
Image calibration failed.
Definition: sx126x.h:639
RadioLoRaBandwidths_t Bandwidth
Bandwidth for the LoRa modulation.
Definition: sx126x.h:518
RadioLoRaSpreadingFactors_t SpreadingFactor
Spreading Factor for the LoRa modulation.
Definition: sx126x.h:517
RadioLoRaCodingRates_t CodingRate
Coding rate for the LoRa modulation.
Definition: sx126x.h:519
uint8_t ADCPulseEnable
Calibrate ADC Pulse.
Definition: sx126x.h:606
@ RADIO_SET_RFSWITCHMODE
Definition: sx126x.h:495
@ RX_BW_23400
Definition: sx126x.h:274
RadioModShapings_t
Represents the modulation shaping parameter.
Definition: sx126x.h:254
void SX126xCalibrate(CalibrationParams_t calibParam)
Calibrates the given radio block.
Definition: sx126x.cpp:340
@ RADIO_PREAMBLE_DETECTOR_08_BITS
Preamble detection length 8 bits.
Definition: sx126x.h:339
Represents the packet status for every packet type.
Definition: sx126x.h:565
@ RADIO_SET_BUFFERBASEADDRESS
Definition: sx126x.h:477
void SX126xSetRx(uint32_t timeout)
Sets the radio in reception mode.
Definition: sx126x.cpp:269
@ IRQ_PREAMBLE_DETECTED
Definition: sx126x.h:441
@ LORA_BW_062
Definition: sx126x.h:313
@ RX_BW_11700
Definition: sx126x.h:271
void SX126xWriteRegisters(uint16_t address, uint8_t *buffer, uint16_t size)
Write data to the radio memory.
Definition: sx126x-board.cpp:216
@ RADIO_RAMP_3400_US
Definition: sx126x.h:225
PacketParams_t PacketParams
Definition: sx126x.h:660
Represents the possible radio system error states.
Definition: sx126x.h:632
@ RADIO_GET_ERROR
Definition: sx126x.h:491
uint16_t SX126xGetIrqStatus(void)
Returns the current IRQ status.
Definition: sx126x.cpp:408
uint16_t LengthError
Definition: sx126x.h:594
@ TCXO_CTRL_2_4V
Definition: sx126x.h:425
@ STDBY_RC
Definition: sx126x.h:187
@ IRQ_PBL_DETECT_CODE
Definition: sx126x.h:159
void SX126xGetPacketStatus(PacketStatus_t *pktStatus)
Gets the last received packet payload length.
Definition: sx126x.cpp:687
void SX126xSetPacketParams(PacketParams_t *packetParams)
Sets the packet parameters.
Definition: sx126x.cpp:565
@ RADIO_SET_STOPRXTIMERONPREAMBLE
Definition: sx126x.h:496
RadioLoRaCrcModes_t CrcMode
Size of CRC block in LoRa packet.
Definition: sx126x.h:555
void SX126xSetCrcSeed(uint16_t seed)
Sets the seed value for the LFSR used for the CRC calculation.
Definition: sx126x.cpp:165
union RadioStatus_u RadioStatus_t
Structure describing the radio status.
uint16_t CrcOk
Definition: sx126x.h:593
@ RADIO_RAMP_200_US
Definition: sx126x.h:222
@ RADIO_RAMP_1700_US
Definition: sx126x.h:224
RadioLoRaCrcModes_t
Represents the CRC mode for LoRa packet type.
Definition: sx126x.h:402
@ RADIO_SET_RXDUTYCYCLE
Definition: sx126x.h:467
@ MOD_SHAPING_G_BT_05
Definition: sx126x.h:257
@ LORA_CAD_16_SYMBOL
Definition: sx126x.h:237
@ RX_BW_29300
Definition: sx126x.h:275
@ RX_BW_312000
Definition: sx126x.h:285
@ IRQ_HEADER_ERROR_CODE
Definition: sx126x.h:152
void SX126xSetSleep(SleepParams_t sleepConfig)
Sets the radio in sleep mode.
Definition: sx126x.cpp:228
uint8_t RxStatus
Definition: sx126x.h:571
RadioLoRaPacketLengthsMode_t HeaderType
If the header is explicit, it will be transmitted in the LoRa packet. If the header is implicit,...
Definition: sx126x.h:553
uint8_t RC13MEnable
Calibrate RC13M clock.
Definition: sx126x.h:604
void SX126xSetStandby(RadioStandbyModes_t mode)
Sets the radio in configuration mode.
Definition: sx126x.cpp:236
@ IRQ_SYNCWORD_VALID_CODE
Definition: sx126x.h:160
void SX126xClearDeviceErrors(void)
Clear all the errors in the device.
Definition: sx126x.cpp:729
void SX126xSetFs(void)
Sets the radio in FS mode.
Definition: sx126x.cpp:251
void SX126xGetRxBufferStatus(uint8_t *payloadLength, uint8_t *rxStartBuffer)
Gets the last received packet buffer status.
Definition: sx126x.cpp:668
@ RADIO_PACKET_FIXED_LENGTH
The packet is known on both sides, no header included in the packet.
Definition: sx126x.h:360
@ RADIO_SET_TX
Definition: sx126x.h:465
@ MODE_TX
The radio is in frequency synthesis mode.
Definition: sx126x.h:173
uint8_t ADCBulkNEnable
Calibrate ADC bulkN.
Definition: sx126x.h:607
uint8_t Reserved
Definition: sx126x.h:624
@ RADIO_RAMP_20_US
Definition: sx126x.h:219
uint8_t PllCalib
PLL calibration failed.
Definition: sx126x.h:637
RadioAddressComp_t
Represents the possible combinations of SyncWord correlators activated.
Definition: sx126x.h:349
void SX126xClearIrqStatus(uint16_t irq)
Clears the IRQs.
Definition: sx126x.cpp:735
@ PACKET_TYPE_GFSK
Definition: sx126x.h:208
RadioCadExitModes_t
Represents the Channel Activity Detection actions after the CAD operation is finished.
Definition: sx126x.h:244
@ MODE_SLEEP
Definition: sx126x.h:169
uint8_t LowDatarateOptimize
Indicates if the modem uses the low datarate optimization.
Definition: sx126x.h:520
@ RADIO_SET_TXCONTINUOUSWAVE
Definition: sx126x.h:469
@ RADIO_READ_REGISTER
Definition: sx126x.h:459
@ RADIO_GET_PACKETSTATUS
Definition: sx126x.h:481
ModulationParams_t ModulationParams
Definition: sx126x.h:662
@ PACKET_TYPE_NONE
Definition: sx126x.h:210
@ RX_BW_117300
Definition: sx126x.h:281