lriot 2.1.0.0
lr1110_system.h File Reference

System driver definition for LR1110. More...

Go to the source code of this file.

Macros

#define LR1110_SYSTEM_IMAGE_CALIBRATION_STEP_IN_MHZ   4
 Frequency step in MHz used to compute the image calibration parameter.
 

Functions

err_t lr1110_system_reset (lriot_t *ctx)
 Reset the radio.
 
err_t lr1110_system_wakeup (lriot_t *ctx)
 Wake the radio up from sleep mode.
 
err_t lr1110_system_get_status (lriot_t *ctx, lr1110_system_stat1_t *stat1, lr1110_system_stat2_t *stat2, lr1110_system_irq_mask_t *irq_status)
 Return stat1, stat2, and irq_status.
 
err_t lr1110_system_clear_reset_status_info (lriot_t *ctx)
 Clear the reset status information stored in stat2.
 
err_t lr1110_system_get_irq_status (lriot_t *ctx, lr1110_system_irq_mask_t *irq_status)
 Return irq_status.
 
err_t lr1110_system_get_version (lriot_t *ctx, lr1110_system_version_t *version)
 Return the version of the system (hardware and software)
 
err_t lr1110_system_get_errors (lriot_t *ctx, uint16_t *errors)
 Return the system errors.
 
err_t lr1110_system_clear_errors (lriot_t *ctx)
 Clear all error flags pending.
 
err_t lr1110_system_calibrate (lriot_t *ctx, uint8_t calib_param)
 lr1110_system_calibrate the requested blocks
 
err_t lr1110_system_set_reg_mode (lriot_t *ctx, lr1110_system_reg_mode_t reg_mode)
 Configure the regulator mode to be used in specific modes.
 
err_t lr1110_system_calibrate_image (lriot_t *ctx, uint8_t freq1, uint8_t freq2)
 Launch an image calibration valid for all frequencies inside an interval, in steps.
 
err_t lr1110_system_calibrate_image_in_mhz (lriot_t *ctx, uint16_t freq1_in_mhz, uint16_t freq2_in_mhz)
 Launch an image calibration valid for all frequencies inside an interval, in MHz.
 
err_t lr1110_system_set_dio_as_rf_switch (lriot_t *ctx, lr1110_system_rfswitch_cfg_t *rf_switch_cfg)
 Set the RF switch configurations for each RF setup.
 
err_t lr1110_system_set_dio_irq_params (lriot_t *ctx, lr1110_system_irq_mask_t irqs_to_enable_dio1, lr1110_system_irq_mask_t irqs_to_enable_dio2)
 Set which interrupt signals are redirected to the dedicated DIO pin.
 
err_t lr1110_system_clear_irq_status (lriot_t *ctx, lr1110_system_irq_mask_t irqs_to_clear)
 Clear requested bits in the internal pending interrupt register.
 
err_t lr1110_system_get_and_clear_irq_status (lriot_t *ctx, lr1110_system_irq_mask_t *irq)
 This helper function clears any radio irq status flags that are set and returns the flags that were cleared.
 
err_t lr1110_system_cfg_lfclk (lriot_t *ctx, lr1110_system_lfclk_cfg_t lfclock_cfg, bool wait_for_32k_ready)
 Defines which clock is used as Low Frequency (LF) clock.
 
err_t lr1110_system_set_tcxo_mode (lriot_t *ctx, lr1110_system_tcxo_supply_voltage_t tune, uint32_t timeout)
 Enable and configure TCXO supply voltage and detection timeout.
 
err_t lr1110_system_reboot (lriot_t *ctx, bool stay_in_bootloader)
 Software reset of the chip.
 
err_t lr1110_system_get_vbat (lriot_t *ctx, uint8_t *vbat)
 Returns the value of Vbat.
 
err_t lr1110_system_get_temp (lriot_t *ctx, uint16_t *temp)
 Returns the value of Temp.
 
err_t lr1110_system_set_sleep (lriot_t *ctx, lr1110_system_sleep_cfg_t sleep_cfg, uint32_t sleep_time)
 Set the device into Sleep or Deep Sleep Mode.
 
err_t lr1110_system_set_standby (lriot_t *ctx, lr1110_system_standby_cfg_t standby_cfg)
 Set the device into the requested Standby mode.
 
