Ultra Low-Power Timer#

Modules#

ulp_timer_clk_src_config_t

ulp_timer_config_t

sl_ulp_timer_version_t

Enumerations#

enum
ULP_TIMER_0
ULP_TIMER_1
ULP_TIMER_2
ULP_TIMER_3
ULP_TIMER_LAST
}

Enumeration to represent ulp-timer instances.

enum
ULP_TIMER_MODE_ONESHOT
ULP_TIMER_MODE_PERIODIC
ULP_TIMER_MODE_LAST
}

Enumeration to represent ULP-timer modes.

enum
ULP_TIMER_TYP_DEFAULT
ULP_TIMER_TYP_1US
ULP_TIMER_TYP_256US
ULP_TIMER_TYP_LAST
}

Enumeration to represent ULP-timer types.

enum
ULP_TIMER_REF_CLK_SRC
ULP_TIMER_32KHZ_RO_CLK_SRC
ULP_TIMER_32KHZ_RC_CLK_SRC
ULP_TIMER_32KHZ_XTAL_CLK_SRC
ULP_TIMER_32MHZ_RC_CLK_SRC
ULP_TIMER_20MHZ_RO_CLK_SRC
ULP_TIMER_ULP_CLK_SRC_LAST
}

Enumeration to represent values of clock sources to select as Timer clock.

Typedefs#

