Sub-GHz Interface#

The Sub-GHz Interface module provides interfaces for interacting with Sub-GHz radio hardware within the Sidewalk SDK.

Modules#

Type definitions

Functions#

int32_t
sid_pal_radio_init(sid_pal_radio_event_notify_t notify, sid_pal_radio_irq_handler_t dio_irq_handler, sid_pal_radio_rx_packet_t *rx_packet)

Initializes the radio.

int32_t

Deinitialize the radio.

sid_pal_radio_configure_irq_mask(sid_pal_radio_irq_mask_t irq_mask)

Configure irq mask.

int32_t

Radio irq processing.

int32_t

Set the frequency for the radio.

int32_t

Set the radio transmit power.

int32_t
sid_pal_radio_get_max_tx_power(sid_pal_radio_data_rate_t data_rate, int8_t *tx_power)

Get the radio max transmit power setting for a given data rate.

int32_t
sid_pal_radio_set_region(sid_pal_radio_region_code_t region)

Set the radio region.

int32_t
sid_pal_radio_sleep(uint32_t sleep_us)

Set the radio to sleep.

int32_t

Set the radio to standby.

int32_t

Set the radio to busy state.

int32_t
sid_pal_radio_start_carrier_sense(const sid_pal_radio_fsk_cad_params_t *cad_params, sid_pal_radio_cad_param_exit_mode_t exit_mode)

Set the radio in preamble detect mode.

int32_t
sid_pal_radio_start_rx(uint32_t timeout)

Set the radio in receive mode.

int32_t

Set the radio to continuous receive.

int32_t
sid_pal_radio_set_rx_duty_cycle(uint32_t rx_time, uint32_t sleep_time)

Set the receive duty cycle.

int32_t
sid_pal_radio_set_tx_continuous_wave(uint32_t freq, int8_t power)

Set the transmit continuous wave.

int32_t
sid_pal_radio_set_tx_payload(const uint8_t *buffer, uint8_t size)

Set transmit payload for the radio to transmit.

int32_t
sid_pal_radio_start_tx(uint32_t timeout)

Start packet transmission.

uint8_t

Get the radio state.

Get the current radio modem mode.

int32_t
sid_pal_radio_set_modem_mode(sid_pal_radio_modem_mode_t mode)

Set radio modem mode.

int32_t
sid_pal_radio_is_channel_free(uint32_t freq, int16_t threshold, uint32_t delay_us, bool *is_channel_free)

Check the channel noise level for a given rssi.

int32_t
sid_pal_radio_get_chan_noise(uint32_t freq, int16_t *noise)

Compute the noise sensed by radio at a particular frequency.

int16_t

Get RSSI at radio's current configured frequency.

int32_t
sid_pal_radio_random(uint32_t *random)

Get a random number from radio.

int16_t

Get antenna gain in dBi.

int32_t
sid_pal_radio_get_cca_level_adjust(sid_pal_radio_data_rate_t data_rate, int8_t *adj_level)

Get the cca adjustment in dB.

int32_t
sid_pal_radio_get_radio_state_transition_delays(sid_pal_radio_state_transition_timings_t *state_delay)

Get the delay in microseconds to switch between different radio states.

int32_t
sid_pal_radio_is_cad_exit_mode(sid_pal_radio_cad_param_exit_mode_t mode)

Check the CAD exit mode.

int32_t

Radio LoRa Modulation specific APIs.

int32_t

Set LoRa sync word.

int32_t
sid_pal_radio_set_lora_modulation_params(const sid_pal_radio_lora_modulation_params_t *mod_params)

Set LoRa modulation parameters.

int32_t
sid_pal_radio_set_lora_packet_params(const sid_pal_radio_lora_packet_params_t *packet_params)

Set LoRa packet parameters.

int32_t
sid_pal_radio_set_lora_cad_params(const sid_pal_radio_lora_cad_params_t *cad_params)

Set LoRa CAD parameters.

int32_t

Set the radio in CAD mode.