err_t lr1110_system_set_fs (lriot_t *ctx)
 Set the device into Frequency Synthesis (FS) mode.
 
err_t lr1110_system_erase_infopage (lriot_t *ctx, lr1110_system_infopage_id_t info_page_id)
 Erase an info page.
 
err_t lr1110_system_write_infopage (lriot_t *ctx, lr1110_system_infopage_id_t info_page_id, uint16_t address, uint32_t *data_buf, uint8_t length)
 Write data in an info page.
 
err_t lr1110_system_read_infopage (lriot_t *ctx, lr1110_system_infopage_id_t info_page_id, uint16_t address, uint32_t *data_buf, uint8_t length)
 Read data from an info page.
 
err_t lr1110_system_read_uid (lriot_t *ctx, lr1110_system_uid_t unique_identifier)
 Read and return the Unique Identifier of the LR1110.
 
err_t lr1110_system_read_join_eui (lriot_t *ctx, lr1110_system_join_eui_t join_eui)
 Read and return the Join EUI of the LR1110.
 
err_t lr1110_system_read_pin (lriot_t *ctx, lr1110_system_pin_t pin)
 Compute and return the PIN of the LR1110 based on factory default EUIs.
 
err_t lr1110_system_read_pin_custom_eui (lriot_t *ctx, lr1110_system_uid_t device_eui, lr1110_system_join_eui_t join_eui, uint8_t rfu, lr1110_system_pin_t pin)
 Compute and return the PIN of the LR1110 based on EUIs provided as parameters.
 
err_t lr1110_system_get_random_number (lriot_t *ctx, uint32_t *random_number)
 Read and return a 32-bit random number.
 
err_t lr1110_system_enable_spi_crc (lriot_t *ctx, bool enable_crc)
 Enable the CRC on SPI transactions.
 
err_t lr1110_system_drive_dio_in_sleep_mode (lriot_t *ctx, bool enable_drive)
 Configure the GPIO drive in sleep mode.
 

Detailed Description

System driver definition for LR1110.

The Clear BSD License Copyright Semtech Corporation 2021. All rights reserved.

Redistribution and use in source and binary forms, with or without modification, are permitted (subject to the limitations in the disclaimer below) provided that the following conditions are met:

  • Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
  • Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
  • Neither the name of the Semtech corporation nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

NO EXPRESS OR IMPLIED LICENSES TO ANY PARTY'S PATENT RIGHTS ARE GRANTED BY THIS LICENSE. THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL SEMTECH CORPORATION BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Macro Definition Documentation

◆ LR1110_SYSTEM_IMAGE_CALIBRATION_STEP_IN_MHZ

#define LR1110_SYSTEM_IMAGE_CALIBRATION_STEP_IN_MHZ   4

Frequency step in MHz used to compute the image calibration parameter.

See also
lr1110_system_calibrate_image_in_mhz

Function Documentation

◆ lr1110_system_calibrate()

err_t lr1110_system_calibrate ( lriot_t * ctx,
uint8_t calib_param )

lr1110_system_calibrate the requested blocks

This function can be called in any mode of the chip.

The chip will return to standby RC mode on exit. Potential calibration issues can be read out with lr1110_system_get_errors command.

Parameters
[in]ctxChip implementation context
[in]calib_paramStructure holding the reference to blocks to be calibrated
Returns
Operation status
See also
lr1110_system_get_errors

◆ lr1110_system_calibrate_image()

err_t lr1110_system_calibrate_image ( lriot_t * ctx,
uint8_t freq1,
uint8_t freq2 )

Launch an image calibration valid for all frequencies inside an interval, in steps.

This function can be called in any mode of the chip.

The chip will return to standby RC mode on exit. Potential calibration issues can be read out with lr1110_system_get_errors command.

The frequencies given in parameters are defined in 4MHz step (Eg. 900MHz corresponds to 0xE1). If freq1 = freq2, only one calibration is performed.

Parameters
[in]ctxChip implementation context
[in]freq1Image calibration interval lower bound, in steps
[in]freq2Image calibration interval upper bound, in steps
Remarks
freq1 must be less than or equal to freq2
Returns
Operation status
See also
lr1110_system_get_errors

◆ lr1110_system_calibrate_image_in_mhz()