typedef void(*

Typedef for the function pointer of the callback function.

typedef CLK_ENABLE_T

Renaming clock type enum.

typedef ulp_timer_dir_t

Renaming clock type enum.

Variables#

uint8_t

true to enable static and false to enable dynamic clock type

boolean_t

true to enable and false to disable ULP timer in synchronous mode to ULPSS pclk

uint8_t

timer input clock source, refer ulp_timer_clk_input_source_t for possible values

boolean_t

true to wait and false to Skip waiting for switching timer clk

uint8_t

timer number, SL_ULP_TIMER_NUMBER for default values

uint8_t

timer mode, SL_ULP_TIMER_MODE for default values

uint8_t

timer type, SL_ULP_TIMER_TYPE for default values

uint32_t

timer match value SL_ULP_TIMER_MATCH_VALUE(delay time) in microseconds

uint8_t

timer direction, SL_ULP_TIMER_DIRECTION for default values

uint8_t

Release version number.

uint8_t

sqa version number

uint8_t

dev version number

Functions#

sl_status_t
sl_si91x_ulp_timer_configure_clock(ulp_timer_clk_src_config_t *timer_clk_ptr)

Configure the ULP-Timer input clock source.

sl_status_t
sl_si91x_ulp_timer_set_configuration(ulp_timer_config_t *timer_config_ptr)

Configure ULP-Timer parameters such as timer number, mode, type, match-value & direction.

sl_status_t
sl_si91x_ulp_timer_start(ulp_timer_instance_t timer_num)

Start the ULP-Timer.

sl_status_t
sl_si91x_ulp_timer_stop(ulp_timer_instance_t timer_num)

Stop the ULP-Timer.

sl_status_t
sl_si91x_ulp_timer_restart(ulp_timer_instance_t timer_num)

Restart an already running ULP-Timer, means it will first stop the timer and then start it again.

sl_status_t
sl_si91x_ulp_timer_set_type(ulp_timer_instance_t timer_num, ulp_timer_type_t timer_type)

Set the ULP-Timer type.

sl_status_t
sl_si91x_ulp_timer_set_direction(ulp_timer_instance_t timer_num, ulp_timer_direction_t timer_direction)

Set the ULP-Timer direction as up-counting or down-counting.

sl_status_t
sl_si91x_ulp_timer_set_mode(ulp_timer_instance_t timer_num, ulp_timer_mode_t timer_mode)

Set ULP-Timer Mode.

sl_status_t
sl_si91x_ulp_timer_set_count(ulp_timer_instance_t timer_num, uint32_t timer_match_value)

Set ULP-Timer match value.

sl_status_t
sl_si91x_ulp_timer_get_count(ulp_timer_instance_t timer_num, uint32_t *count_value)

Read the ULP-Timer count.

sl_status_t
sl_si91x_ulp_timer_get_type(ulp_timer_instance_t timer_num, uint32_t *timer_type)

Read the ULP-Timer type.

sl_status_t
sl_si91x_ulp_timer_get_mode(ulp_timer_instance_t timer_num, uint32_t *timer_mode)

Read the ULP-Timer mode.

sl_status_t
sl_si91x_ulp_timer_get_direction(ulp_timer_instance_t timer_num, uint32_t *timer_direction)

Read the ULP-Timer direction (up-counter or down-counter).

sl_status_t
sl_si91x_ulp_timer_register_timeout_callback(ulp_timer_instance_t timer_num, ulp_timer_callback_t on_timeout_callback)

Register callback of timer timeout interrupt and enabling it.

sl_status_t
sl_si91x_ulp_timer_unregister_timeout_callback(ulp_timer_instance_t timer_num)

Unregister callback of timer timeout interrupt and disabling it.

sl_status_t
sl_si91x_ulp_timer_configure_soc_clock(boolean_t div_factor_type, uint16_t div_factor)

Configure the Ulpss SoC clock from M4 SOC clock, to enable the SOC clock source.

sl_status_t

Configure the XTAL clock when the clock source is an external XTAL clock.

sl_status_t
sl_si91x_ulp_timer_init(ulp_timer_clk_src_config_t *timer_clk_ptr)

Initialize ULP-Timer clock by configuring the clock source.

void

De-Initializes ULP-Timer clock by disabling the peripheral clock.

Macros#

#define

default 1-second timer match-value for down-counter timer-type with 20Mhz clock

Enumeration Documentation#

ulp_timer_instance_t#

ulp_timer_instance_t

Enumeration to represent ulp-timer instances.

Enumerator
ULP_TIMER_0

ULP Timer0 Instance.

ULP_TIMER_1

ULP Timer1 Instance.

ULP_TIMER_2

ULP Timer2 Instance.

ULP_TIMER_3

ULP Timer3 Instance.

ULP_TIMER_LAST

Last member of enum for validation.


Definition at line 65 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

ulp_timer_mode_t#

ulp_timer_mode_t

Enumeration to represent ULP-timer modes.

Enumerator
ULP_TIMER_MODE_ONESHOT

ULP Timer one-shot mode.

ULP_TIMER_MODE_PERIODIC

ULP Timer periodic mode.

ULP_TIMER_MODE_LAST

Last member of enum for validation.


Definition at line 74 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

ulp_timer_type_t#

ulp_timer_type_t

Enumeration to represent ULP-timer types.

Enumerator
ULP_TIMER_TYP_DEFAULT

ULP Timer normal down counter type.

ULP_TIMER_TYP_1US

ULP Timer one microsecond type.

ULP_TIMER_TYP_256US

ULP Timer 256 microsecond type.

ULP_TIMER_TYP_LAST

Last member of enum for validation.


Definition at line 81 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

ulp_timer_clk_input_source_t#

ulp_timer_clk_input_source_t

Enumeration to represent values of clock sources to select as Timer clock.

Enumerator
ULP_TIMER_REF_CLK_SRC

ref clock input source

ULP_TIMER_32KHZ_RO_CLK_SRC

32 kHz ro clock input source

ULP_TIMER_32KHZ_RC_CLK_SRC

32 kHz rc clock input source

ULP_TIMER_32KHZ_XTAL_CLK_SRC

32 kHz xtal clock input source

ULP_TIMER_32MHZ_RC_CLK_SRC

32 MHz rc clock input source

ULP_TIMER_20MHZ_RO_CLK_SRC

20 MHz ro clock input source

ULP_TIMER_ULP_CLK_SRC_LAST

Last member of enum for validation.


Definition at line 89 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

Typedef Documentation#

ulp_timer_callback_t#

typedef void(* ulp_timer_callback_t) (void) )(void)

Typedef for the function pointer of the callback function.


Definition at line 59 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

ulp_timer_clock_t#