sid_pal_radio_lora_mod_params_to_data_rate(const sid_pal_radio_lora_modulation_params_t *mod_params)

convert LoRa modulation params to data rate.

int32_t
sid_pal_radio_lora_data_rate_to_mod_params(sid_pal_radio_lora_modulation_params_t *mod_params, sid_pal_radio_data_rate_t data_rate, uint8_t li_enable)

Convert data rate to LoRa modulation parameters.

uint32_t
sid_pal_radio_lora_time_on_air(const sid_pal_radio_lora_modulation_params_t *mod_params, const sid_pal_radio_lora_packet_params_t *packet_params, uint8_t packet_len)

Get time on air for a LoRa packet.

uint32_t
sid_pal_radio_lora_cad_duration(uint8_t symbol, const sid_pal_radio_lora_modulation_params_t *mod_params)

get CAD duration for a given number of symbols and lora mod_params

uint32_t
sid_pal_radio_lora_get_lora_number_of_symbols(const sid_pal_radio_lora_modulation_params_t *mod_params, uint32_t delay_micro_sec)

Calculates the minimum number of symbols that takes more than delay_micro_sec of air time.

uint32_t
sid_pal_radio_get_lora_rx_done_delay(const sid_pal_radio_lora_modulation_params_t *mod_params, const sid_pal_radio_lora_packet_params_t *pkt_params)

Get the time between the last bit sent (on Tx side) and the Rx done event (on Rx side)

uint32_t

Get the time between Tx schedule and the first bit of Tx.

uint32_t

Get the time of LoRa Rx processing delay.

uint32_t
sid_pal_radio_get_lora_symbol_timeout_us(sid_pal_radio_lora_modulation_params_t *mod_params, uint8_t number_of_symbol)

Get LoRa symbol timeout in us.

int32_t
sid_pal_radio_set_fsk_sync_word(const uint8_t *sync_word, uint8_t sync_word_length)

Radio FSK Modulation specific APIs.

int32_t

Set fsk whitening seed.

int32_t
sid_pal_radio_set_fsk_modulation_params(const sid_pal_radio_fsk_modulation_params_t *mod_params)

Set fsk modulation parameters.

int32_t
sid_pal_radio_set_fsk_packet_params(const sid_pal_radio_fsk_packet_params_t *packet_params)

Set fsk packet parameters.

sid_pal_radio_fsk_mod_params_to_data_rate(const sid_pal_radio_fsk_modulation_params_t *mp)

convert fsk modulation params to data rate.

int32_t
sid_pal_radio_fsk_data_rate_to_mod_params(sid_pal_radio_fsk_modulation_params_t *mod_params, sid_pal_radio_data_rate_t data_rate)

Convert data rate to fsk modulation parameters.

uint32_t
sid_pal_radio_fsk_time_on_air(const sid_pal_radio_fsk_modulation_params_t *mod_params, const sid_pal_radio_fsk_packet_params_t *packet_params, uint8_t packet_len)

Get time on air for a fsk packet.

uint32_t
sid_pal_radio_fsk_get_fsk_number_of_symbols(const sid_pal_radio_fsk_modulation_params_t *mod_params, uint32_t delay_micro_secs)

Calculates the minimum number of symbols that takes more than delay_micro_secs of air time.

uint32_t

Get the time between Tx schedule and the first bit of Tx.

uint32_t

Get the time of FSK Rx processing delay.

int32_t
sid_pal_radio_prepare_fsk_for_tx(sid_pal_radio_fsk_pkt_cfg_t *tx_pkt_cfg)

Setup transmit in fsk mode.

int32_t
sid_pal_radio_prepare_fsk_for_rx(sid_pal_radio_fsk_pkt_cfg_t *rx_pkt_cfg)

Setup receive in fsk mode.

int32_t
sid_pal_radio_set_fsk_crc_polynomial(uint16_t crc_polynomial, uint16_t crc_seed)

Configure crc parameters.

Function Documentation#

sid_pal_radio_init#

