Mistake on this page?
Report an issue in GitHub or email us
Data Structures | Macros | Typedefs | Enumerations
STM32WL_radio_driver.h File Reference

STM32WL driver implementation. More...

#include "LoRaRadio.h"

Go to the source code of this file.

Data Structures

struct  rx_counter_t
 Represents the Rx internal counters values when GFSK or LoRa packet type is used. More...
 
union  calibration_params_t
 Represents a calibration configuration. More...
 
union  radio_error_t
 Represents the possible radio system error states. More...
 
union  radio_status_t
 Structure describing the radio status. More...
 
struct  modulation_params_t
 The type describing the modulation parameters for every packet types. More...
 
struct  packet_params
 The type describing the packet parameters for every packet types. More...
 
struct  packet_status_t
 Represents the packet status for every packet type. More...
 

Macros

#define IS_TCXO_SUPPORTED   1U
 Indicates whether or not TCXO is supported by the board 0: TCXO not supported 1: TCXO supported. More...
 
#define SMPS_DRIVE_SETTING_DEFAULT   SMPS_DRV_40
 drive value used anytime radio is NOT in TX low power mode More...
 
#define SMPS_DRIVE_SETTING_MAX   SMPS_DRV_60
 drive value used anytime radio is in TX low power mode TX low power mode is the worst case because the PA sinks from SMPS while in high power mode, current is sunk directly from the battery More...
 
#define REG_XTA_TRIM   0x0911
 Change the value on the device internal trimming capacitor. More...
 
#define REG_XTB_TRIM   0x0912
 Change the value on the device internal trimming capacitor. More...
 
#define REG_OCP   0x08E7
 Set the current max value in the over current protection. More...
 
#define REG_TX_CLAMP   0x08D8
 PA Clamping threshold. More...
 
#define SUBGHZ_GBSYNCR   REG_BIT_SYNC
 Sub-GHz radio register (re) definition. More...
 
#define XTAL_FREQ   32000000
 Provides the frequency of the chip running on the radio and the frequency step. More...
 
#define MATCHING_FREQ_915   0
 List of matching supported by the STM32WL SubGHz. More...
 
#define AUTO_RX_TX_OFFSET   2
 Compensation delay for SetAutoTx/Rx functions in 15.625 microseconds. More...
 
#define CRC_IBM_SEED   0xFFFF
 LFSR initial value to compute IBM type CRC. More...
 
#define CRC_CCITT_SEED   0x1D0F
 LFSR initial value to compute CCIT type CRC. More...
 
#define CRC_POLYNOMIAL_IBM   0x8005
 Polynomial used to compute IBM CRC. More...
 
#define CRC_POLYNOMIAL_CCITT   0x1021
 Polynomial used to compute CCIT CRC. More...
 
#define REG_LR_CRCSEEDBASEADDR   0x06BC
 The address of the register holding the first byte defining the CRC seed. More...
 
#define REG_LR_CRCPOLYBASEADDR   0x06BE
 The address of the register holding the first byte defining the CRC polynomial. More...
 
#define REG_LR_WHITSEEDBASEADDR_MSB   0x06B8
 The address of the register holding the first byte defining the whitening seed. More...
 
#define REG_LR_PACKETPARAMS   0x0704
 The address of the register holding the packet configuration. More...
 
#define REG_LR_PAYLOADLENGTH   0x0702
 The address of the register holding the payload size. More...
 
#define REG_LR_SYNCWORDBASEADDRESS   0x06C0
 The addresses of the registers holding SyncWords values. More...
 
#define REG_LR_SYNCWORD   0x0740
 The addresses of the register holding LoRa Modem SyncWord value. More...
 
#define LORA_MAC_PRIVATE_SYNCWORD   0x1424
 
#define LORA_MAC_PUBLIC_SYNCWORD   0x3444
 
#define RANDOM_NUMBER_GENERATORBASEADDR   0x0819
 
#define REG_RX_GAIN   0x08AC
 