typedef CLK_ENABLE_T ulp_timer_clock_t

Renaming clock type enum.


Definition at line 61 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

ulp_timer_direction_t#

typedef ulp_timer_dir_t ulp_timer_direction_t

Renaming clock type enum.


Definition at line 62 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

Variable Documentation#

ulp_timer_clk_type#

uint8_t ulp_timer_clk_src_config_t::ulp_timer_clk_type

true to enable static and false to enable dynamic clock type


Definition at line 101 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

ulp_timer_sync_to_ulpss_pclk#

boolean_t ulp_timer_clk_src_config_t::ulp_timer_sync_to_ulpss_pclk

true to enable and false to disable ULP timer in synchronous mode to ULPSS pclk


Definition at line 103 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

ulp_timer_clk_input_src#

uint8_t ulp_timer_clk_src_config_t::ulp_timer_clk_input_src

timer input clock source, refer ulp_timer_clk_input_source_t for possible values


Definition at line 105 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

ulp_timer_skip_switch_time#

boolean_t ulp_timer_clk_src_config_t::ulp_timer_skip_switch_time

true to wait and false to Skip waiting for switching timer clk


Definition at line 106 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

timer_num#

uint8_t ulp_timer_config_t::timer_num

timer number, SL_ULP_TIMER_NUMBER for default values


Definition at line 111 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

timer_mode#

uint8_t ulp_timer_config_t::timer_mode

timer mode, SL_ULP_TIMER_MODE for default values


Definition at line 112 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

timer_type#

uint8_t ulp_timer_config_t::timer_type

timer type, SL_ULP_TIMER_TYPE for default values


Definition at line 113 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

timer_match_value#

uint32_t ulp_timer_config_t::timer_match_value

timer match value SL_ULP_TIMER_MATCH_VALUE(delay time) in microseconds


Definition at line 114 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

timer_direction#

uint8_t ulp_timer_config_t::timer_direction

timer direction, SL_ULP_TIMER_DIRECTION for default values


Definition at line 115 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

release#

uint8_t sl_ulp_timer_version_t::release

Release version number.


Definition at line 120 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

major#

uint8_t sl_ulp_timer_version_t::major

sqa version number


Definition at line 121 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

minor#

uint8_t sl_ulp_timer_version_t::minor

dev version number


Definition at line 122 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

Function Documentation#

sl_si91x_ulp_timer_configure_clock#

sl_status_t sl_si91x_ulp_timer_configure_clock (ulp_timer_clk_src_config_t * timer_clk_ptr)

Configure the ULP-Timer input clock source.

Parameters
[in]timer_clk_ptr

Pointer to timer_clk configuration structure

Returns

  • status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - Timer clock type or timer clock source values are invalid

    • SL_STATUS_INVALID_CONFIGURATION (0x0023) - Timer clock-source configuration structure members have invalid configurations.

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer

    • SL_STATUS_OK (0x0000) - Success, timer clock-source parameters configured properly


Definition at line 137 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

sl_si91x_ulp_timer_set_configuration#

sl_status_t sl_si91x_ulp_timer_set_configuration (ulp_timer_config_t * timer_config_ptr)

Configure ULP-Timer parameters such as timer number, mode, type, match-value & direction.

Parameters
[in]timer_config_ptr

Pointer to the timer_configuration structure

Also configures integral and fractional values of clock cycles per microseconds or per 256 microseconds, as per the timer-type value.

Returns

  • status 0 if successful, else error code as follows:

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer

    • SL_STATUS_INVALID_INDEX (0x0027) - Timer configuration structure member 'timer_num' has an invalid value.

    • SL_STATUS_INVALID_MODE (0x0024) - Timer configuration structure member 'timer_mode' has an invalid value.

    • SL_STATUS_INVALID_TYPE (0x0026) - Timer configuration structure member 'timer_type' has an invalid value.

    • SL_STATUS_INVALID_PARAMETER (0x0021) - Timer configuration structure member 'timer_direction' has an invalid value.

    • SL_STATUS_OK (0x0000) - Success, timer parameters are configured properly