int32_t sid_pal_radio_init (sid_pal_radio_event_notify_t notify, sid_pal_radio_irq_handler_t dio_irq_handler, sid_pal_radio_rx_packet_t * rx_packet)

Initializes the radio.

Parameters
TypeDirectionArgument NameDescription
sid_pal_radio_event_notify_t[in]notify

routine called as part of bottom half processing of the radio interrupt.

sid_pal_radio_irq_handler_t[in]dio_irq_handler

irq handler to notify the protocol that interrupt has occurred. The protocol switches context to a task or a software interrupt to continue with the bottom half processing of the interrupt.

sid_pal_radio_rx_packet_t *[in]rx_packet

to protocol's receive packet buffer.

Registers the radio event callback, interrupt callback and pointer to the protocol's receive packet buffer. Sets and enables the radio interrupts.


sid_pal_radio_deinit#

int32_t sid_pal_radio_deinit (void )

Deinitialize the radio.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Resets the radio and clear all configuration.


sid_pal_radio_configure_irq_mask#

sid_pal_radio_irq_mask_t sid_pal_radio_configure_irq_mask (sid_pal_radio_irq_mask_t irq_mask)

Configure irq mask.

Parameters
TypeDirectionArgument NameDescription
sid_pal_radio_irq_mask_t[in]irq_mask

Configure the interrupts that the low level driver has to generate. The protocol configures the interrupts it is interested in based on modem mode. The radio driver has a default mask that can be retrieved with sid_pal_radio_get_current_config_irq_mask.


sid_pal_radio_get_current_config_irq_mask#

sid_pal_radio_irq_mask_t sid_pal_radio_get_current_config_irq_mask (void )

Get current irq mask settings.

Parameters
TypeDirectionArgument NameDescription
voidN/A

sid_pal_radio_irq_process#

int32_t sid_pal_radio_irq_process (void )

Radio irq processing.

Parameters
TypeDirectionArgument NameDescription
voidN/A

The function reads the irq status register and reports radio event to the phy layer through the callback routine registered as part of sid_pal_radio_init. The protocol after being notified on receiving a radio interrupt switches from hardware isr to software isr context to continue with bottom half processing of the radio interrupt. sid_pal_radio_irq_process should determine the cause of interrupt and notify the protocol of the phy event through the event handler registered as part of sid_pal_radio_init. On packet reception, this API has to copy the received packet from radio buffers to the rx packet registered as part of sid_pal_radio_init


sid_pal_radio_set_frequency#

int32_t sid_pal_radio_set_frequency (uint32_t freq)

Set the frequency for the radio.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]freq

frequency in Hz


sid_pal_radio_set_tx_power#

int32_t sid_pal_radio_set_tx_power (int8_t power)

Set the radio transmit power.

Parameters
TypeDirectionArgument NameDescription
int8_t[in]power

tx power in dB


sid_pal_radio_get_max_tx_power#

int32_t sid_pal_radio_get_max_tx_power (sid_pal_radio_data_rate_t data_rate, int8_t * tx_power)

Get the radio max transmit power setting for a given data rate.

Parameters
TypeDirectionArgument NameDescription
sid_pal_radio_data_rate_t[in]data_rate

rate

int8_t *[out]tx_power

tx power populated by this API


sid_pal_radio_set_region#

int32_t sid_pal_radio_set_region (sid_pal_radio_region_code_t region)

Set the radio region.

Parameters
TypeDirectionArgument NameDescription
sid_pal_radio_region_code_t[in]region

region


sid_pal_radio_sleep#

int32_t sid_pal_radio_sleep (uint32_t sleep_us)

Set the radio to sleep.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]sleep_us

time period for which the radio should be put in sleep mode

The protocol expects the radio to be set in lowest power consumption state possible.


sid_pal_radio_standby#

int32_t sid_pal_radio_standby (void )

Set the radio to standby.

Parameters
TypeDirectionArgument NameDescription
voidN/A

The protocol sets the radio to standby mode in the following scenarios: To wake the radio from sleep state To configure modulation parameters, packet parameters, cad, frequency, power etc


