Sub-GHz Interface#
The Sub-GHz Interface module provides interfaces for interacting with Sub-GHz radio hardware within the Sidewalk SDK.
Modules#
Functions#
Initializes the radio.
Deinitialize the radio.
Configure irq mask.
Get current irq mask settings.
Radio irq processing.
Set the frequency for the radio.
Set the radio transmit power.
Get the radio max transmit power setting for a given data rate.
Set the radio region.
Set the radio to sleep.
Set the radio to standby.
Set the radio to busy state.
Set the radio in preamble detect mode.
Set the radio in receive mode.
Set the radio to continuous receive.
Set the receive duty cycle.
Set the transmit continuous wave.
Set transmit payload for the radio to transmit.
Start packet transmission.
Get the radio state.
Get the current radio modem mode.
Set radio modem mode.
Check the channel noise level for a given rssi.
Compute the noise sensed by radio at a particular frequency.
Get RSSI at radio's current configured frequency.
Get a random number from radio.
Get antenna gain in dBi.
Get the cca adjustment in dB.
Get the delay in microseconds to switch between different radio states.
Check the CAD exit mode.
Radio LoRa Modulation specific APIs.
Set LoRa sync word.
Set LoRa modulation parameters.
Set LoRa packet parameters.
Set LoRa CAD parameters.
Set the radio in CAD mode.
convert LoRa modulation params to data rate.
Convert data rate to LoRa modulation parameters.
Get time on air for a LoRa packet.
get CAD duration for a given number of symbols and lora mod_params
Calculates the minimum number of symbols that takes more than delay_micro_sec of air time.
Get the time between the last bit sent (on Tx side) and the Rx done event (on Rx side)
Get the time between Tx schedule and the first bit of Tx.
Get the time of LoRa Rx processing delay.
Get LoRa symbol timeout in us.
Radio FSK Modulation specific APIs.
Set fsk whitening seed.
Set fsk modulation parameters.
Set fsk packet parameters.
convert fsk modulation params to data rate.
Convert data rate to fsk modulation parameters.
Get time on air for a fsk packet.
Calculates the minimum number of symbols that takes more than delay_micro_secs of air time.
Get the time between Tx schedule and the first bit of Tx.
Get the time of FSK Rx processing delay.
Setup transmit in fsk mode.
Setup receive in fsk mode.
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/A |
sid_pal_radio_irq_process#
int32_t sid_pal_radio_irq_process (void )
Radio irq processing.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/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.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/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.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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)
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/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.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/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.
Type | Direction | Argument Name | Description |
---|---|---|---|
void | N/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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.
Type | Direction | Argument Name | Description |
---|---|---|---|
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.