Definition at line 156 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

sl_si91x_ulp_timer_start#

sl_status_t sl_si91x_ulp_timer_start (ulp_timer_instance_t timer_num)

Start the ULP-Timer.

Parameters
[in]timer_num

enum for ULP-timer Number (0 to 3), ulp_timer_instance_t for possible values

Returns

  • status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_INDEX (0x0027) - 'timer_num' parameter value is invalid.

    • SL_STATUS_OK (0x0000) - Successfully started the timer instance


Definition at line 171 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

sl_si91x_ulp_timer_stop#

sl_status_t sl_si91x_ulp_timer_stop (ulp_timer_instance_t timer_num)

Stop the ULP-Timer.

Parameters
[in]timer_num

enum for ULP-timer Number (0 to 3), ulp_timer_instance_t for possible values

Returns

  • status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_INDEX (0x0027) - 'timer_num' parameter value is invalid.

    • SL_STATUS_OK (0x0000) - Successfully stopped the timer instance


Definition at line 186 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

sl_si91x_ulp_timer_restart#

sl_status_t sl_si91x_ulp_timer_restart (ulp_timer_instance_t timer_num)

Restart an already running ULP-Timer, means it will first stop the timer and then start it again.

Parameters
[in]timer_num

enum for ULP-timer Number, ulp_timer_instance_t for possible values

Returns

  • status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_INDEX (0x0027) - 'timer_num' parameter value is invalid.

    • SL_STATUS_OK (0x0000) - Successfully restarted the timer instance


Definition at line 201 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

sl_si91x_ulp_timer_set_type#

sl_status_t sl_si91x_ulp_timer_set_type (ulp_timer_instance_t timer_num, ulp_timer_type_t timer_type)

Set the ULP-Timer type.

Parameters
[in]timer_num

enum for ULP-timer Number, ulp_timer_instance_t for possible values

[in]timer_type

enum for ULP-timer Type, ulp_timer_type_t for possible values

Returns

  • status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_INDEX (0x0027) - 'timer_num' parameter value is invalid.

    • SL_STATUS_INVALID_TYPE (0x0026) - 'timer_type' parameter value is invalid.

    • SL_STATUS_OK (0x0000) - Successfully set timer-type


Definition at line 217 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

sl_si91x_ulp_timer_set_direction#

sl_status_t sl_si91x_ulp_timer_set_direction (ulp_timer_instance_t timer_num, ulp_timer_direction_t timer_direction)

Set the ULP-Timer direction as up-counting or down-counting.

Parameters
[in]timer_num

enum for ULP-timer Number, ulp_timer_instance_t for possible values

[in]timer_direction

enum for ULP-timer direction, ulp_timer_direction_t for possible values

Returns

  • status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_INDEX (0x0027) - 'timer_num' parameter value is invalid.

    • SL_STATUS_INVALID_PARAMETER (0x0021) - 'timer_direction' parameter value is invalid.

    • SL_STATUS_OK (0x0000) - Successfully set timer-direction


Definition at line 233 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

sl_si91x_ulp_timer_set_mode#

sl_status_t sl_si91x_ulp_timer_set_mode (ulp_timer_instance_t timer_num, ulp_timer_mode_t timer_mode)

Set ULP-Timer Mode.

Parameters
[in]timer_num

enum for ULP-timer Number, ulp_timer_instance_t for possible values

[in]timer_mode

enum for ULP-timer mode, ulp_timer_mode_t for possible values

Returns

  • status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_INDEX (0x0027) - 'timer_num' parameter value is invalid.

    • SL_STATUS_INVALID_MODE (0x0024) - 'timer_mode' parameter value is invalid.

    • SL_STATUS_OK (0x0000) - Successfully set timer-mode


Definition at line 249 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

sl_si91x_ulp_timer_set_count#

sl_status_t sl_si91x_ulp_timer_set_count (ulp_timer_instance_t timer_num, uint32_t timer_match_value)

Set ULP-Timer match value.

Parameters
[in]timer_num