err_t lr1110_system_calibrate_image_in_mhz ( lriot_t * ctx,
uint16_t freq1_in_mhz,
uint16_t freq2_in_mhz )

Launch an image calibration valid for all frequencies inside an interval, in MHz.

Remarks
This function relies on lr1110_system_calibrate_image
Parameters
[in]ctxChip implementation context
[in]freq1_in_mhzImage calibration interval lower bound, in MHz
[in]freq2_in_mhzImage calibration interval upper bound, in MHz
Remarks
freq1 must be less than or equal to freq2
Returns
Operation status
See also
lr1110_system_calibrate_image

◆ lr1110_system_cfg_lfclk()

err_t lr1110_system_cfg_lfclk ( lriot_t * ctx,
lr1110_system_lfclk_cfg_t lfclock_cfg,
bool wait_for_32k_ready )

Defines which clock is used as Low Frequency (LF) clock.

Parameters
[in]ctxChip implementation context
[in]lfclock_cfgLow frequency clock configuration
[in]wait_for_32k_readyTells the radio if it has to check if 32k source is ready before driving busy low
Returns
Operation status
See also
lr1110_system_calibrate, lr1110_system_calibrate_image

◆ lr1110_system_clear_errors()

err_t lr1110_system_clear_errors ( lriot_t * ctx)

Clear all error flags pending.

This function cannot be used to clear flags individually.

Parameters
[in]ctxChip implementation context
Returns
Operation status
See also
lr1110_system_get_errors

◆ lr1110_system_clear_irq_status()

err_t lr1110_system_clear_irq_status ( lriot_t * ctx,
lr1110_system_irq_mask_t irqs_to_clear )

Clear requested bits in the internal pending interrupt register.

Parameters
[in]ctxChip implementation context
[in]irqs_to_clearVariable that holds the interrupts to be cleared
Returns
Operation status

◆ lr1110_system_clear_reset_status_info()

err_t lr1110_system_clear_reset_status_info ( lriot_t * ctx)

Clear the reset status information stored in stat2.

Parameters
[in]ctxChip implementation context
Returns
Operation status

◆ lr1110_system_drive_dio_in_sleep_mode()

err_t lr1110_system_drive_dio_in_sleep_mode ( lriot_t * ctx,
bool enable_drive )

Configure the GPIO drive in sleep mode.

Remarks
GPIO stands for RF switch and IRQ line DIOs
Note
This command is available from firmware version 0x0306
Parameters
[in]ctxChip implementation context
[in]enable_driveGPIO drive configuration (true: enabled / false: disabled)
Returns
Operation status

◆ lr1110_system_enable_spi_crc()

err_t lr1110_system_enable_spi_crc ( lriot_t * ctx,
bool enable_crc )

Enable the CRC on SPI transactions.

Remarks
This command shall always be sent with a CRC (to both enable and disable the feature). The function does not take care of this additional byte - which is under the responsibility of the underlying HAL functions
Parameters
[in]ctxChip implementation context
[in]enable_crcCRC
Returns
Operation status

◆ lr1110_system_erase_infopage()

err_t lr1110_system_erase_infopage ( lriot_t * ctx,
lr1110_system_infopage_id_t info_page_id )

Erase an info page.

Parameters
[in]ctxChip implementation context
[in]info_page_idInfo page to be erased. Only LR1110_SYSTEM_INFOPAGE_1 is allowed.
Returns
Operation status
See also
lr1110_system_write_infopage, lr1110_system_read_infopage

◆ lr1110_system_get_and_clear_irq_status()

err_t lr1110_system_get_and_clear_irq_status ( lriot_t * ctx,
lr1110_system_irq_mask_t * irq )

This helper function clears any radio irq status flags that are set and returns the flags that were cleared.

Parameters
[in]ctxChip implementation context.
[out]irqPointer to a variable for holding the system interrupt status. Can be NULL.
Returns
Operation status
See also
lr1110_system_get_irq_status, lr1110_system_clear_irq_status

◆ lr1110_system_get_errors()

err_t lr1110_system_get_errors ( lriot_t * ctx,
uint16_t * errors )

Return the system errors.

Errors may be fixed following:

  • calibration error can be fixed by attempting another RC calibration;
  • XOsc related errors may be due to hardware problems, can be fixed by reset;
  • PLL lock related errors can be due to not-locked PLL, or by attempting to use an out-of-band frequency, can be fixed by executing a PLL calibration, or by using other frequencies.