sid_pal_set_radio_busy#

int32_t sid_pal_set_radio_busy (void )

Set the radio to busy state.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Busy state is used for concurrent stacks operation. Set the state of radio to busy to block another stack from using the radio peripheral. Calling sid_pal_radio_sleep() replaces SID_PAL_RADIO_BUSY state with SID_PAL_RADIO_SLEEP state.


sid_pal_radio_start_carrier_sense#

int32_t sid_pal_radio_start_carrier_sense (const sid_pal_radio_fsk_cad_params_t * cad_params, sid_pal_radio_cad_param_exit_mode_t exit_mode)

Set the radio in preamble detect mode.

Parameters
TypeDirectionArgument NameDescription
const sid_pal_radio_fsk_cad_params_t *[in]cad_params

in microseconds for how long radio is in receive mode. The upper bound of the timeout value is specific to each vendor's driver implementation.

sid_pal_radio_cad_param_exit_mode_t[in]exit_mode

exit mode of carrier sense operation


sid_pal_radio_start_rx#

int32_t sid_pal_radio_start_rx (uint32_t timeout)

Set the radio in receive mode.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]timeout

in microseconds for how long radio is in receive mode. The upper bound of the timeout value is specific to each vendor's driver implementation.


sid_pal_radio_start_continuous_rx#

int32_t sid_pal_radio_start_continuous_rx (void )

Set the radio to continuous receive.

Parameters
TypeDirectionArgument NameDescription
voidN/A

sid_pal_radio_set_rx_duty_cycle#

int32_t sid_pal_radio_set_rx_duty_cycle (uint32_t rx_time, uint32_t sleep_time)

Set the receive duty cycle.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]rx_time

time in milliseconds spent by radio in receive.

uint32_t[in]sleep_time

time in milliseconds spent by radio in sleep.

Configures the radio receive duty cycle. The protocol uses this API to set the radio to alternate between receive and sleep states. The radio in this mode should not interrupt the protocol unless it detects a valid packet.


sid_pal_radio_set_tx_continuous_wave#

int32_t sid_pal_radio_set_tx_continuous_wave (uint32_t freq, int8_t power)

Set the transmit continuous wave.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]freq

frequency in Hz on which to transmit a continuous wave.

int8_t[in]power

power in dB at which the continuous wave has to be transmitted

Confiure the radio to transmit a continuous wave. This API is used for diagnostics mode only


sid_pal_radio_set_tx_payload#

int32_t sid_pal_radio_set_tx_payload (const uint8_t * buffer, uint8_t size)

Set transmit payload for the radio to transmit.

Parameters
TypeDirectionArgument NameDescription
const uint8_t *[in]buffer

pointer to the buffer containing the tx packet.

uint8_t[in]size

length of the packet that needs to be transmitted.

Writes the payload and payload length to radio buffers but the packet is not transmitted on the air.


sid_pal_radio_start_tx#

int32_t sid_pal_radio_start_tx (uint32_t timeout)

Start packet transmission.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]timeout

timeout in microseconds

Starts the packet transmission. This needs to be invoked after all the radio configuration viz modulation params, packet params, freq, power, payload and payload length are set atleast once. The radio should be able to transmit the packet within the timeout specfied through this API. If it fails to transmit the packet within the stipulated timeout value, the radio driver should generate a interrupt with tx timeout as the reason


sid_pal_radio_get_status#

uint8_t sid_pal_radio_get_status (void )

Get the radio state.

Parameters
TypeDirectionArgument NameDescription
voidN/A

The protocol uses this API to query its current state


sid_pal_radio_get_modem_mode#

sid_pal_radio_modem_mode_t sid_pal_radio_get_modem_mode (void )

Get the current radio modem mode.

Parameters
TypeDirectionArgument NameDescription
voidN/A

Supported modem modes are LoRa and FSK


sid_pal_radio_set_modem_mode#

int32_t sid_pal_radio_set_modem_mode (sid_pal_radio_modem_mode_t mode)