enum for ULP-timer Number, ulp_timer_instance_t for possible values.

[in]timer_match_value

for ULP-timer timeout value

Returns

  • status 0 if successful, else error-code

    • SL_STATUS_INVALID_INDEX (0x0027) - 'timer_num' parameter value is invalid.

    • SL_STATUS_OK (0x0000) - Successfully set timer match value.


Definition at line 266 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

sl_si91x_ulp_timer_get_count#

sl_status_t sl_si91x_ulp_timer_get_count (ulp_timer_instance_t timer_num, uint32_t * count_value)

Read the ULP-Timer count.

Parameters
[in]timer_num

enum for ULP-timer Number, ulp_timer_instance_t for possible values.

[in]count_value

Pointer to variable which will store the current count of the timer

Returns

  • status 0 if successful, else error code as follows:

    • SL_STATUS_NULL_POINTER (0x0022) - 'Pointer to count_value' parameter is a null pointer.

    • SL_STATUS_INVALID_INDEX (0x0027) - 'timer_num' parameter value is invalid.

    • SL_STATUS_OK (0x0000) - Successfully read the timer's current count value


Definition at line 283 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

sl_si91x_ulp_timer_get_type#

sl_status_t sl_si91x_ulp_timer_get_type (ulp_timer_instance_t timer_num, uint32_t * timer_type)

Read the ULP-Timer type.

Parameters
[in]timer_num

enum for ULP-timer Number, ulp_timer_instance_t for possible values.

[in]timer_type

Pointer to variable which will store the current count of the timer

Returns

  • status 0 if successful, else error code as follows:

    • SL_STATUS_NULL_POINTER (0x0022) - 'Pointer to timer_type' parameter is a null pointer.

    • SL_STATUS_INVALID_INDEX (0x0027) - 'timer_num' parameter value is invalid.

    • SL_STATUS_OK (0x0000) - Successfully read the timer's current count value


Definition at line 299 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

sl_si91x_ulp_timer_get_mode#

sl_status_t sl_si91x_ulp_timer_get_mode (ulp_timer_instance_t timer_num, uint32_t * timer_mode)

Read the ULP-Timer mode.

Parameters
[in]timer_num

enum for ULP-timer Number, ulp_timer_instance_t for possible values.

[in]timer_mode

Pointer to variable which will store the current count of the timer

Returns

  • status 0 if successful, else error code as follows:

    • SL_STATUS_NULL_POINTER (0x0022) - 'Pointer to timer_mode' parameter is a null pointer.

    • SL_STATUS_INVALID_INDEX (0x0027) - 'timer_num' parameter value is invalid.

    • SL_STATUS_OK (0x0000) - Successfully read the timer's current count value


Definition at line 315 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

sl_si91x_ulp_timer_get_direction#

sl_status_t sl_si91x_ulp_timer_get_direction (ulp_timer_instance_t timer_num, uint32_t * timer_direction)

Read the ULP-Timer direction (up-counter or down-counter).

Parameters
[in]timer_num

enum for ULP-timer Number, ulp_timer_instance_t for possible values.

[in]timer_direction

Pointer to variable which will store the current count of the timer

Returns

  • status 0 if successful, else error code as follows:

    • SL_STATUS_NULL_POINTER (0x0022) - 'Pointer to timer_direction' parameter is a null pointer.

    • SL_STATUS_INVALID_INDEX (0x0027) - 'timer_num' parameter value is invalid.

    • SL_STATUS_OK (0x0000) - Successfully read the timer's current count value


Definition at line 331 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

sl_si91x_ulp_timer_register_timeout_callback#

sl_status_t sl_si91x_ulp_timer_register_timeout_callback (ulp_timer_instance_t timer_num, ulp_timer_callback_t on_timeout_callback)

Register callback of timer timeout interrupt and enabling it.

Parameters
[in]timer_num

enum for ULP-timer Number, ulp_timer_instance_t for possible values.

[in]on_timeout_callback

(function pointer) Callback function pointer to be called when the timer timeout interrupt occurred.