Parameters
[in]ctxChip implementation context
[out]errorsPointer to a value holding error flags
Returns
Operation status
See also
lr1110_system_calibrate, lr1110_system_calibrate_image, lr1110_system_clear_errors

◆ lr1110_system_get_irq_status()

err_t lr1110_system_get_irq_status ( lriot_t * ctx,
lr1110_system_irq_mask_t * irq_status )

Return irq_status.

Parameters
[in]ctxChip implementation context
[out]irq_statusirq_status status variable
Returns
Operation status

◆ lr1110_system_get_random_number()

err_t lr1110_system_get_random_number ( lriot_t * ctx,
uint32_t * random_number )

Read and return a 32-bit random number.

Remarks
Radio operating mode must be set into standby.
Parameters
[in]ctxChip implementation context
[out]random_number32-bit random number
Returns
Operation status

◆ lr1110_system_get_status()

err_t lr1110_system_get_status ( lriot_t * ctx,
lr1110_system_stat1_t * stat1,
lr1110_system_stat2_t * stat2,
lr1110_system_irq_mask_t * irq_status )

Return stat1, stat2, and irq_status.

Parameters
[in]ctxChip implementation context
[out]stat1Pointer to a variable for holding stat1. Can be NULL.
[out]stat2Pointer to a variable for holding stat2. Can be NULL.
[out]irq_statusPointer to a variable for holding irq_status. Can be NULL.
Returns
Operation status
Remarks
To simplify system integration, this function does not actually execute the GetStatus command, which would require bidirectional SPI communication. It obtains the stat1, stat2, and irq_status values by performing an ordinary SPI read (which is required to send null/NOP bytes on the MOSI line). This is possible since the LR1110 returns these values automatically whenever a read that does not directly follow a response-carrying command is performed. Unlike with the GetStatus command, however, the reset status information is NOT cleared by this command. The function lr1110_system_clear_reset_status_info may be used for this purpose when necessary.

◆ lr1110_system_get_temp()

err_t lr1110_system_get_temp ( lriot_t * ctx,
uint16_t * temp )

Returns the value of Temp.

The temperature (in °C) is a function of Vana (typ. 1.35V), Vbe25 (Vbe voltage @ 25°C, typ. 0.7295V) and VbeSlope (typ. -1.7mV/°C) using the following formula: $ Temperature_{°C} = (\frac{Temp(10:0)}{2047} \times Vana - Vbe25) \times \frac{1000}{VbeSlope} + 25 $

Remarks
If a TCXO is used, make sure to configure it with lr1110_system_set_tcxo_mode before calling this function
Parameters
[in]ctxChip implementation context
[out]tempA pointer to the Temp value
Returns
Operation status

◆ lr1110_system_get_vbat()

err_t lr1110_system_get_vbat ( lriot_t * ctx,
uint8_t * vbat )

Returns the value of Vbat.

Vbat value (in V) is a function of Vana (typ. 1.35V) using the following formula: $ Vbat_{V} = (5 \times \frac{Vbat}{255} - 1) \times Vana $

Parameters
[in]ctxChip implementation context
[out]vbatA pointer to the Vbat value
Returns
Operation status

◆ lr1110_system_get_version()

err_t lr1110_system_get_version ( lriot_t * ctx,
lr1110_system_version_t * version )

Return the version of the system (hardware and software)

Parameters
[in]ctxChip implementation context
[out]versionPointer to the structure holding the system version
Returns
Operation status

◆ lr1110_system_read_infopage()

err_t lr1110_system_read_infopage ( lriot_t * ctx,
lr1110_system_infopage_id_t info_page_id,
uint16_t address,
uint32_t * data_buf,
uint8_t length )

Read data from an info page.

It is possible to cross from page 0 to 1 if (address + length >= 512)

Parameters
[in]ctxChip implementation context
[in]info_page_idInfo page where data are read
[in]addressAddress within the info page (aligned on 32-bit data)
[out]data_bufPointer to the data to read (data buffer shall be - at least - length words long)
[in]lengthNumber of 32-bit data to read (maximum value is 64)
Returns
Operation status
See also
lr1110_system_erase_infopage, lr1110_system_write_infopage

◆ lr1110_system_read_join_eui()