Set radio modem mode.

Parameters
TypeDirectionArgument NameDescription
sid_pal_radio_modem_mode_t[in]mode

LoRa = 1 or FSK = 0

The driver should configure all the parameters to operate in the desired mode. Supported modem modes are LoRa and FSK


sid_pal_radio_is_channel_free#

int32_t sid_pal_radio_is_channel_free (uint32_t freq, int16_t threshold, uint32_t delay_us, bool * is_channel_free)

Check the channel noise level for a given rssi.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]freq

frequency in Hz to measure noise level.

int16_t[in]threshold

rssi threshold in dBm

uint32_t[in]delay_us

period in microseconds for radio to sense the medium

bool *[out]is_channel_free

boolean to store the result of the operation

The radio should sense the medium in the frequency specified by parameter freq for a period specified by delay_us, compute the rssi, and compare the computed rssi with the passed threshold specified by the parameter threshold. If the computed rssi is greater than threshold, the parameter is_channel_free is set to false otherwise it is set to true. If any of the above operations fail, appropriate error value will be returned.


sid_pal_radio_get_chan_noise#

int32_t sid_pal_radio_get_chan_noise (uint32_t freq, int16_t * noise)

Compute the noise sensed by radio at a particular frequency.

Parameters
TypeDirectionArgument NameDescription
uint32_t[in]freq

frequency in Hz on which noise level is to be measured.

int16_t *[out]noise

pointer to variable to store the avg noise in dBm


sid_pal_radio_rssi#

int16_t sid_pal_radio_rssi (void )

Get RSSI at radio's current configured frequency.

Parameters
TypeDirectionArgument NameDescription
voidN/A

The frequency on which RSSI needs to be measured needs to be set before calling this API.


sid_pal_radio_random#

int32_t sid_pal_radio_random (uint32_t * random)

Get a random number from radio.

Parameters
TypeDirectionArgument NameDescription
uint32_t *[out]random

pointer to store the random number


sid_pal_radio_get_ant_dbi#

int16_t sid_pal_radio_get_ant_dbi (void )

Get antenna gain in dBi.

Parameters
TypeDirectionArgument NameDescription
voidN/A

sid_pal_radio_get_cca_level_adjust#

int32_t sid_pal_radio_get_cca_level_adjust (sid_pal_radio_data_rate_t data_rate, int8_t * adj_level)

Get the cca adjustment in dB.

Parameters
TypeDirectionArgument NameDescription
sid_pal_radio_data_rate_t[in]data_rate

rate

int8_t *[out]adj_level

pointer to CCA level adjustment in dB get by this API


sid_pal_radio_get_radio_state_transition_delays#

int32_t sid_pal_radio_get_radio_state_transition_delays (sid_pal_radio_state_transition_timings_t * state_delay)

Get the delay in microseconds to switch between different radio states.

Parameters
TypeDirectionArgument NameDescription
sid_pal_radio_state_transition_timings_t *[out]state_delay

of switching delay between different radio states


sid_pal_radio_is_cad_exit_mode#

int32_t sid_pal_radio_is_cad_exit_mode (sid_pal_radio_cad_param_exit_mode_t mode)

Check the CAD exit mode.

Parameters
TypeDirectionArgument NameDescription
sid_pal_radio_cad_param_exit_mode_t[in]mode

CAD exit mode.

Check with supported CAD exit modes


sid_pal_radio_set_lora_symbol_timeout#

int32_t sid_pal_radio_set_lora_symbol_timeout (uint8_t num_of_symbols)

Radio LoRa Modulation specific APIs.

Parameters
TypeDirectionArgument NameDescription
uint8_t[in]num_of_symbols

number of symbols the radio has to detect before reporting a rx timeout interrupt

Set LoRa symbol timeout.


sid_pal_radio_set_lora_sync_word#

int32_t sid_pal_radio_set_lora_sync_word (uint16_t sync_word)

Set LoRa sync word.

Parameters
TypeDirectionArgument NameDescription
uint16_t[in]sync_word