#define REG_FREQUENCY_ERRORBASEADDR   0x076B
 
#define REG_XTA_TRIM   0x0911
 Change the value on the device internal trimming capacitor. More...
 
#define REG_OCP   0x08E7
 Set the current max value in the over current protection. More...
 

Typedefs

typedef enum radio_crc_types_e radio_crc_types_t
 Represents the CRC length. More...
 
typedef struct packet_params packet_params_t
 The type describing the packet parameters for every packet types. More...
 

Enumerations

Detailed Description

STM32WL driver implementation.

Copyright 2021 STMicroelectronics SPDX-License-Identifier: BSD-3-Clause

Definition in file STM32WL_radio_driver.h.

Macro Definition Documentation

#define AUTO_RX_TX_OFFSET   2

Compensation delay for SetAutoTx/Rx functions in 15.625 microseconds.

Definition at line 166 of file STM32WL_radio_driver.h.

#define CRC_CCITT_SEED   0x1D0F

LFSR initial value to compute CCIT type CRC.

Definition at line 176 of file STM32WL_radio_driver.h.

#define CRC_IBM_SEED   0xFFFF

LFSR initial value to compute IBM type CRC.

Definition at line 171 of file STM32WL_radio_driver.h.

#define CRC_POLYNOMIAL_CCITT   0x1021

Polynomial used to compute CCIT CRC.

Definition at line 186 of file STM32WL_radio_driver.h.

#define CRC_POLYNOMIAL_IBM   0x8005

Polynomial used to compute IBM CRC.

Definition at line 181 of file STM32WL_radio_driver.h.

#define IS_TCXO_SUPPORTED   1U

Indicates whether or not TCXO is supported by the board 0: TCXO not supported 1: TCXO supported.

Definition at line 37 of file STM32WL_radio_driver.h.

#define LORA_MAC_PRIVATE_SYNCWORD   0x1424

Syncword for Private LoRa networks

Definition at line 228 of file STM32WL_radio_driver.h.

#define LORA_MAC_PUBLIC_SYNCWORD   0x3444

Syncword for Public LoRa networks

Definition at line 233 of file STM32WL_radio_driver.h.

#define MATCHING_FREQ_915   0

List of matching supported by the STM32WL SubGHz.

Definition at line 155 of file STM32WL_radio_driver.h.

#define RANDOM_NUMBER_GENERATORBASEADDR   0x0819

The address of the register giving a 4 bytes random number

Definition at line 238 of file STM32WL_radio_driver.h.

#define REG_FREQUENCY_ERRORBASEADDR   0x076B

The address of the register holding frequency error indication

Definition at line 248 of file STM32WL_radio_driver.h.

#define REG_LR_CRCPOLYBASEADDR   0x06BE

The address of the register holding the first byte defining the CRC polynomial.

Definition at line 197 of file STM32WL_radio_driver.h.

#define REG_LR_CRCSEEDBASEADDR   0x06BC

The address of the register holding the first byte defining the CRC seed.

Definition at line 192 of file STM32WL_radio_driver.h.

#define REG_LR_PACKETPARAMS   0x0704

The address of the register holding the packet configuration.

Definition at line 208 of file STM32WL_radio_driver.h.

#define REG_LR_PAYLOADLENGTH   0x0702

The address of the register holding the payload size.

Definition at line 213 of file STM32WL_radio_driver.h.

#define REG_LR_SYNCWORD   0x0740

The addresses of the register holding LoRa Modem SyncWord value.

Definition at line 223 of file STM32WL_radio_driver.h.

#define REG_LR_SYNCWORDBASEADDRESS   0x06C0

The addresses of the registers holding SyncWords values.

Definition at line 218 of file STM32WL_radio_driver.h.

#define REG_LR_WHITSEEDBASEADDR_MSB   0x06B8

The address of the register holding the first byte defining the whitening seed.

Definition at line 202 of file STM32WL_radio_driver.h.

#define REG_OCP   0x08E7

Set the current max value in the over current protection.