Returns

  • status 0 if successful, else error code as follows:

    • SL_STATUS_NULL_POINTER (0x0022) - 'pointer to callback_data_input' parameter is a null pointer.

    • SL_STATUS_INVALID_INDEX (0x0027) - 'timer_num' parameter value is invalid.

    • SL_STATUS_ALLOCATION_FAILED (0x0019) - Timer interrupt enabling failed.

    • SL_STATUS_BUSY (0x0004) - The callback is already registered, unregister the previous callback before registering a new one.

    • SL_STATUS_OK (0x0000) - Successfully registered the timer timeout callback


Definition at line 347 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

sl_si91x_ulp_timer_unregister_timeout_callback#

sl_status_t sl_si91x_ulp_timer_unregister_timeout_callback (ulp_timer_instance_t timer_num)

Unregister callback of timer timeout interrupt and disabling it.

Parameters
[in]timer_num

enum for ULP-timer Number, ulp_timer_instance_t for possible values.

Returns

  • status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_INDEX (0x0027) - 'timer_num' parameter value is invalid.

    • SL_STATUS_ALLOCATION_FAILED (0x0019) - Timer interrupt disabling failed.

    • SL_STATUS_OK (0x0000) - Successfully unregistered the timer timeout callback


Definition at line 362 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

sl_si91x_ulp_timer_configure_soc_clock#

sl_status_t sl_si91x_ulp_timer_configure_soc_clock (boolean_t div_factor_type, uint16_t div_factor)

Configure the Ulpss SoC clock from M4 SOC clock, to enable the SOC clock source.

Parameters
[in]div_factor_type

value to divide the clock, ensure that it should be an odd number if div_factor_type is 1 & vice versa

[in]div_factor

selects the type of divider for m4_soc_clk_2ulpss

  • 0 => Even Divider is selected

  • 1 => Odd Divider is selected

Returns

  • status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER(0x0021) - 'div_factor' is not according to div_factor_type


Definition at line 375 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

sl_si91x_ulp_timer_configure_xtal_clock#

sl_status_t sl_si91x_ulp_timer_configure_xtal_clock (uint8_t xtal_pin)

Configure the XTAL clock when the clock source is an external XTAL clock.

Parameters
[in]xtal_pin

: Pin number of NPSS_GPIO. Possible values are 0,1,2,3,4

Returns

  • status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER(0x0021) - 'xtal_pin' parameter value is invalid.


Definition at line 384 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

sl_si91x_ulp_timer_init#

sl_status_t sl_si91x_ulp_timer_init (ulp_timer_clk_src_config_t * timer_clk_ptr)

Initialize ULP-Timer clock by configuring the clock source.

Parameters
[in]timer_clk_ptr

Pointer to timer_clk configuration structure

Returns

  • status 0 if successful, else error code as follows:

    • SL_STATUS_INVALID_PARAMETER (0x0021) - Timer clock type or timer clock source values are invalid

    • SL_STATUS_INVALID_CONFIGURATION (0x0023) - Timer clock-source configuration structure members have invalid configurations.

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter is a null pointer

    • SL_STATUS_OK (0x0000) - Success, timer clock-source parameters configured properly


Definition at line 396 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

sl_si91x_ulp_timer_deinit#

void sl_si91x_ulp_timer_deinit (void )

De-Initializes ULP-Timer clock by disabling the peripheral clock.

Parameters
[in]

Returns

  • none

Note

  • Unregisters the callbacks of all timer instances


Definition at line 408 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

sl_si91x_ulp_timer_get_version#

sl_ulp_timer_version_t sl_si91x_ulp_timer_get_version (void )

Get the ULP_TIMER version.

Parameters
[in]

This function is used to know the ULP_TIMER version

Returns


Definition at line 420 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h

Macro Definition Documentation#

SL_TIMER_MATCH_VALUE_DEFAULT#

#define SL_TIMER_MATCH_VALUE_DEFAULT
Value:
  20000000

default 1-second timer match-value for down-counter timer-type with 20Mhz clock


Definition at line 52 of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_ulp_timer.h