sid_pal_radio_set_lora_modulation_params#

int32_t sid_pal_radio_set_lora_modulation_params (const sid_pal_radio_lora_modulation_params_t * mod_params)

Set LoRa modulation parameters.

Parameters
TypeDirectionArgument NameDescription
const sid_pal_radio_lora_modulation_params_t *[in]mod_params

pointer to Sidewalk LoRa modulation params.


sid_pal_radio_set_lora_packet_params#

int32_t sid_pal_radio_set_lora_packet_params (const sid_pal_radio_lora_packet_params_t * packet_params)

Set LoRa packet parameters.

Parameters
TypeDirectionArgument NameDescription
const sid_pal_radio_lora_packet_params_t *[in]packet_params

pointer to Sidewalk LoRa packet params.


sid_pal_radio_set_lora_cad_params#

int32_t sid_pal_radio_set_lora_cad_params (const sid_pal_radio_lora_cad_params_t * cad_params)

Set LoRa CAD parameters.

Parameters
TypeDirectionArgument NameDescription
const sid_pal_radio_lora_cad_params_t *[in]cad_params

pointer to Sidewalk CAD params.


sid_pal_radio_lora_start_cad#

int32_t sid_pal_radio_lora_start_cad (void )

Set the radio in CAD mode.

Parameters
TypeDirectionArgument NameDescription
voidN/A

sid_pal_radio_lora_mod_params_to_data_rate#

sid_pal_radio_data_rate_t sid_pal_radio_lora_mod_params_to_data_rate (const sid_pal_radio_lora_modulation_params_t * mod_params)

convert LoRa modulation params to data rate.

Parameters
TypeDirectionArgument NameDescription
const sid_pal_radio_lora_modulation_params_t *[in]mod_params

pointer to LoRa modulation params.


sid_pal_radio_lora_data_rate_to_mod_params#

int32_t sid_pal_radio_lora_data_rate_to_mod_params (sid_pal_radio_lora_modulation_params_t * mod_params, sid_pal_radio_data_rate_t data_rate, uint8_t li_enable)

Convert data rate to LoRa modulation parameters.

Parameters
TypeDirectionArgument NameDescription
sid_pal_radio_lora_modulation_params_t *[out]mod_params

pointer to LoRa modulation params.

sid_pal_radio_data_rate_t[in]data_rate

rate.

uint8_t[in]li_enable

enable/disable long interleaver mode


sid_pal_radio_lora_time_on_air#

uint32_t sid_pal_radio_lora_time_on_air (const sid_pal_radio_lora_modulation_params_t * mod_params, const sid_pal_radio_lora_packet_params_t * packet_params, uint8_t packet_len)

Get time on air for a LoRa packet.

Parameters
TypeDirectionArgument NameDescription
const sid_pal_radio_lora_modulation_params_t *[in]mod_params

pointer to LoRa modulation params.

const sid_pal_radio_lora_packet_params_t *[in]packet_params

pointer to LoRa packet params.

uint8_t[in]packet_len

length of the packet that needs to be transmitted.


sid_pal_radio_lora_cad_duration#

uint32_t sid_pal_radio_lora_cad_duration (uint8_t symbol, const sid_pal_radio_lora_modulation_params_t * mod_params)

get CAD duration for a given number of symbols and lora mod_params

Parameters
TypeDirectionArgument NameDescription
uint8_t[in]symbol

symbol timeout for the CAD configuration.

const sid_pal_radio_lora_modulation_params_t *[in]mod_params

pointer to LoRa modulation params.


sid_pal_radio_lora_get_lora_number_of_symbols#

uint32_t sid_pal_radio_lora_get_lora_number_of_symbols (const sid_pal_radio_lora_modulation_params_t * mod_params, uint32_t delay_micro_sec)

Calculates the minimum number of symbols that takes more than delay_micro_sec of air time.

Parameters
TypeDirectionArgument NameDescription
const sid_pal_radio_lora_modulation_params_t *[in]mod_params