Set the current max value in the over current protection

Definition at line 258 of file STM32WL_radio_driver.h.

#define REG_OCP   0x08E7

Set the current max value in the over current protection.

Set the current max value in the over current protection

Definition at line 258 of file STM32WL_radio_driver.h.

#define REG_RX_GAIN   0x08AC

The address of the register holding RX Gain value (0x94: power saving, 0x96: rx boosted)

Definition at line 243 of file STM32WL_radio_driver.h.

#define REG_TX_CLAMP   0x08D8

PA Clamping threshold.

Definition at line 69 of file STM32WL_radio_driver.h.

#define REG_XTA_TRIM   0x0911

Change the value on the device internal trimming capacitor.

Change the value on the device internal trimming capacitor

Definition at line 253 of file STM32WL_radio_driver.h.

#define REG_XTA_TRIM   0x0911

Change the value on the device internal trimming capacitor.

Change the value on the device internal trimming capacitor

Definition at line 253 of file STM32WL_radio_driver.h.

#define REG_XTB_TRIM   0x0912

Change the value on the device internal trimming capacitor.

Definition at line 59 of file STM32WL_radio_driver.h.

#define SMPS_DRIVE_SETTING_DEFAULT   SMPS_DRV_40

drive value used anytime radio is NOT in TX low power mode

Definition at line 42 of file STM32WL_radio_driver.h.

#define SMPS_DRIVE_SETTING_MAX   SMPS_DRV_60

drive value used anytime radio is in TX low power mode TX low power mode is the worst case because the PA sinks from SMPS while in high power mode, current is sunk directly from the battery

Definition at line 49 of file STM32WL_radio_driver.h.

#define SUBGHZ_GBSYNCR   REG_BIT_SYNC

Sub-GHz radio register (re) definition.

Note
The sub-GHz radio peripheral registers can be accessed by sub-GHz radio command SUBGRF_WriteRegisters() and SUBGRF_ReadRegisters() "

Definition at line 77 of file STM32WL_radio_driver.h.

#define XTAL_FREQ   32000000

Provides the frequency of the chip running on the radio and the frequency step.

Remarks
These defines are used for computing the frequency divider to set the RF frequency

Definition at line 146 of file STM32WL_radio_driver.h.

Typedef Documentation

The type describing the packet parameters for every packet types.

typedef enum radio_crc_types_e radio_crc_types_t

Represents the CRC length.

Enumeration Type Documentation

enum cad_exit_modes_t

Represents the Channel Activity Detection actions after the CAD operation is finished.

Definition at line 376 of file STM32WL_radio_driver.h.

enum irq_error_t

Structure describing the error codes for callback functions.

Definition at line 589 of file STM32WL_radio_driver.h.

enum lora_bandwidths_t

Represents the bandwidth values for LoRa packet type.

Definition at line 437 of file STM32WL_radio_driver.h.

enum lora_cad_symbols_t

Represents the number of symbols to be used for channel activity detection operation.

Definition at line 365 of file STM32WL_radio_driver.h.

Represents the coding rate values for LoRa packet type.

Definition at line 455 of file STM32WL_radio_driver.h.

enum lora_crc_mode_t

Represents the CRC mode for LoRa packet type.

Enumerator
LORA_CRC_ON 

CRC activated.

LORA_CRC_OFF 

CRC not used.

Definition at line 524 of file STM32WL_radio_driver.h.

enum lora_IQ_mode_t

Represents the IQ mode for LoRa packet type.

Definition at line 532 of file STM32WL_radio_driver.h.

enum lora_pkt_length_t

Holds the lengths mode of a LoRa packet type.

Enumerator
LORA_PACKET_VARIABLE_LENGTH 

The packet is on variable size, header included.

LORA_PACKET_FIXED_LENGTH 

The packet is known on both sides, no header included in the packet.

Definition at line 514 of file STM32WL_radio_driver.h.

enum lora_spread_factors_t

Represents the possible spreading factor values in LoRa packet types.

