Mistake on this page?
Report an issue in GitHub or email us
sx126x_ds.h
1 /*!
2  * \file sx126x.h
3  *
4  * \brief SX126x driver implementation
5  *
6  * \copyright Revised BSD License, see section \ref LICENSE.
7  *
8  * \code
9  * ______ _
10  * / _____) _ | |
11  * ( (____ _____ ____ _| |_ _____ ____| |__
12  * \____ \| ___ | (_ _) ___ |/ ___) _ \
13  * _____) ) ____| | | || |_| ____( (___| | | |
14  * (______/|_____)_|_|_| \__)_____)\____)_| |_|
15  * (C)2013-2017 Semtech
16  *
17  * \endcode
18  *
19  * \author Miguel Luis ( Semtech )
20  *
21  * \author Gregory Cristian ( Semtech )
22  *
23  * Copyright (c) 2019, Arm Limited and affiliates.
24  *
25  * SPDX-License-Identifier: BSD-3-Clause
26  */
27 
28 #ifndef MBED_LORA_RADIO_DRV_SX126X_SX126X_DS_H_
29 #define MBED_LORA_RADIO_DRV_SX126X_SX126X_DS_H_
30 
31 #include "LoRaRadio.h"
32 /*!
33  * \brief Provides the frequency of the chip running on the radio and the frequency step
34  *
35  * \remark These defines are used for computing the frequency divider to set the RF frequency
36  */
37 #define XTAL_FREQ 32000000
38 #define FREQ_DIV 33554432
39 #define FREQ_STEP 0.95367431640625 // ((double)(XTAL_FREQ / (double)FREQ_DIV))
40 #define FREQ_ERR 0.47683715820312
41 
42 
43 /*!
44  * \brief List of devices supported by this driver
45  */
46 #define SX1261 0
47 #define SX1262 1
48 #define SX1268 2
49 
50 /*!
51  * \brief List of matching supported by the sx126x
52  */
53 #define MATCHING_FREQ_915 0
54 #define MATCHING_FREQ_780 1
55 #define MATCHING_FREQ_490 2
56 #define MATCHING_FREQ_434 3
57 #define MATCHING_FREQ_280 4
58 #define MATCHING_FREQ_169 5
59 #define MATCHING_FREQ_868 6
60 
61 /*!
62  * \brief Compensation delay for SetAutoTx/Rx functions in 15.625 microseconds
63  */
64 #define AUTO_RX_TX_OFFSET 2
65 
66 /*!
67  * \brief LFSR initial value to compute IBM type CRC
68  */
69 #define CRC_IBM_SEED 0xFFFF
70 
71 /*!
72  * \brief LFSR initial value to compute CCIT type CRC
73  */
74 #define CRC_CCITT_SEED 0x1D0F
75 
76 /*!
77  * \brief Polynomial used to compute IBM CRC
78  */
79 #define CRC_POLYNOMIAL_IBM 0x8005
80 
81 /*!
82  * \brief Polynomial used to compute CCIT CRC
83  */
84 #define CRC_POLYNOMIAL_CCITT 0x1021
85 
86 /*!
87  * \brief The address of the register holding the first byte defining the CRC seed
88  *
89  */
90 #define REG_LR_CRCSEEDBASEADDR 0x06BC
91 
92 /*!
93  * \brief The address of the register holding the first byte defining the CRC polynomial
94  */
95 #define REG_LR_CRCPOLYBASEADDR 0x06BE
96 
97 /*!
98  * \brief The address of the register holding the first byte defining the whitening seed
99  */
100 #define REG_LR_WHITSEEDBASEADDR_MSB 0x06B8
101 #define REG_LR_WHITSEEDBASEADDR_LSB 0x06B9
102 
103 /*!
104  * \brief The address of the register holding the packet configuration
105  */
106 #define REG_LR_PACKETPARAMS 0x0704
107 
108 /*!
109  * \brief The address of the register holding the payload size
110  */
111 #define REG_LR_PAYLOADLENGTH 0x0702
112 
113 /*!
114  * \brief The addresses of the registers holding SyncWords values
115  */
116 #define REG_LR_SYNCWORDBASEADDRESS 0x06C0
117 
118 /*!
119  * \brief The addresses of the register holding LoRa Modem SyncWord value
120  */
121 #define REG_LR_SYNCWORD 0x0740
122 
123 /*!
124  * Syncword for Private LoRa networks
125  */
126 #define LORA_MAC_PRIVATE_SYNCWORD 0x1424
127 
128 /*!
129  * Syncword for Public LoRa networks
130  */
131 #define LORA_MAC_PUBLIC_SYNCWORD 0x3444
132 
133 /*!
134  * The address of the register giving a 4 bytes random number
135  */
136 #define RANDOM_NUMBER_GENERATORBASEADDR 0x0819
137 
138 /*!
139  * The address of the register holding RX Gain value (0x94: power saving, 0x96: rx boosted)
140  */
141 #define REG_RX_GAIN 0x08AC
142 
143 /*!
144  * The address of the register holding frequency error indication
145  */
146 #define REG_FREQUENCY_ERRORBASEADDR 0x076B
147 
148 /*!
149  * Change the value on the device internal trimming capacitor
150  */
151 #define REG_XTA_TRIM 0x0911
152 
153 /*!
154  * Set the current max value in the over current protection
155  */
156 #define REG_OCP 0x08E7
157 
158 
159 /*!
160  * \brief Represents the Rx internal counters values when GFSK or LoRa packet type is used
161  */
162 typedef struct {
163  radio_modems_t modem_type; //!< Packet to which the packet status are referring to.
164  uint16_t packet_received;
165  uint16_t crc_ok;
166  uint16_t length_error;
167 } rx_counter_t;
168 
169 /*!
170  * \brief Represents a calibration configuration
171  */
172 typedef union {
173  struct {
174  uint8_t rc64k_enable : 1; //!< Calibrate RC64K clock
175  uint8_t rc13m_enable : 1; //!< Calibrate RC13M clock
176  uint8_t pll_enable : 1; //!< Calibrate PLL
177  uint8_t adc_pulse_enable : 1; //!< Calibrate ADC Pulse
178  uint8_t adc_bulkN_enable : 1; //!< Calibrate ADC bulkN
179  uint8_t adc_bulkP_enable : 1; //!< Calibrate ADC bulkP
180  uint8_t img_enable : 1;
181  uint8_t pad : 1;
182  } fields;
183 
184  uint8_t value;
185 
187 
188 /*!
189  * \brief Represents the possible radio system error states
190  */
191 typedef union {
192  struct {
193  uint8_t rc64k_calib : 1; //!< RC 64kHz oscillator calibration failed
194  uint8_t rc13m_calib : 1; //!< RC 13MHz oscillator calibration failed
195  uint8_t pll_calib : 1; //!< PLL calibration failed
196  uint8_t adc_calib : 1; //!< ADC calibration failed
197  uint8_t img_calib : 1; //!< Image calibration failed
198  uint8_t xosc_start : 1; //!< XOSC oscillator failed to start
199  uint8_t pll_lock : 1; //!< PLL lock failed
200  uint8_t buck_start : 1; //!< Buck converter failed to start
201  uint8_t pa_ramp : 1; //!< PA ramp failed
202  uint8_t reserved : 7; //!< reserved
203  } fields;
204 
205  uint16_t value;
206 
207 } radio_error_t;
208 
209 /*!
210  * \brief Represents the operating mode the radio is actually running
211  */
212 typedef enum {
213  MODE_SLEEP = 0x00, //! The radio is in sleep mode
214  MODE_DEEP_SLEEP, //! The radio is in deep-sleep mode
215  MODE_STDBY_RC, //! The radio is in standby mode with RC oscillator
216  MODE_STDBY_XOSC, //! The radio is in standby mode with XOSC oscillator
217  MODE_FS, //! The radio is in frequency synthesis mode
218  MODE_TX, //! The radio is in transmit mode
219  MODE_RX, //! The radio is in receive mode
220  MODE_RX_DC, //! The radio is in receive duty cycle mode
221  MODE_CAD //! The radio is in channel activity detection mode
223 
224 /*!
225  * \brief Declares the oscillator in use while in standby mode
226  *
227  * Using the STDBY_RC standby mode allow to reduce the energy consumption
228  * STDBY_XOSC should be used for time critical applications
229  */
230 typedef enum {
231  STDBY_RC = 0x00,
232  STDBY_XOSC = 0x01,
234 
235 /*!
236  * \brief Declares the power regulation used to power the device
237  *
238  * This command allows the user to specify if DC-DC or LDO is used for power regulation.
239  * Using only LDO implies that the Rx or Tx current is doubled
240  */
241 typedef enum {
242  USE_LDO = 0x00, // default
243  USE_DCDC = 0x01,
245 
246 /*!
247  * \brief Represents the ramping time for power amplifier
248  */
249 typedef enum {
250  RADIO_RAMP_10_US = 0x00,
251  RADIO_RAMP_20_US = 0x01,
252  RADIO_RAMP_40_US = 0x02,
253  RADIO_RAMP_80_US = 0x03,
254  RADIO_RAMP_200_US = 0x04,
255  RADIO_RAMP_800_US = 0x05,
256  RADIO_RAMP_1700_US = 0x06,
257  RADIO_RAMP_3400_US = 0x07,
259 
260 /*!
261  * \brief Represents the number of symbols to be used for channel activity detection operation
262  */
263 typedef enum {
264  LORA_CAD_01_SYMBOL = 0x00,
265  LORA_CAD_02_SYMBOL = 0x01,
266  LORA_CAD_04_SYMBOL = 0x02,
267  LORA_CAD_08_SYMBOL = 0x03,
268  LORA_CAD_16_SYMBOL = 0x04,
270 
271 /*!
272  * \brief Represents the Channel Activity Detection actions after the CAD operation is finished
273  */
274 typedef enum {
275  LORA_CAD_ONLY = 0x00,
276  LORA_CAD_RX = 0x01,
277  LORA_CAD_LBT = 0x10,
279 
280 /*!
281  * \brief Represents the modulation shaping parameter
282  */
283 typedef enum {
284  MOD_SHAPING_OFF = 0x00,
285  MOD_SHAPING_G_BT_03 = 0x08,
286  MOD_SHAPING_G_BT_05 = 0x09,
287  MOD_SHAPING_G_BT_07 = 0x0A,
288  MOD_SHAPING_G_BT_1 = 0x0B,
290 
291 /*!
292  * \brief Represents the modulation shaping parameter
293  */
294 typedef enum {
295  RX_BW_4800 = 0x1F,
296  RX_BW_5800 = 0x17,
297  RX_BW_7300 = 0x0F,
298  RX_BW_9700 = 0x1E,
299  RX_BW_11700 = 0x16,
300  RX_BW_14600 = 0x0E,
301  RX_BW_19500 = 0x1D,
302  RX_BW_23400 = 0x15,
303  RX_BW_29300 = 0x0D,
304  RX_BW_39000 = 0x1C,
305  RX_BW_46900 = 0x14,
306  RX_BW_58600 = 0x0C,
307  RX_BW_78200 = 0x1B,
308  RX_BW_93800 = 0x13,
309  RX_BW_117300 = 0x0B,
310  RX_BW_156200 = 0x1A,
311  RX_BW_187200 = 0x12,
312  RX_BW_234300 = 0x0A,
313  RX_BW_312000 = 0x19,
314  RX_BW_373600 = 0x11,
315  RX_BW_467000 = 0x09,
317 
318 /*!
319  * \brief Represents the possible spreading factor values in LoRa packet types
320  */
321 typedef enum {
322  LORA_SF5 = 0x05,
323  LORA_SF6 = 0x06,
324  LORA_SF7 = 0x07,
325  LORA_SF8 = 0x08,
326  LORA_SF9 = 0x09,
327  LORA_SF10 = 0x0A,
328  LORA_SF11 = 0x0B,
329  LORA_SF12 = 0x0C,
331 
332 /*!
333  * \brief Represents the bandwidth values for LoRa packet type
334  */
335 typedef enum {
336  LORA_BW_500 = 6,
337  LORA_BW_250 = 5,
338  LORA_BW_125 = 4,
339  LORA_BW_062 = 3,
340  LORA_BW_041 = 10,
341  LORA_BW_031 = 2,
342  LORA_BW_020 = 9,
343  LORA_BW_015 = 1,
344  LORA_BW_010 = 8,
345  LORA_BW_007 = 0,
347 
348 const uint8_t lora_bandwidhts [] = {LORA_BW_125, LORA_BW_250, LORA_BW_500};
349 
350 /*!
351  * \brief Represents the coding rate values for LoRa packet type
352  */
353 typedef enum {
354  LORA_CR_4_5 = 0x01,
355  LORA_CR_4_6 = 0x02,
356  LORA_CR_4_7 = 0x03,
357  LORA_CR_4_8 = 0x04,
358 } lora_coding_tates_t;
359 
360 /*!
361  * \brief Represents the preamble length used to detect the packet on Rx side
362  */
363 typedef enum {
364  RADIO_PREAMBLE_DETECTOR_OFF = 0x00, //!< Preamble detection length off
365  RADIO_PREAMBLE_DETECTOR_08_BITS = 0x04, //!< Preamble detection length 8 bits
366  RADIO_PREAMBLE_DETECTOR_16_BITS = 0x05, //!< Preamble detection length 16 bits
367  RADIO_PREAMBLE_DETECTOR_24_BITS = 0x06, //!< Preamble detection length 24 bits
368  RADIO_PREAMBLE_DETECTOR_32_BITS = 0x07, //!< Preamble detection length 32 bit
370 
371 /*!
372  * \brief Represents the possible combinations of SyncWord correlators activated
373  */
374 typedef enum {
375  RADIO_ADDRESSCOMP_FILT_OFF = 0x00, //!< No correlator turned on, i.e. do not search for SyncWord
376  RADIO_ADDRESSCOMP_FILT_NODE = 0x01,
377  RADIO_ADDRESSCOMP_FILT_NODE_BROAD = 0x02,
379 
380 /*!
381  * \brief Radio packet length mode
382  */
383 typedef enum {
384  RADIO_PACKET_VARIABLE_LENGTH = 0x00, //!< The packet is on variable size, header included
385  RADIO_PACKET_FIXED_LENGTH = 0x01, //!< The packet is known on both sides, no header included in the packet
387 
388 /*!
389  * \brief Represents the CRC length
390  */
391 typedef enum radio_crc_types_e {
392  RADIO_CRC_OFF = 0x01, //!< No CRC in use
393  RADIO_CRC_1_BYTES = 0x00,
394  RADIO_CRC_2_BYTES = 0x02,
395  RADIO_CRC_1_BYTES_INV = 0x04,
396  RADIO_CRC_2_BYTES_INV = 0x06,
397  RADIO_CRC_2_BYTES_IBM = 0xF1,
398  RADIO_CRC_2_BYTES_CCIT = 0xF2,
400 
401 /*!
402  * \brief Radio whitening mode activated or deactivated
403  */
404 typedef enum {
405  RADIO_DC_FREE_OFF = 0x00,
406  RADIO_DC_FREEWHITENING = 0x01,
408 
409 /*!
410  * \brief Holds the lengths mode of a LoRa packet type
411  */
412 typedef enum {
413  LORA_PACKET_VARIABLE_LENGTH = 0x00, //!< The packet is on variable size, header included
414  LORA_PACKET_FIXED_LENGTH = 0x01, //!< The packet is known on both sides, no header included in the packet
415  LORA_PACKET_EXPLICIT = LORA_PACKET_VARIABLE_LENGTH,
416  LORA_PACKET_IMPLICIT = LORA_PACKET_FIXED_LENGTH,
418 
419 /*!
420  * \brief Represents the CRC mode for LoRa packet type
421  */
422 typedef enum {
423  LORA_CRC_ON = 0x01, //!< CRC activated
424  LORA_CRC_OFF = 0x00, //!< CRC not used
426 
427 /*!
428  * \brief Represents the IQ mode for LoRa packet type
429  */
430 typedef enum {
431  LORA_IQ_NORMAL = 0x00,
432  LORA_IQ_INVERTED = 0x01,
434 
435 /*!
436  * \brief Represents the volatge used to control the TCXO on/off from DIO3
437  */
438 typedef enum {
439  TCXO_CTRL_1_6V = 0x00,
440  TCXO_CTRL_1_7V = 0x01,
441  TCXO_CTRL_1_8V = 0x02,
442  TCXO_CTRL_2_2V = 0x03,
443  TCXO_CTRL_2_4V = 0x04,
444  TCXO_CTRL_2_7V = 0x05,
445  TCXO_CTRL_3_0V = 0x06,
446  TCXO_CTRL_3_3V = 0x07,
448 
449 /*!
450  * \brief Represents the interruption masks available for the radio
451  *
452  * \remark Note that not all these interruptions are available for all packet types
453  */
454 typedef enum {
455  IRQ_RADIO_NONE = 0x0000,
456  IRQ_TX_DONE = 0x0001,
457  IRQ_RX_DONE = 0x0002,
458  IRQ_PREAMBLE_DETECTED = 0x0004,
459  IRQ_SYNCWORD_VALID = 0x0008,
460  IRQ_HEADER_VALID = 0x0010,
461  IRQ_HEADER_ERROR = 0x0020,
462  IRQ_CRC_ERROR = 0x0040,
463  IRQ_CAD_DONE = 0x0080,
464  IRQ_CAD_ACTIVITY_DETECTED = 0x0100,
465  IRQ_RX_TX_TIMEOUT = 0x0200,
466  IRQ_RADIO_ALL = 0xFFFF,
468 
469 typedef enum {
470  RADIO_GET_STATUS = 0xC0,
471  RADIO_WRITE_REGISTER = 0x0D,
472  RADIO_READ_REGISTER = 0x1D,
473  RADIO_WRITE_BUFFER = 0x0E,
474  RADIO_READ_BUFFER = 0x1E,
475  RADIO_SET_SLEEP = 0x84,
476  RADIO_SET_STANDBY = 0x80,
477  RADIO_SET_FS = 0xC1,
478  RADIO_SET_TX = 0x83,
479  RADIO_SET_RX = 0x82,
480  RADIO_SET_RXDUTYCYCLE = 0x94,
481  RADIO_SET_CAD = 0xC5,
482  RADIO_SET_TXCONTINUOUSWAVE = 0xD1,
483  RADIO_SET_TXCONTINUOUSPREAMBLE = 0xD2,
484  RADIO_SET_PACKETTYPE = 0x8A,
485  RADIO_GET_PACKETTYPE = 0x11,
486  RADIO_SET_RFFREQUENCY = 0x86,
487  RADIO_SET_TXPARAMS = 0x8E,
488  RADIO_SET_PACONFIG = 0x95,
489  RADIO_SET_CADPARAMS = 0x88,
490  RADIO_SET_BUFFERBASEADDRESS = 0x8F,
491  RADIO_SET_MODULATIONPARAMS = 0x8B,
492  RADIO_SET_PACKETPARAMS = 0x8C,
493  RADIO_GET_RXBUFFERSTATUS = 0x13,
494  RADIO_GET_PACKETSTATUS = 0x14,
495  RADIO_GET_RSSIINST = 0x15,
496  RADIO_GET_STATS = 0x10,
497  RADIO_RESET_STATS = 0x00,
498  RADIO_CFG_DIOIRQ = 0x08,
499  RADIO_GET_IRQSTATUS = 0x12,
500  RADIO_CLR_IRQSTATUS = 0x02,
501  RADIO_CALIBRATE = 0x89,
502  RADIO_CALIBRATEIMAGE = 0x98,
503  RADIO_SET_REGULATORMODE = 0x96,
504  RADIO_GET_ERROR = 0x17,
505  RADIO_CLR_ERROR = 0x07,
506  RADIO_SET_TCXOMODE = 0x97,
507  RADIO_SET_TXFALLBACKMODE = 0x93,
508  RADIO_SET_RFSWITCHMODE = 0x9D,
509  RADIO_SET_STOPRXTIMERONPREAMBLE = 0x9F,
510  RADIO_SET_LORASYMBTIMEOUT = 0xA0,
511 } opmode_commands_t;
512 
513 /*!
514  * \brief Structure describing the radio status
515  */
516 typedef union {
517  uint8_t value;
518  struct {
519  //bit order is lsb -> msb
520  uint8_t reserved : 1; //!< Reserved
521  uint8_t cmd_status : 3; //!< Command status
522  uint8_t chip_mode : 3; //!< Chip mode
523  uint8_t cpu_busy : 1; //!< Flag for CPU radio busy
524  } fields;
526 
527 /*!
528  * \brief Structure describing the error codes for callback functions
529  */
530 typedef enum {
531  IRQ_HEADER_ERROR_CODE = 0x01,
532  IRQ_SYNCWORD_ERROR_CODE = 0x02,
533  IRQ_CRC_ERROR_CODE = 0x04,
534 } irq_error_t;
535 
536 
537 typedef enum {
538  IRQ_PBL_DETECT_CODE = 0x01,
539  IRQ_SYNCWORD_VALID_CODE = 0x02,
540  IRQ_HEADER_VALID_CODE = 0x04,
541 } irq_valid_codes_t;
542 
543 typedef enum {
544  IRQ_RX_TIMEOUT = 0x00,
545  IRQ_TX_TIMEOUT = 0x01,
546 } irq_timeout_t;
547 
548 typedef enum {
549  RECEPTION_MODE_SINGLE = 0,
550  RECEPTION_MODE_CONTINUOUS,
551  RECEPTION_MODE_OTHER
552 } reception_mode_t;
553 
554 /*!
555  * \brief The type describing the modulation parameters for every packet types
556  */
557 typedef struct {
558  radio_modems_t modem_type; //!< Packet to which the modulation parameters are referring to.
559  struct {
560  struct {
561  uint32_t bit_rate;
562  uint32_t fdev;
563  radio_mod_shaping_t modulation_shaping;
564  uint8_t bandwidth;
565  uint32_t operational_frequency;
566  } gfsk;
567 
568  struct {
569  lora_spread_factors_t spreading_factor; //!< Spreading Factor for the LoRa modulation
570  lora_bandwidths_t bandwidth; //!< Bandwidth for the LoRa modulation
571  lora_coding_tates_t coding_rate; //!< Coding rate for the LoRa modulation
572  uint8_t low_datarate_optimization; //!< Indicates if the modem uses the low datarate optimization
573  uint32_t operational_frequency;
574  } lora;
575  } params; //!< Holds the modulation parameters structure
577 
578 /*!
579  * \brief The type describing the packet parameters for every packet types
580  */
581 typedef struct packet_params {
582  radio_modems_t modem_type; //!< Packet to which the packet parameters are referring to.
583  struct {
584  /*!
585  * \brief Holds the GFSK packet parameters
586  */
587  struct {
588  uint16_t preamble_length; //!< The preamble Tx length for GFSK packet type in bit
589  radio_preamble_detection_t preamble_min_detect; //!< The preamble Rx length minimal for GFSK packet type
590  uint8_t syncword_length; //!< The synchronization word length for GFSK packet type
591  radio_address_filter_t addr_comp; //!< Activated SyncWord correlators
592  radio_pkt_length_t header_type; //!< If the header is explicit, it will be transmitted in the GFSK packet. If the header is implicit, it will not be transmitted
593  uint8_t payload_length; //!< Size of the payload in the GFSK packet
594  radio_crc_types_t crc_length; //!< Size of the CRC block in the GFSK packet
595  radio_whitening_mode_t whitening_mode;
596  } gfsk;
597  /*!
598  * \brief Holds the LoRa packet parameters
599  */
600  struct {
601  uint16_t preamble_length; //!< The preamble length is the number of LoRa symbols in the preamble
602  lora_pkt_length_t header_type; //!< If the header is explicit, it will be transmitted in the LoRa packet. If the header is implicit, it will not be transmitted
603  uint8_t payload_length; //!< Size of the payload in the LoRa packet
604  lora_crc_mode_t crc_mode; //!< Size of CRC block in LoRa packet
605  lora_IQ_mode_t invert_IQ; //!< Allows to swap IQ for LoRa packet
606  } lora;
607  } params; //!< Holds the packet parameters structure
609 
610 /*!
611  * \brief Represents the packet status for every packet type
612  */
613 typedef struct {
614  radio_modems_t modem_type; //!< Packet to which the packet status are referring to.
615  struct {
616  struct {
617  uint8_t rx_status;
618  int8_t rssi_avg; //!< The averaged RSSI
619  int8_t rssi_sync; //!< The RSSI measured on last packet
620  uint32_t freq_error;
621  } gfsk;
622  struct {
623  int8_t rssi_pkt; //!< The RSSI of the last packet
624  int8_t snr_pkt; //!< The SNR of the last packet
625  int8_t signal_rssi_pkt;
626  uint32_t freq_error;
627  } lora;
628  } params;
630 
631 
632 #endif /* MBED_LORA_RADIO_DRV_SX126X_SX126X_DS_H_ */
radio_irq_masks_t
Represents the interruption masks available for the radio.
Preamble detection length 32 bit.
struct packet_params::@49 params
Holds the packet parameters structure.
Preamble detection length 16 bits.
The type describing the packet parameters for every packet types.
Definition: sx126x_ds.h:581
radio_rx_bandwidth_t
Represents the modulation shaping parameter.
int8_t snr_pkt
The SNR of the last packet.
Definition: sx126x_ds.h:624
The packet is known on both sides, no header included in the packet.
The radio is in sleep mode.
Represents the possible radio system error states.
Definition: sx126x_ds.h:191
Preamble detection length 8 bits.
enum modem_type radio_modems_t
Type of modem.
lora_bandwidths_t bandwidth
Bandwidth for the LoRa modulation.
Definition: sx126x_ds.h:570
lora_IQ_mode_t
Represents the IQ mode for LoRa packet type.
radio_crc_types_t crc_length
Size of the CRC block in the GFSK packet.
Definition: sx126x_ds.h:594
uint8_t low_datarate_optimization
Indicates if the modem uses the low datarate optimization.
Definition: sx126x_ds.h:572
radio_ramp_time_t
Represents the ramping time for power amplifier.
lora_crc_mode_t
Represents the CRC mode for LoRa packet type.
lora_coding_tates_t coding_rate
Coding rate for the LoRa modulation.
Definition: sx126x_ds.h:571
lora_spread_factors_t
Represents the possible spreading factor values in LoRa packet types.
int8_t rssi_sync
The RSSI measured on last packet.
Definition: sx126x_ds.h:619
Preamble detection length 24 bits.
radio_whitening_mode_t
Radio whitening mode activated or deactivated.
No correlator turned on, i.e. do not search for SyncWord.
The radio is in receive duty cycle mode.
radio_operating_mode_t
Represents the operating mode the radio is actually running.
CRC activated.
CRC not used.
The radio is in frequency synthesis mode.
radio_TCXO_ctrl_voltage_t
Represents the volatge used to control the TCXO on/off from DIO3.
lora_cad_symbols_t
Represents the number of symbols to be used for channel activity detection operation.
Represents the packet status for every packet type.
Definition: sx126x_ds.h:613
cad_exit_modes_t
Represents the Channel Activity Detection actions after the CAD operation is finished.
lora_bandwidths_t
Represents the bandwidth values for LoRa packet type.
radio_mod_shaping_t
Represents the modulation shaping parameter.
struct packet_params::@49::@51 lora
Holds the LoRa packet parameters.
radio_address_filter_t
Represents the possible combinations of SyncWord correlators activated.
uint8_t syncword_length
The synchronization word length for GFSK packet type.
Definition: sx126x_ds.h:590
lora_IQ_mode_t invert_IQ
Allows to swap IQ for LoRa packet.
Definition: sx126x_ds.h:605
radio_pkt_length_t header_type
If the header is explicit, it will be transmitted in the GFSK packet. If the header is implicit...
Definition: sx126x_ds.h:592
The packet is known on both sides, no header included in the packet.
The radio is in standby mode with RC oscillator.
The radio is in deep-sleep mode.
enum radio_crc_types_e radio_crc_types_t
Represents the CRC length.
int8_t rssi_pkt
The RSSI of the last packet.
Definition: sx126x_ds.h:623
uint16_t preamble_length
The preamble Tx length for GFSK packet type in bit.
Definition: sx126x_ds.h:588
No CRC in use.
lora_pkt_length_t header_type
If the header is explicit, it will be transmitted in the LoRa packet. If the header is implicit...
Definition: sx126x_ds.h:602
The radio is in receive mode.
Preamble detection length off.
radio_modems_t modem_type
Packet to which the packet status are referring to.
Definition: sx126x_ds.h:163
radio_preamble_detection_t
Represents the preamble length used to detect the packet on Rx side.
lora_spread_factors_t spreading_factor
Spreading Factor for the LoRa modulation.
Definition: sx126x_ds.h:569
Represents a calibration configuration.
Definition: sx126x_ds.h:172
struct packet_params::@49::@50 gfsk
Holds the GFSK packet parameters.
uint8_t payload_length
Size of the payload in the GFSK packet.
Definition: sx126x_ds.h:593
radio_regulator_mode_t
Declares the power regulation used to power the device.
int8_t rssi_avg
The averaged RSSI.
Definition: sx126x_ds.h:618
struct packet_params packet_params_t
The type describing the packet parameters for every packet types.
radio_pkt_length_t
Radio packet length mode.
The radio is in transmit mode.
The packet is on variable size, header included.
lora_crc_mode_t crc_mode
Size of CRC block in LoRa packet.
Definition: sx126x_ds.h:604
radio_address_filter_t addr_comp
Activated SyncWord correlators.
Definition: sx126x_ds.h:591
radio_preamble_detection_t preamble_min_detect
The preamble Rx length minimal for GFSK packet type.
Definition: sx126x_ds.h:589
irq_error_t
Structure describing the error codes for callback functions.
The packet is on variable size, header included.
lora_pkt_length_t
Holds the lengths mode of a LoRa packet type.
radio_modems_t modem_type
Packet to which the packet status are referring to.
Definition: sx126x_ds.h:614
radio_modems_t modem_type
Packet to which the packet parameters are referring to.
Definition: sx126x_ds.h:582
radio_standby_mode_t
Declares the oscillator in use while in standby mode.
The radio is in standby mode with XOSC oscillator.
Represents the Rx internal counters values when GFSK or LoRa packet type is used. ...
Definition: sx126x_ds.h:162
radio_modems_t modem_type
Packet to which the modulation parameters are referring to.
Definition: sx126x_ds.h:558
Structure describing the radio status.
Definition: sx126x_ds.h:516
The type describing the modulation parameters for every packet types.
Definition: sx126x_ds.h:557
Important Information for this Arm website

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies. If you are not happy with the use of these cookies, please review our Cookie Policy to learn how they can be disabled. By disabling cookies, some features of the site will not work.