Current modulation parameters that phy uses. If null, zero will be returned.

uint32_t[in]delay_micro_sec

Input amount of time that will be translated to number of symbols.

In the case of a fractional number of symbols, the return value is rounded up to the next integer. Does not affect the radio state and can be executed without radio ownership. In the case of an error, 0 is returned.


sid_pal_radio_get_lora_rx_done_delay#

uint32_t sid_pal_radio_get_lora_rx_done_delay (const sid_pal_radio_lora_modulation_params_t * mod_params, const sid_pal_radio_lora_packet_params_t * pkt_params)

Get the time between the last bit sent (on Tx side) and the Rx done event (on Rx side)

Parameters
TypeDirectionArgument NameDescription
const sid_pal_radio_lora_modulation_params_t *[in]mod_params

Pointer to a structure holding the LoRa modulation parameters used for the computation

const sid_pal_radio_lora_packet_params_t *[in]pkt_params

Pointer to a structure holding the LoRa packet parameters used for the computation


sid_pal_radio_get_lora_tx_process_delay#

uint32_t sid_pal_radio_get_lora_tx_process_delay (void )

Get the time between Tx schedule and the first bit of Tx.

Parameters
TypeDirectionArgument NameDescription
voidN/A

sid_pal_radio_get_lora_rx_process_delay#

uint32_t sid_pal_radio_get_lora_rx_process_delay (void )

Get the time of LoRa Rx processing delay.

Parameters
TypeDirectionArgument NameDescription
voidN/A

sid_pal_radio_get_lora_symbol_timeout_us#

uint32_t sid_pal_radio_get_lora_symbol_timeout_us (sid_pal_radio_lora_modulation_params_t * mod_params, uint8_t number_of_symbol)

Get LoRa symbol timeout in us.

Parameters
TypeDirectionArgument NameDescription
sid_pal_radio_lora_modulation_params_t *[in]mod_params

pointer to Sidewalk LoRa modulation params.

uint8_t[in]number_of_symbol

number of symbol


sid_pal_radio_set_fsk_sync_word#

int32_t sid_pal_radio_set_fsk_sync_word (const uint8_t * sync_word, uint8_t sync_word_length)

Radio FSK Modulation specific APIs.

Parameters
TypeDirectionArgument NameDescription
const uint8_t *[in]sync_word
uint8_t[in]sync_word_length

Set fsk sync word


sid_pal_radio_set_fsk_whitening_seed#

int32_t sid_pal_radio_set_fsk_whitening_seed (uint16_t seed)

Set fsk whitening seed.

Parameters
TypeDirectionArgument NameDescription
uint16_t[in]seed

sid_pal_radio_set_fsk_modulation_params#

int32_t sid_pal_radio_set_fsk_modulation_params (const sid_pal_radio_fsk_modulation_params_t * mod_params)

Set fsk modulation parameters.

Parameters
TypeDirectionArgument NameDescription
const sid_pal_radio_fsk_modulation_params_t *[in]mod_params

pointer to Sidewalk fsk modulation params.


sid_pal_radio_set_fsk_packet_params#

int32_t sid_pal_radio_set_fsk_packet_params (const sid_pal_radio_fsk_packet_params_t * packet_params)

Set fsk packet parameters.

Parameters
TypeDirectionArgument NameDescription
const sid_pal_radio_fsk_packet_params_t *[in]packet_params

pointer to Sidewalk fsk packet params.


sid_pal_radio_fsk_mod_params_to_data_rate#

sid_pal_radio_data_rate_t sid_pal_radio_fsk_mod_params_to_data_rate (const sid_pal_radio_fsk_modulation_params_t * mp)

convert fsk modulation params to data rate.

Parameters
TypeDirectionArgument NameDescription
const sid_pal_radio_fsk_modulation_params_t *[in]mp

pointer to fsk modulation params.


sid_pal_radio_fsk_data_rate_to_mod_params#