Definition at line 423 of file STM32WL_radio_driver.h.

enum radio_address_filter_t

Represents the possible combinations of SyncWord correlators activated.

Enumerator
RADIO_ADDRESSCOMP_FILT_OFF 

No correlator turned on, i.e. do not search for SyncWord.

Definition at line 476 of file STM32WL_radio_driver.h.

enum radio_crc_types_e

Represents the CRC length.

Enumerator
RADIO_CRC_OFF 

No CRC in use.

Definition at line 493 of file STM32WL_radio_driver.h.

enum radio_irq_masks_t

Represents the interruption masks available for the radio.

Remarks
Note that not all these interruptions are available for all packet types

Definition at line 556 of file STM32WL_radio_driver.h.

enum radio_mod_shaping_t

Represents the modulation shaping parameter.

Definition at line 385 of file STM32WL_radio_driver.h.

enum radio_operating_mode_t

Represents the operating mode the radio is actually running.

Enumerator
MODE_DEEP_SLEEP 

The radio is in sleep mode.

MODE_STDBY_RC 

The radio is in deep-sleep mode.

MODE_STDBY_XOSC 

The radio is in standby mode with RC oscillator.

MODE_FS 

The radio is in standby mode with XOSC oscillator.

MODE_TX 

The radio is in frequency synthesis mode.

MODE_RX 

The radio is in transmit mode.

MODE_RX_DC 

The radio is in receive mode.

MODE_CAD 

The radio is in receive duty cycle mode.

The radio is in channel activity detection mode

Definition at line 314 of file STM32WL_radio_driver.h.

enum radio_pkt_length_t

Radio packet length mode.

Enumerator
RADIO_PACKET_VARIABLE_LENGTH 

The packet is on variable size, header included.

RADIO_PACKET_FIXED_LENGTH 

The packet is known on both sides, no header included in the packet.

Definition at line 485 of file STM32WL_radio_driver.h.

enum radio_preamble_detection_t

Represents the preamble length used to detect the packet on Rx side.

Enumerator
RADIO_PREAMBLE_DETECTOR_OFF 

Preamble detection length off.

RADIO_PREAMBLE_DETECTOR_08_BITS 

Preamble detection length 8 bits.

RADIO_PREAMBLE_DETECTOR_16_BITS 

Preamble detection length 16 bits.

RADIO_PREAMBLE_DETECTOR_24_BITS 

Preamble detection length 24 bits.

RADIO_PREAMBLE_DETECTOR_32_BITS 

Preamble detection length 32 bit.

Definition at line 465 of file STM32WL_radio_driver.h.

enum radio_ramp_time_t

Represents the ramping time for power amplifier.

Definition at line 351 of file STM32WL_radio_driver.h.

enum radio_regulator_mode_t

Declares the power regulation used to power the device.

This command allows the user to specify if DC-DC or LDO is used for power regulation. Using only LDO implies that the Rx or Tx current is doubled

Definition at line 343 of file STM32WL_radio_driver.h.

enum radio_rx_bandwidth_t

Represents the modulation shaping parameter.

Definition at line 396 of file STM32WL_radio_driver.h.

enum radio_standby_mode_t

Declares the oscillator in use while in standby mode.

Using the STDBY_RC standby mode allow to reduce the energy consumption STDBY_XOSC should be used for time critical applications

Definition at line 332 of file STM32WL_radio_driver.h.

enum radio_TCXO_ctrl_voltage_t

Represents the volatge used to control the TCXO on/off from DIO3.

Definition at line 540 of file STM32WL_radio_driver.h.

enum radio_whitening_mode_t

Radio whitening mode activated or deactivated.

Definition at line 506 of file STM32WL_radio_driver.h.

enum RFState_t

Radio driver internal state machine states definition.

Enumerator
RFSWITCH_RX 

The radio is in RX.

RFSWITCH_TX 

The radio is in TX.

Definition at line 693 of file STM32WL_radio_driver.h.

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.