err_t lr1110_system_read_join_eui ( lriot_t * ctx,
lr1110_system_join_eui_t join_eui )

Read and return the Join EUI of the LR1110.

Parameters
[in]ctxChip implementation context
[out]join_euiThe buffer to be filled with Join EUI of the LR1110. It is up to the application to ensure join_eui is long enough to hold the join EUI
Returns
Operation status
See also
LR1110_SYSTEM_JOIN_EUI_LENGTH

◆ lr1110_system_read_pin()

err_t lr1110_system_read_pin ( lriot_t * ctx,
lr1110_system_pin_t pin )

Compute and return the PIN of the LR1110 based on factory default EUIs.

Remarks
Calling this command also triggers a derivation of network and application keys (available as LR1110_CRYPTO_KEYS_IDX_NWK_KEY and LR1110_CRYPTO_KEYS_IDX_APP_KEY) based on factory default EUIs
Parameters
[in]ctxChip implementation context
[out]pinThe buffer to be filled with PIN of the LR1110. It is up to the application to ensure pin is long enough to hold the PIN
Returns
Operation status
See also
LR1110_SYSTEM_PIN_LENGTH

◆ lr1110_system_read_pin_custom_eui()

err_t lr1110_system_read_pin_custom_eui ( lriot_t * ctx,
lr1110_system_uid_t device_eui,
lr1110_system_join_eui_t join_eui,
uint8_t rfu,
lr1110_system_pin_t pin )

Compute and return the PIN of the LR1110 based on EUIs provided as parameters.

Remarks
Calling this command also triggers a derivation of network and application keys (available as LR1110_CRYPTO_KEYS_IDX_NWK_KEY and LR1110_CRYPTO_KEYS_IDX_APP_KEY) based on EUIs provided as parameters
Parameters
[in]ctxChip implementation context
[in]device_euiCustom Device EUI
[in]join_euiCustom Join EUI
[in]rfuParameter RFU - shall be set to 0x00
[out]pinThe buffer to be filled with PIN of the LR1110. It is up to the application to ensure pin is long enough to hold the PIN
Returns
Operation status
See also
LR1110_SYSTEM_PIN_LENGTH

◆ lr1110_system_read_uid()

err_t lr1110_system_read_uid ( lriot_t * ctx,
lr1110_system_uid_t unique_identifier )

Read and return the Unique Identifier of the LR1110.

Parameters
[in]ctxChip implementation context
[out]unique_identifierThe buffer to be filled with the Unique Identifier of the LR1110. It is up to the application to ensure unique_identifier is long enough to hold the unique identifier
Returns
Operation status
See also
LR1110_SYSTEM_UID_LENGTH

◆ lr1110_system_reboot()

err_t lr1110_system_reboot ( lriot_t * ctx,
bool stay_in_bootloader )

Software reset of the chip.

This function should be used to reboot the chip in a specified mode. Rebooting in flash mode presumes that the content in flash memory is not corrupted (i.e. the integrity check performed by the bootloader before executing the first instruction in flash is OK).

Parameters
[in]ctxChip implementation context
[in]stay_in_bootloaderSelector to stay in bootloader or execute flash code after reboot. If true, the bootloader will not execute the flash code but activate SPI interface to allow firmware upgrade
Returns
Operation status

◆ lr1110_system_reset()

err_t lr1110_system_reset ( lriot_t * ctx)

Reset the radio.

Parameters
[in]ctxChip implementation context
Returns
Operation status

◆ lr1110_system_set_dio_as_rf_switch()

err_t lr1110_system_set_dio_as_rf_switch ( lriot_t * ctx,
lr1110_system_rfswitch_cfg_t * rf_switch_cfg )

Set the RF switch configurations for each RF setup.

This function shall only be called in standby RC mode.

By default, no DIO is used to control a RF switch. All DIOs are set in High-Z mode.

Parameters
[in]ctxChip implementation context
[in]rf_switch_cfgPointer to a structure that holds the switches configuration
Returns
Operation status

◆ lr1110_system_set_dio_irq_params()

err_t lr1110_system_set_dio_irq_params ( lriot_t * ctx,
lr1110_system_irq_mask_t irqs_to_enable_dio1,
lr1110_system_irq_mask_t irqs_to_enable_dio2 )