int32_t sid_pal_radio_fsk_data_rate_to_mod_params (sid_pal_radio_fsk_modulation_params_t * mod_params, sid_pal_radio_data_rate_t data_rate)

Convert data rate to fsk modulation parameters.

Parameters
TypeDirectionArgument NameDescription
sid_pal_radio_fsk_modulation_params_t *[out]mod_params

pointer to fsk modulation params.

sid_pal_radio_data_rate_t[in]data_rate

data rate.


sid_pal_radio_fsk_time_on_air#

uint32_t sid_pal_radio_fsk_time_on_air (const sid_pal_radio_fsk_modulation_params_t * mod_params, const sid_pal_radio_fsk_packet_params_t * packet_params, uint8_t packet_len)

Get time on air for a fsk packet.

Parameters
TypeDirectionArgument NameDescription
const sid_pal_radio_fsk_modulation_params_t *[in]mod_params

pointer to fsk modulation params.

const sid_pal_radio_fsk_packet_params_t *[in]packet_params

poiner to fsk packet params.

uint8_t[in]packet_len

length of the packet that needs to be transmitted in bytes.


sid_pal_radio_fsk_get_fsk_number_of_symbols#

uint32_t sid_pal_radio_fsk_get_fsk_number_of_symbols (const sid_pal_radio_fsk_modulation_params_t * mod_params, uint32_t delay_micro_secs)

Calculates the minimum number of symbols that takes more than delay_micro_secs of air time.

Parameters
TypeDirectionArgument NameDescription
const sid_pal_radio_fsk_modulation_params_t *[in]mod_params

Current modulation parameters that phy uses. If null, zero will be returned.

uint32_t[in]delay_micro_secs

Input amount of time in uS that will be translated to number of symbols.

In the case of a fractional number of symbols, the return value is rounded up to the next integer. Does not affect the radio state and can be executed without radio ownership. In the case of an error, 0 is returned.


sid_pal_radio_get_fsk_tx_process_delay#

uint32_t sid_pal_radio_get_fsk_tx_process_delay (void )

Get the time between Tx schedule and the first bit of Tx.

Parameters
TypeDirectionArgument NameDescription
voidN/A

sid_pal_radio_get_fsk_rx_process_delay#

uint32_t sid_pal_radio_get_fsk_rx_process_delay (void )

Get the time of FSK Rx processing delay.

Parameters
TypeDirectionArgument NameDescription
voidN/A

sid_pal_radio_prepare_fsk_for_tx#

int32_t sid_pal_radio_prepare_fsk_for_tx (sid_pal_radio_fsk_pkt_cfg_t * tx_pkt_cfg)

Setup transmit in fsk mode.

Parameters
TypeDirectionArgument NameDescription
sid_pal_radio_fsk_pkt_cfg_t *[inout]tx_pkt_cfg

tx packet config

This API is used to configure the sync word, packet params perform crc, and data whitening on the payload, and determine the packet length. This API needs to be called before calling sid_pal_radio_set_payload and sid_pal_radio_start_tx in FSK mode.


sid_pal_radio_prepare_fsk_for_rx#

int32_t sid_pal_radio_prepare_fsk_for_rx (sid_pal_radio_fsk_pkt_cfg_t * rx_pkt_cfg)

Setup receive in fsk mode.

Parameters
TypeDirectionArgument NameDescription
sid_pal_radio_fsk_pkt_cfg_t *[in]rx_pkt_cfg

pointer to fsk packet config

This API is used to configure the sync word and packet params. This API needs to be called before calling sid_pal_radio_start_rx in FSK mode.


sid_pal_radio_set_fsk_crc_polynomial#

int32_t sid_pal_radio_set_fsk_crc_polynomial (uint16_t crc_polynomial, uint16_t crc_seed)

Configure crc parameters.

Parameters
TypeDirectionArgument NameDescription
uint16_t[in]crc_polynomial

polynomial for crc calculation

uint16_t[in]crc_seed

seed value for crc calculation

This API is used to configure the crc polynomial and seed. This API needs to be called before tx and rx in FSK mode.