System RTC#
Introduction#
The System Real-Time Clock (SYSRTC) offers precise timekeeping and timer functionality essential for various applications. It is fundamental for tasks that require accurate time measurement, event scheduling, and power management. This SYSRTC driver provides a comprehensive set of functions to configure and utilize peripherals effectively, ensuring optimal performance and reliability in time-critical applications.
Configuration#
The configuration parameters of the SYSRTC function include setting the clock frequency and initializing and enabling the peripherals:
Setting the clock source frequency: Choose between 32kHz RC or 1kHz RO clock sources using the sl_si91x_sysrtc_configure_clock function.
Initialization: Initialize and enable the SYSRTC peripheral with the sl_si91x_sysrtc_init function.
Additionally, configure the SYSRTC to continue running during a debug halt by specifying the appropriate setting in the initialization function.
For more information on configuring available parameters, see the respective peripheral example readme document.
Usage#
The SYSRTC has to be initialized by calling the following parameters:
Configure the SYSRTC input clock frequency by using the sl_si91x_sysrtc_configure_clock function.
Initialize the SYSRTC and enable the peripherals by calling the sl_si91x_sysrtc_init function.
Once configured, the SYSRTC can be customized to specific application requirements by using the following functions:
Configure the group number and enable its compare and capture channels by using the sl_si91x_sysrtc_configure_group function.
To handle timer interrupts and execute actions accordingly, use the sl_si91x_sysrtc_register_callback function to register callback functions.
Further functions allow for fine-grained control over time-sensitive operations:
Setting compare values: Use the sl_si91x_sysrtc_set_compare_value function.
Retrieving the current counter value: Use the sl_si91x_sysrtc_get_count function.
Start the timer: Enable the timer with the sl_si91x_sysrtc_start function.
Stop the timer: Disable the timer using the sl_si91x_sysrtc_stop function.
Lock SYSRTC registers: Secure the SYSRTC registers with the sl_si91x_sysrtc_lock function.
The following functions will initiate and configure the SYSRTC, representing the general flow for implementation:
Configure the SYSRTC input clock frequency by using the sl_si91x_sysrtc_configure_clock function.
Initialize the SYSRTC and enable the peripherals by calling the sl_si91x_sysrtc_init function.
Configure the SYSRTC group number and enable its compare and capture channels by using the sl_si91x_sysrtc_configure_group function.
Register the callback for the timer interrupt by using the sl_si91x_sysrtc_register_callback function.
Set the SYSRTC counter register value with the sl_si91x_sysrtc_set_count function.
Set the SYSRTC compare value for the selected channel of the group by using the sl_si91x_sysrtc_set_compare_value function, if the compare channel is enabled.
Get the SYSRTC running status with the sl_si91x_sysrtc_is_running function, if required to check the timer running status.
Start the SYSRTC counter by using the sl_si91x_sysrtc_start function.
Get the SYSRTC current counter register value by using the sl_si91x_sysrtc_get_count function if needed.
Stop the SYSRTC counter by using the sl_si91x_sysrtc_stop function.
De-initialize the SYSRTC by disabling its clock by calling the sl_si91x_sysrtc_deinit function.
Modules#
Enumerations#
Enumeration to represent SYSRTC group numbers.
Enumeration to represent SYSRTC channel numbers.
Typedefs#
clock sources enum
SYSRTC config structure.
SYSRTC group config structure.
renaming group compare channel config structure
renaming group capture channel config structure
Typedef for the SYSRTC callback function.
Functions#
To initialize SYSRTC and enable the peripheral.
To configure the SYSRTC input clock source frequency.
To configure the SYSRTC groups of compare and capture channels.
To register the callback for the timer interrupt.
To unregister the timer interrupt callback.
To set the SYSRTC compare value for the selected channel of the given group.
To get the SYSRTC current compare register value for the selected channel of the selected group.
To set register-input for the capture channel of the selected group of SYSRTC.
To configure input pins for the SYSRTC capture channel of the selected group.
To configure the output pins of the selected compare channel of the given group.
To get the SYSRTC current counter register value.
To get the SYSRTC capture register value of a given group.
To read the SYSRTC compare channel output bit value of a given group.
To get the SYSRTC running status.
To get the SYSRTC lock status.
To set the SYSRTC input/output mode for the capture and compare channels.
To start the SYSRTC counter.
To stop the SYSRTC counter.
To reset the SYSRTC to its default state.
To lock the SYSRTC registers.
To unlock the SYSRTC registers.
To set the SYSRTC counter register value.
To get the SYSRTC version.
To de-initialize the SYSRTC by disabling its clock.
Enumeration Documentation#
sl_sysrtc_group_number_t#
sl_sysrtc_group_number_t
Enumeration to represent SYSRTC group numbers.
This enumeration defines the group numbers for the SYSRTC module. It includes options for group 0, group 1, and a validation member.
Enumerator | |
---|---|
SL_SYSRTC_GROUP_0 | Enumerator for SYSRTC group 0. |
SL_SYSRTC_GROUP_1 | Enumerator for SYSRTC group 1. |
SL_SYSRTC_GROUP_LAST | Last enumerator for validation. |
80
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_sysrtc_channel_number_t#
sl_sysrtc_channel_number_t
Enumeration to represent SYSRTC channel numbers.
This enumeration defines the channel numbers for the SYSRTC module. It includes options for channel 0, channel 1, and a validation member.
Enumerator | |
---|---|
SL_SYSRTC_CHANNEL_0 | Enumerator for SYSRTC channel 0. |
SL_SYSRTC_CHANNEL_1 | Enumerator for SYSRTC channel 1. |
SL_SYSRTC_CHANNEL_LAST | Last enumerator for validation. |
92
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
Typedef Documentation#
sl_clock_sources_t#
typedef rsi_sysrtc_clk_inp_t sl_clock_sources_t
clock sources enum
55
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_sysrtc_config_t#
typedef rsi_sysrtc_config_t sl_sysrtc_config_t
SYSRTC config structure.
56
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_sysrtc_group_config_t#
typedef rsi_sysrtc_group_config_t sl_sysrtc_group_config_t
SYSRTC group config structure.
57
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_sysrtc_group_compare_channel_action_config_t#
typedef rsi_sysrtc_group_channel_compare_config_t sl_sysrtc_group_compare_channel_action_config_t
renaming group compare channel config structure
59
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_sysrtc_group_capture_channel_input_edge_config_t#
typedef rsi_sysrtc_group_channel_capture_config_t sl_sysrtc_group_capture_channel_input_edge_config_t
renaming group capture channel config structure
61
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_sysrtc_callback_t#
typedef void(* sl_sysrtc_callback_t) (void *callback_flag) )(void *callback_flag)
Typedef for the SYSRTC callback function.
[in] | callback_flag | Pointer to a user-defined flag or data structure that can be used within the callback function. |
This typedef defines the function signature for the callback function used by the SYSRTC. The callback function is called when a specific SYSRTC event occurs.
72
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
Function Documentation#
sl_si91x_sysrtc_init#
sl_status_t sl_si91x_sysrtc_init (const sl_sysrtc_config_t * config_ptr)
To initialize SYSRTC and enable the peripheral.
[in] | config_ptr | Pointer to the SYSRTC configuration structure sl_sysrtc_config_t. |
This API initializes the SYSRTC and configures it to run during debug halt, based on user input.
Pre-condition:
sl_si91x_sysrtc_configure_clock must be called before this function.
Returns
sl_status_t Status code indicating the result:
SL_STATUS_OK (0x0000) - Success, SYSRTC initialized properly.
SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer.
For more information on status codes, see SL STATUS DOCUMENTATION.
158
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_configure_clock#
sl_status_t sl_si91x_sysrtc_configure_clock (sl_sysrtc_clock_config_t * clk_ptr)
To configure the SYSRTC input clock source frequency.
[in] | clk_ptr | Pointer to the clock configuration structure sl_sysrtc_clock_config_t. |
This API configures the clock source for the SYSRTC. It allows the selection of 32kHz RC, 32kHz RO, or 1kHz RO clock sources based on user input. For using the 1kHz clock source, pass the division factor value as '16'; otherwise, pass '0'.
Returns
sl_status_t Status code indicating the result:
SL_STATUS_OK (0x0000) - Success, timer clock-source parameters configured properly.
SL_STATUS_INVALID_PARAMETER (0x0021) - Clock source parameter has an invalid value.
SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer.
For more information on status codes, see SL STATUS DOCUMENTATION.
176
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_configure_group#
sl_status_t sl_si91x_sysrtc_configure_group (sl_sysrtc_group_number_t group_number, sl_sysrtc_group_config_t const * config_ptr)
To configure the SYSRTC groups of compare and capture channels.
[in] | group_number | SYSRTC group number to be used. |
[in] | config_ptr | Pointer to the group configuration structure sl_sysrtc_group_config_t. |
Configures the specified group number and enables its compare and capture channels. Additionally, sets up match-out actions for the corresponding compare channels and input events for the capture channels.
Pre-conditions:
sl_si91x_sysrtc_configure_clock must be called before this function.
sl_si91x_sysrtc_init must be called before this function.
Returns
sl_status_t Status code indicating the result:
SL_STATUS_OK (0x0000) - Success, parameters configured properly.
SL_STATUS_INVALID_PARAMETER (0x0021) - Counter direction parameter has an invalid value.
SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer.
For more information on status codes, see SL STATUS DOCUMENTATION.
199
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_register_callback#
sl_status_t sl_si91x_sysrtc_register_callback (sl_sysrtc_callback_t on_sysrtc_callback, void * callback_flag_value, sl_sysrtc_group_number_t group_number, sl_sysrtc_interrupt_enables_t * interrupt_enable_ptr)
To register the callback for the timer interrupt.
[in] | on_sysrtc_callback | Function pointer to the callback function to be called when a timer interrupt occurs. |
[in] | callback_flag_value | Pointer to the interrupt flag value variable sl_sysrtc_callback_t. |
[in] | group_number | SYSRTC group number whose interrupts need to be enabled. |
[in] | interrupt_enable_ptr | Pointer to the interrupt enable structure sl_sysrtc_interrupt_enables_t. |
Registers the callback for the timer interrupt and enables the corresponding interrupts based on the selected interrupt flags.
Pre-conditions:
sl_si91x_sysrtc_init must be called before this function.
sl_si91x_sysrtc_configure_clock must be called before this function.
sl_si91x_sysrtc_configure_group() must be called with the respective interrupt channel enabled.
sl_si91x_sysrtc_unregister_callback() must be called if already registered for any interrupt.
Returns
sl_status_t Status code indicating the result:
SL_STATUS_OK (0x0000) - Successfully registered timer timeout callback.
SL_STATUS_BUSY (0x0004) - The callback is already registered; unregister the previous callback before registering a new one.
SL_STATUS_INVALID_PARAMETER (0x0021) - The group_number parameter has an invalid value.
SL_STATUS_NULL_POINTER (0x0022) - The interrupt_enable_ptr parameter is a null pointer.
For more information on status codes, see SL STATUS DOCUMENTATION.
227
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_unregister_callback#
sl_status_t sl_si91x_sysrtc_unregister_callback (sl_sysrtc_group_number_t group_number, sl_sysrtc_interrupt_enables_t * interrupt_enabled_handle)
To unregister the timer interrupt callback.
[in] | group_number | SYSRTC group number whose interrupts need to be disabled. |
[in] | interrupt_enabled_handle | Pointer to the interrupt enable structure sl_sysrtc_interrupt_enables_t. |
Unregisters the timer interrupt callback and disables interrupts according to the selected interrupt flag.
Pre-conditions:
sl_si91x_sysrtc_register_callback() must be called first to register a particular interrupt flag.
Returns
sl_status_t Status code indicating the result:
SL_STATUS_OK (0x0000) - Successfully unregistered timer interrupt callback.
SL_STATUS_INVALID_PARAMETER (0x0021) - The group_number parameter has an invalid value.
SL_STATUS_NULL_POINTER (0x0022) - The interrupt_enabled_handle parameter is a null pointer.
For more information on status codes, see SL STATUS DOCUMENTATION.
251
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_set_compare_value#
sl_status_t sl_si91x_sysrtc_set_compare_value (sl_sysrtc_group_number_t group_number, sl_sysrtc_channel_number_t channel, uint32_t compare_value)
To set the SYSRTC compare value for the selected channel of the given group.
[in] | group_number | SYSRTC group number to use. |
[in] | channel | Channel number to use. |
[in] | compare_value | Compare register value. |
This API sets the SYSRTC compare register value for the specified channel within the given group.
Pre-conditions:
First enable the compare channel of the respective group through sl_si91x_sysrtc_configure_group.
Returns
sl_status_t Status code indicating the result:
SL_STATUS_OK (0x0000) - Success, parameters configured properly.
SL_STATUS_INVALID_PARAMETER (0x0021) - The group_number or channel parameter has an invalid value.
For more information on status codes, see SL STATUS DOCUMENTATION.
274
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_get_compare_value#
sl_status_t sl_si91x_sysrtc_get_compare_value (sl_sysrtc_group_number_t group_number, sl_sysrtc_channel_number_t channel, uint32_t * compare_value)
To get the SYSRTC current compare register value for the selected channel of the selected group.
[in] | group_number | SYSRTC group number to use. |
[in] | channel | Channel number to use. |
[out] | compare_value | Pointer to the variable to store the compare value read. |
This API retrieves the current compare register value for the specified channel within the given group.
Returns
sl_status_t Status code indicating the result:
SL_STATUS_OK (0x0000) - Success, parameters configured properly.
SL_STATUS_INVALID_PARAMETER (0x0021) - The group_number or channel parameter has an invalid value.
SL_STATUS_NULL_POINTER (0x0022) - The compare_value parameter is a null pointer.
For more information on status codes, see SL STATUS DOCUMENTATION.
295
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_sets_register_capture_input#
sl_status_t sl_si91x_sysrtc_sets_register_capture_input (sl_sysrtc_group_number_t group_number)
To set register-input for the capture channel of the selected group of SYSRTC.
[in] | group_number | SYSRTC group number to use. |
This API sets the register-input for the capture channel of the selected SYSRTC group, configuring the SYSRTC Input (Capture) from the register.
Pre-conditions:
First, enable and configure the capture channel of the respective group through sl_si91x_sysrtc_configure_group.
Disable GPIO input through sl_si91x_sysrtc_enable_input_output_gpio by passing false.
Returns
sl_status_t Status code indicating the result:
SL_STATUS_OK (0x0000) - Success, parameters configured properly.
SL_STATUS_INVALID_PARAMETER (0x0021) - The group_number parameter has an invalid value.
For more information on status codes, see SL STATUS DOCUMENTATION.
319
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_set_gpio_as_capture_input#
sl_status_t sl_si91x_sysrtc_set_gpio_as_capture_input (sl_sysrtc_group_number_t group_number)
To configure input pins for the SYSRTC capture channel of the selected group.
[in] | group_number | SYSRTC group number to use. |
Configures GPIO-0 and GPIO-1 as input pins for the capture channel of group 0 and group 1, respectively. Sets pins mode, mux, and direction.
Pre-conditions:
First, enable and configure the capture channel of the respective group through sl_si91x_sysrtc_configure_group.
Enable GPIO IO through sl_si91x_sysrtc_enable_input_output_gpio by passing true.
Returns
sl_status_t Status code indicating the result:
SL_STATUS_OK (0x0000) - Success, parameters configured properly.
SL_STATUS_INVALID_PARAMETER (0x0021) - The group_number parameter has an invalid value.
For more information on status codes, see SL STATUS DOCUMENTATION.
342
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_set_compare_output_gpio#
sl_status_t sl_si91x_sysrtc_set_compare_output_gpio (sl_sysrtc_group_number_t group_number, sl_sysrtc_channel_number_t channel)
To configure the output pins of the selected compare channel of the given group.
[in] | group_number | SYSRTC group number to use. |
[in] | channel | Channel number to use. |
Configures GPIO-3 and GPIO-4 as output pins for compare channels 0 and 1 of group 0, respectively. Configures GPIO-1 and GPIO-2 as output pins for compare channels 0 and 1 of group 1, respectively. Sets pins mode, mux, and direction, and enables the input buffer for the pins.
Pre-conditions:
First, enable and configure the output action of the compare channel of the respective group through sl_si91x_sysrtc_configure_group.
Returns
sl_status_t Status code indicating the result:
SL_STATUS_OK (0x0000) - Success, parameters configured properly.
SL_STATUS_INVALID_PARAMETER (0x0021) - The group_number or channel parameter has an invalid value.
For more information on status codes, see SL STATUS DOCUMENTATION.
365
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_get_count#
sl_status_t sl_si91x_sysrtc_get_count (uint32_t * count_value)
To get the SYSRTC current counter register value.
[in] | count_value | Pointer to the variable to store the count value read. |
Updates the current count of the timer to the count_value input parameter.
Returns
sl_status_t Status code indicating the result:
SL_STATUS_OK (0x0000) - Success, count value retrieved properly.
SL_STATUS_NULL_POINTER (0x0022) - The count_value parameter is a null pointer.
For more information on status codes, see SL STATUS DOCUMENTATION.
382
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_get_capture_value#
sl_status_t sl_si91x_sysrtc_get_capture_value (sl_sysrtc_group_number_t group_number, uint32_t * capture_value)
To get the SYSRTC capture register value of a given group.
[in] | group_number | SYSRTC group number to use. |
[out] | capture_value | Pointer to the variable to store the capture value read. |
Updates the capture count value of the timer to the capture_value input parameter.
Returns
sl_status_t Status code indicating the result:
SL_STATUS_OK (0x0000) - Success, parameters configured properly.
SL_STATUS_INVALID_PARAMETER (0x0021) - The group_number parameter has an invalid value.
SL_STATUS_NULL_POINTER (0x0022) - The capture_value parameter is a null pointer.
For more information on status codes, see SL STATUS DOCUMENTATION.
400
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_get_compare_output#
sl_status_t sl_si91x_sysrtc_get_compare_output (sl_sysrtc_group_number_t group_number, sl_sysrtc_channel_number_t channel, uint32_t * compare_output_bit)
To read the SYSRTC compare channel output bit value of a given group.
[in] | group_number | SYSRTC group number to use. |
[in] | channel | Channel number to use. |
[out] | compare_output_bit | Pointer to the variable to store the compare output. |
Updates the bit value to the compare_output_bit input parameter.
Returns
sl_status_t Status code indicating the result:
SL_STATUS_OK (0x0000) - Success, parameters configured properly.
SL_STATUS_INVALID_PARAMETER (0x0021) - The group_number or channel parameter has an invalid value.
SL_STATUS_NULL_POINTER (0x0022) - The compare_output_bit parameter is a null pointer.
For more information on status codes, see SL STATUS DOCUMENTATION.
419
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_is_running#
sl_status_t sl_si91x_sysrtc_is_running (boolean_t * running_status)
To get the SYSRTC running status.
[in] | running_status | Pointer to the variable to store the SYSRTC running status. |
Updates the running_status input parameter to 'true' if SYSRTC is running; otherwise, it updates the parameter to 'false'.
Returns
sl_status_t Status code indicating the result:
SL_STATUS_OK (0x0000) - Success, parameters configured properly.
SL_STATUS_NULL_POINTER (0x0022) - The running_status parameter is a null pointer.
For more information on status codes, see SL STATUS DOCUMENTATION.
437
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_is_locked#
sl_status_t sl_si91x_sysrtc_is_locked (boolean_t * lock_status)
To get the SYSRTC lock status.
[in] | lock_status | Pointer to the variable to store SYSRTC lock status. |
Updates the lock_status input parameter to 'true' if SYSRTC is locked or to 'false' if it is unlocked.
Returns
sl_status_t Status code indicating the result:
SL_STATUS_OK (0x0000) - Success, parameters configured properly.
SL_STATUS_NULL_POINTER (0x0022) - The lock_status parameter is a null pointer.
For more information on status codes, see SL STATUS DOCUMENTATION.
453
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_enable_input_output_gpio#
void sl_si91x_sysrtc_enable_input_output_gpio (bool is_gpio_enabled)
To set the SYSRTC input/output mode for the capture and compare channels.
[in] | is_gpio_enabled | Boolean to enable or disable IO through GPIO. |
If "is_gpio_enabled" is set to "true", the input to capture and output from compare channels will be through GPIO. If set to "false", the input to capture and output from compare channels can be set through registers.
465
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_start#
__STATIC_INLINE void sl_si91x_sysrtc_start (void )
To start the SYSRTC counter.
N/A |
This API sends a start command to the SYSRTC peripheral and waits until the command has been executed.
Pre-conditions:
sl_si91x_sysrtc_init must be called.
sl_si91x_sysrtc_configure_clock() must be called with software trigger disabled.
sl_si91x_sysrtc_configure_group() must be called with the respective interrupt channel enabled.
sl_si91x_sysrtc_register_callback must be called with the respective interrupt enabled.
sl_si91x_sysrtc_set_count must be called.
Note
This function will send a start command to the SYSRTC peripheral.
The SYSRTC peripheral will use some LF clock ticks before the command is executed.
The rsi_sysrtc_wait_sync() function is used to wait for the start command to be executed.
484
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_stop#
__STATIC_INLINE void sl_si91x_sysrtc_stop (void )
To stop the SYSRTC counter.
N/A |
This function sends a stop command to the SYSRTC peripheral and waits until the command is executed.
Note
This function requires the SYSRTC to be enabled.
497
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_reset#
__STATIC_INLINE void sl_si91x_sysrtc_reset (void )
To reset the SYSRTC to its default state.
N/A |
This function restores the SYSRTC peripheral to its reset state.
Note
This function requires the SYSRTC to be enabled.
510
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_lock#
__STATIC_INLINE void sl_si91x_sysrtc_lock (void )
To lock the SYSRTC registers.
N/A |
When SYSRTC registers are locked, the SYSRTC_EN, SYSRTC_CFG, SYSRTC_CMD, SYSRTC_SWRST, SYSRTC_CNT, and SYSRTC_TOPCNT registers cannot be written to.
522
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_unlock#
__STATIC_INLINE void sl_si91x_sysrtc_unlock (void )
To unlock the SYSRTC registers.
N/A |
When SYSRTC registers are locked, the SYSRTC_EN, SYSRTC_CFG, SYSRTC_CMD, SYSRTC_SWRST, SYSRTC_CNT, and SYSRTC_TOPCNT registers cannot be written to.
Pre-condition:
sl_si91x_sysrtc_lock must be called before this function.
537
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_set_count#
__STATIC_INLINE void sl_si91x_sysrtc_set_count (uint32_t value)
To set the SYSRTC counter register value.
[in] | value | The new SYSRTC counter value. |
This API is used to change the count of SYSRTC when it is stopped. After calling this API, the user should start SYSRTC.
Pre-condition:
sl_si91x_sysrtc_stop must be called before this function.
554
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_get_version#
sl_sysrtc_version_t sl_si91x_sysrtc_get_version (void )
To get the SYSRTC version.
N/A |
Retrieve the API version of SYSRTC.
Returns
sl_sysrtc_version_t Structure containing the version information.
567
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h
sl_si91x_sysrtc_deinit#
void sl_si91x_sysrtc_deinit (void )
To de-initialize the SYSRTC by disabling its clock.
N/A |
This API de-initializes the SYSRTC by disabling its clock. Unregisters the SYSRTC callback and disables all interrupts.
576
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_sysrtc.h