Set which interrupt signals are redirected to the dedicated DIO pin.

By default, no interrupt signal is redirected.

The dedicated DIO pin will remain asserted until all redirected interrupt signals are cleared with a call to lr1110_system_clear_irq_status.

Parameters
[in]ctxChip implementation context
[in]irqs_to_enable_dio1Variable that holds the interrupt mask for dio1
[in]irqs_to_enable_dio2Variable that holds the interrupt mask for dio2
Returns
Operation status
See also
lr1110_system_clear_irq_status

◆ lr1110_system_set_fs()

err_t lr1110_system_set_fs ( lriot_t * ctx)

Set the device into Frequency Synthesis (FS) mode.

Parameters
[in]ctxChip implementation context
Returns
Operation status
See also
lr1110_system_set_standby, lr1110_system_set_sleep

◆ lr1110_system_set_reg_mode()

err_t lr1110_system_set_reg_mode ( lriot_t * ctx,
lr1110_system_reg_mode_t reg_mode )

Configure the regulator mode to be used in specific modes.

This function shall only be called in standby RC mode.

The reg_mode parameter defines if the DC-DC converter is switched on in the following modes: STANDBY XOSC, FS, RX, TX and RX_CAPTURE.

Parameters
[in]ctxChip implementation context
[in]reg_modeRegulator mode configuration
Returns
Operation status

◆ lr1110_system_set_sleep()

err_t lr1110_system_set_sleep ( lriot_t * ctx,
lr1110_system_sleep_cfg_t sleep_cfg,
uint32_t sleep_time )

Set the device into Sleep or Deep Sleep Mode.

The sleep_cfg parameter defines in which sleep mode the device is put and if it wakes up after a given time on the RTC event.

The sleep_time parameter is taken into account only when RtcTimeout = 1. It sets the sleep time in number of clock cycles: $ sleep\_time\_ms = sleep_time \times \frac{1}{32.768} $

Parameters
[in]ctxChip implementation context
[in]sleep_cfgSleep mode configuration
[in]sleep_timeValue of the RTC timeout (if RtcTimeout = 1)
Returns
Operation status
See also
lr1110_system_set_standby, lr1110_system_set_fs

◆ lr1110_system_set_standby()

err_t lr1110_system_set_standby ( lriot_t * ctx,
lr1110_system_standby_cfg_t standby_cfg )

Set the device into the requested Standby mode.

Parameters
[in]ctxChip implementation context
[in]standby_cfgStand by mode configuration (RC or XOSC)
Returns
Operation status
See also
lr1110_system_set_sleep, lr1110_system_set_fs

◆ lr1110_system_set_tcxo_mode()

err_t lr1110_system_set_tcxo_mode ( lriot_t * ctx,
lr1110_system_tcxo_supply_voltage_t tune,
uint32_t timeout )

Enable and configure TCXO supply voltage and detection timeout.

This function shall only be called in standby RC mode.

The timeout parameter is the maximum time the firmware waits for the TCXO to be ready. The timeout duration is given by: $ timeout\_duration\_us = timeout \times 30.52 $

The TCXO mode can be disabled by setting timeout parameter to 0.

Parameters
[in]ctxChip implementation context
[in]tuneSupply voltage value
[in]timeoutGating time before which the radio starts its Rx / Tx operation
Returns
Operation status
See also
lr1110_system_calibrate, lr1110_system_calibrate_image

◆ lr1110_system_wakeup()

err_t lr1110_system_wakeup ( lriot_t * ctx)

Wake the radio up from sleep mode.

Parameters
[in]contextChip implementation context.
Returns
Operation status

◆ lr1110_system_write_infopage()

err_t lr1110_system_write_infopage ( lriot_t * ctx,
lr1110_system_infopage_id_t info_page_id,
uint16_t address,
uint32_t * data_buf,
uint8_t length )

Write data in an info page.

Parameters
[in]ctxChip implementation context
[in]info_page_idInfo page where data are written. Only LR1110_SYSTEM_INFOPAGE_1 is allowed.
[in]addressAddress within the info page (aligned on 32-bit data)
[in]data_bufPointer to the data to write (data buffer shall be - at least - length words long)
[in]lengthNumber of 32-bit data to write (maximum value is 64)
Returns
Operation status
See also
lr1110_system_erase_infopage, lr1110_system_read_infopage