Config Timer#

Modules#

sl_config_timer_config_t

sl_config_timer_ocu_config_t

sl_config_timer_ocu_control_t

sl_config_action_event_t

sl_config_timer_interrupt_flags_t

sl_config_timer_version_t

Enumerations#

enum
SL_COUNTER_16BIT
SL_COUNTER_32BIT
SL_COUNTER_MODE_LAST
}

Enumeration to represent timer modes.

enum
SL_COUNTER_0
SL_COUNTER_1
SL_COUNTER_NUMBER_LAST
}

Enumeration to represent timer counter numbers.

enum
SL_COUNTER0_UP
SL_COUNTER0_DOWN
SL_COUNTER0_UP_DOWN
SL_COUNTER0_DIRECTION_LAST
}

Enumeration to represent timer counter directions.

enum
SL_COUNTER1_UP
SL_COUNTER1_DOWN
SL_COUNTER1_UP_DOWN
SL_COUNTER1_DIRECTION_LAST
}
enum
SL_COUNTER_MODE_32 = COUNTER32_BITMODE
SL_COUNTER0_SOFT_RESET_ENABLE = SOFTRESET_COUNTER_0
SL_COUNTER0_PERIODIC_ENABLE = PERIODIC_ENCOUNTER_0
SL_COUNTER0_TRIGGER_ENABLE = COUNTER0_TRIG
SL_COUNTER0_SYNC_TRIGGER_ENABLE = COUNTER0_SYNC_TRIG
SL_COUNTER0_BUFFER_ENABLE = BUF_REG0EN
SL_COUNTER0_UP_DIRECTION = COUNTER0_UP
SL_COUNTER0_DOWN_DIRECTION = COUNTER0_DOWN
SL_COUNTER0_UP_DOWN_DIRECTION = COUNTER0_UP_DOWN
SL_COUNTER1_SOFT_RESET_ENABLE = SOFTRESET_COUNTER_1
SL_COUNTER1_PERIODIC_ENABLE = PERIODIC_ENCOUNTER_1
SL_COUNTER1_TRIGGER_ENABLE = COUNTER1_TRIG
SL_COUNTER1_SYNC_TRIGGER_ENABLE = COUNTER1_SYNC_TRIG
SL_COUNTER1_BUFFER_ENABLE = BUF_REG1EN
SL_COUNTER1_UP_DIRECTION = COUNTER1_UP
SL_COUNTER1_DOWN_DIRECTION = COUNTER1_DOWN
SL_COUNTER1_UP_DOWN_DIRECTION = COUNTER1_UP_DOWN
SL_COUNTER_PARAM_LAST
}

Enumeration to represent timer-config parameters values.

enum
SL_COUNTER0_OCU_OUTPUT_ENABLE = OUTPUT_OCU_0
SL_COUNTER0_OCU_DMA_ENABLE = OCU_DMA_0
SL_COUNTER0_OCU_8BIT_ENABLE = OCU_8_MODE_0
SL_COUNTER0_OCU_SYNC_ENABLE = OCU_SYNC_WITH_0
SL_COUNTER1_OCU_OUTPUT_ENABLE = OUTPUT_OCU_1
SL_COUNTER1_OCU_DMA_ENABLE = OCU_DMA_1
SL_COUNTER1_OCU_8BIT_ENABLE = OCU_8_MODE_1
SL_COUNTER1_OCU_SYNC_ENABLE = OCU_SYNC_WITH_1
SL_OCU_OUTPUT0_TOGGLE_HIGH = MAKE_OUTPUT_0_HIGH_SEL_0
SL_OCU_OUTPUT0_TOGGLE_LOW = MAKE_OUTPUT_0_LOW_SEL_0
SL_OCU_OUTPUT1_TOGGLE_HIGH = MAKE_OUTPUT_1_HIGH_SEL_1
SL_OCU_OUTPUT1_TOGGLE_LOW = MAKE_OUTPUT_1_LOW_SEL_1
SL_OCU_PARAM_LAST
}

Enumeration to represent timer OCU-config parameters values.

enum
SL_NO_EVENT
SL_EVENT0_RISING_EDGE
SL_EVENT1_RISING_EDGE
SL_EVENT2_RISING_EDGE
SL_EVENT3_RISING_EDGE
SL_EVENT0_FALLING_EDGE
SL_EVENT1_FALLING_EDGE
SL_EVENT2_FALLING_EDGE
SL_EVENT3_FALLING_EDGE
SL_EVENT0_RISING_FALLING_EDGE
SL_EVENT1_RISING_FALLING_EDGE
SL_EVENT2_RISING_FALLING_EDGE
SL_EVENT3_RISING_FALLING_EDGE
SL_EVENT0_LEVEL0
SL_EVENT1_LEVEL0
SL_EVENT2_LEVEL0
SL_EVENT3_LEVEL0
SL_EVENT0_LEVEL1
SL_EVENT1_LEVEL1
SL_EVENT2_LEVEL1
SL_EVENT3_LEVEL1
SL_AND_EVENT
SL_OR_EVENT
SL_EVENT0_RISING_EDGE_AND_EVENT
SL_EVENT0_RISING_EDGE_OR_EVENT
SL_EVENT1_RISING_EDGE_AND_EVENT
SL_EVENT1_RISING_EDGE_OR_EVENT
SL_EVENT2_RISING_EDGE_AND_EVENT
SL_EVENT2_RISING_EDGE_OR_EVENT
SL_EVENT3_RISING_EDGE_AND_EVENT
SL_EVENT3_RISING_EDGE_OR_EVENT
SL_EVENT0_RISING_EDGE_REGISTERED_AND_EVENT
SL_EVENT0_RISING_EDGE_REGISTERED_OR_EVENT
SL_EVENT1_RISING_EDGE_REGISTERED_AND_EVENT
SL_EVENT1_RISING_EDGE_REGISTERED_OR_EVENT
SL_EVENT2_RISING_EDGE_REGISTERED_AND_EVENT
SL_EVENT2_RISING_EDGE_REGISTERED_OR_EVENT
SL_EVENT3_RISING_EDGE_REGISTERED_AND_EVENT
SL_EVENT3_RISING_EDGE_REGISTERED_OR_EVENT
SL_EVENT_LAST
}

Enumeration to represent various timer input events.

enum
START
STOP
CONTINUE
HALT
INCREMENT
CAPTURE
INTERRUPT
OUTPUT
ACTION_LAST
}

Enumeration to represent various timer actions.

enum
SL_CT_EVENT_INTR_0_FLAG = RSI_CT_EVENT_INTR_0_l
SL_CT_FIFO_0_FULL_FLAG = RSI_CT_EVENT_FIFO_0_FULL_l
SL_CT_COUNTER_0_IS_ZERO_FLAG = RSI_CT_EVENT_COUNTER_0_IS_ZERO_l
SL_CT_COUNTER_0_IS_PEAK_FLAG = RSI_CT_EVENT_COUNTER_0_IS_PEAK_l
SL_CT_EVENT_INTR_1_FLAG = RSI_CT_EVENT_INTR_1_l
SL_CT_FIFO_1_FULL_FLAG = RSI_CT_EVENT_FIFO_1_FULL_l
SL_CT_COUNTER_1_IS_ZERO_FLAG = RSI_CT_EVENT_COUNTER_1_IS_ZERO_l
SL_CT_COUNTER_1_IS_PEAK_FLAG = RSI_CT_EVENT_COUNTER_1_IS_PEAK_l
}

Enumeration to represent various timer interrupt flag values.

Typedefs#

typedef OCU_PARAMS_T

Renaming OCU parameters structure type.

typedef WFG_PARAMS_T

Renaming WFG parameters structure type.

typedef RSI_CT_CALLBACK_T

Renaming MCPWM callback structure.

typedef void(*
sl_config_timer_callback_t)(void *callback_flag)

Typedef for the function pointer of the interrupt callback function.

Functions#

void

Initialize config-timer output GPIO pins and configures clock as 16 MHz.

sl_status_t
sl_si91x_config_timer_set_mode(sl_config_timer_mode_t mode)

Set Config-timer mode as 32-bit or 16-bit counters.

sl_status_t
sl_si91x_config_timer_set_configuration(sl_config_timer_config_t *timer_config_ptr)

Set Config-timer configurations such as 32-bit or 16-bit mode, periodic mode, software trigger enable, soft reset enable, buffer enable, sync trigger enable and direction.

void

Reset config-timer parameters such as sets 16-bit mode, sets up-counter direction and disables periodic mode, soft reset, buffer, sync & software trigger of counters.

sl_status_t
sl_si91x_config_timer_set_ocu_configuration(sl_config_timer_ocu_config_t *ocu_config_ptr)

Set Config-timer OCU configurations such as enables outputs in OCU mode, OCU-DMA mode, channel sync with OCU outputs, 8-bit mode for OCU outputs for both counters.

void

Reset config-timer OCU parameters such as sets 16-bit mode, sets up-counter direction and disables DMA mode, channel sync and 8-bit mode for OCU outputs.

sl_status_t
sl_si91x_config_timer_set_ocu_control(sl_config_timer_ocu_control_t *ocu_params)

Set Config-timer OCU mode first and next threshold values for counter-0 & counter-1 outputs , register PWM callback, Enable DMA support for counters.

sl_status_t
sl_si91x_config_timer_set_wfg_configuration(sl_config_timer_wfg_config_t *wfg_config_ptr)

Set Config-timer WFG mode configurations such as select toggle high, low and peak for counter-0 & counter-1 outputs.

sl_status_t
sl_si91x_config_timer_set_initial_count(sl_config_timer_mode_t mode, uint32_t counter0_initial_value, uint32_t counter1_initial_value)

Set Config-timer initial count as per timer mode.

sl_status_t
sl_si91x_config_timer_set_match_count(sl_config_timer_mode_t mode, sl_counter_number_t counter_number, uint32_t match_value)

Set Config-timer match-count as per timer mode and counter-number.

sl_status_t
sl_si91x_config_timer_get_count(sl_config_timer_mode_t mode, sl_counter_number_t counter_number, uint32_t *count_value)

Get Config-timer current count as per timer mode and counter-number.

sl_status_t
sl_si91x_config_timer_reset_counter(sl_counter_number_t counter_number)

Soft reset Config-timer counter.

sl_status_t
sl_si91x_config_timer_start_on_software_trigger(sl_counter_number_t counter_number)

Start config-timer counter by software trigger.

sl_status_t
sl_si91x_config_timer_select_action_event(sl_config_timer_action_t action, sl_config_timer_event_t select_event_counter0, sl_config_timer_event_t select_event_counter1)

Select external input event for triggering selected timer-action such as start, stop, continue, halt, increment, capture, interrupt and output.

sl_status_t
sl_si91x_config_timer_configure_action_event(sl_config_action_event_t *event_config_handle)

Configure external input-event's AND-event and OR-event for triggering selected timer-action such as start, stop, continue, halt, increment, capture, interrupt and output.

sl_status_t
sl_si91x_config_timer_register_callback(sl_config_timer_callback_t on_config_timer_callback, void *callback_flag_value, sl_config_timer_interrupt_flags_t *interrupt_flags)

Register callback of timer interrupt and enabling respective interrupts as per selected interrupt flag.

sl_status_t
sl_si91x_config_timer_unregister_callback(sl_config_timer_interrupt_flags_t *interrupt_flags)
sl_status_t
sl_si91x_config_timer_resume_halt_event(sl_counter_number_t counter_number)

Resume halt operation of Config-timer counter.

sl_status_t
sl_si91x_config_timer_read_capture(sl_counter_number_t counter_number, uint16_t *capture_value)

Get Config-timer counter count value on occurrence of capture event occurrence.

sl_status_t
sl_si91x_config_timer_set_counter_sync(sl_counter_number_t counter_number, uint8_t sync_counter_value)

Sync counter output with other channels, as per sync_counter_value.

sl_status_t
sl_si91x_config_timer_set_output_adc_pin(uint8_t pin1, uint8_t pin2)

Sync counter output with other channels.

sl_status_t
sl_si91x_config_timer_set_wfg_compare_values(sl_counter_number_t counter_number, sl_config_timer_ocu_params_t *ocu_params)
void

De-initialize config-timer by disabling its clock.

Get the release version of the Config-timer.

Macros#

#define
CT CT0

pointer to CT base address

Enumeration Documentation#

sl_config_timer_mode_t#

sl_config_timer_mode_t

Enumeration to represent timer modes.

Enumerator
SL_COUNTER_16BIT

enum for CT 16-bit mode

SL_COUNTER_32BIT

enum for CT 32-bit mode

SL_COUNTER_MODE_LAST

Last member of enum for validation.


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

sl_counter_number_t#

sl_counter_number_t

Enumeration to represent timer counter numbers.

Enumerator
SL_COUNTER_0

enum for CT counter-0

SL_COUNTER_1

enum for CT counter-1

SL_COUNTER_NUMBER_LAST

Last member of enum for validation.


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

sl_counter0_direction_t#

sl_counter0_direction_t

Enumeration to represent timer counter directions.

Enumerator
SL_COUNTER0_UP

CT counter-0 up-counting operation.

SL_COUNTER0_DOWN

CT counter-0 down-counting operation.

SL_COUNTER0_UP_DOWN

CT counter-0 up-down counting operation.

SL_COUNTER0_DIRECTION_LAST

Last member of enum for validation.


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

sl_counter1_direction_t#

sl_counter1_direction_t
Enumerator
SL_COUNTER1_UP

CT counter-1 up-counting operation.

SL_COUNTER1_DOWN

CT counter-1 down-counting operation.

SL_COUNTER1_UP_DOWN

CT counter-1 up-down counting operation.

SL_COUNTER1_DIRECTION_LAST

Last member of enum for validation.


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

sl_config_timer_config_values_t#

sl_config_timer_config_values_t

Enumeration to represent timer-config parameters values.

Enumerator
SL_COUNTER_MODE_32

enum for CT 32-bit mode value

SL_COUNTER0_SOFT_RESET_ENABLE

enum for counter-0 soft reset enable value

SL_COUNTER0_PERIODIC_ENABLE

enum for counter-0 periodic mode enable value

SL_COUNTER0_TRIGGER_ENABLE

enum for counter-0 software trigger enable value

SL_COUNTER0_SYNC_TRIGGER_ENABLE

enum for counter-0 sync trigger enable value

SL_COUNTER0_BUFFER_ENABLE

enum for counter-0 buffer enable value

SL_COUNTER0_UP_DIRECTION

enum for counter-0 up-direction enable value

SL_COUNTER0_DOWN_DIRECTION

enum for counter-0 down-direction enable value

SL_COUNTER0_UP_DOWN_DIRECTION

enum for counter-0 up-down direction enable value

SL_COUNTER1_SOFT_RESET_ENABLE

enum for counter-1 soft reset enable value

SL_COUNTER1_PERIODIC_ENABLE

enum for counter-1 periodic mode enable value

SL_COUNTER1_TRIGGER_ENABLE

enum for counter-1 software trigger enable value

SL_COUNTER1_SYNC_TRIGGER_ENABLE

enum for counter-1 sync trigger enable value

SL_COUNTER1_BUFFER_ENABLE

enum for counter-1 buffer enable value

SL_COUNTER1_UP_DIRECTION

enum for counter-1 up-direction enable value

SL_COUNTER1_DOWN_DIRECTION

enum for counter-1 up-direction enable value

SL_COUNTER1_UP_DOWN_DIRECTION

enum for counter-1 up-direction enable value

SL_COUNTER_PARAM_LAST

Last member of enum for validation.


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

sl_config_timer_ocu_config_values_t#

sl_config_timer_ocu_config_values_t

Enumeration to represent timer OCU-config parameters values.

Enumerator
SL_COUNTER0_OCU_OUTPUT_ENABLE

enum for counter-0 output enable value

SL_COUNTER0_OCU_DMA_ENABLE

enum for counter-0 OCU-DMA mode enable value

SL_COUNTER0_OCU_8BIT_ENABLE

enum for counter-0 OCU-8bit mode enable value

SL_COUNTER0_OCU_SYNC_ENABLE

enum for counter-0 OCU-sync mode enable value

SL_COUNTER1_OCU_OUTPUT_ENABLE

enum for counter-1 output enable value

SL_COUNTER1_OCU_DMA_ENABLE

enum for counter-1 OCU-DMA mode enable value

SL_COUNTER1_OCU_8BIT_ENABLE

enum for counter-1 OCU-8bit mode enable value

SL_COUNTER1_OCU_SYNC_ENABLE

enum for counter-1 OCU-sync mode enable value

SL_OCU_OUTPUT0_TOGGLE_HIGH

enum for counter-0 output toggle high

SL_OCU_OUTPUT0_TOGGLE_LOW

enum for counter-0 output toggle low

SL_OCU_OUTPUT1_TOGGLE_HIGH

enum for counter-1 output toggle high select value

SL_OCU_OUTPUT1_TOGGLE_LOW

enum for counter-1 output toggle low select value

SL_OCU_PARAM_LAST

Last member of enum for validation.


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

sl_config_timer_event_t#

sl_config_timer_event_t

Enumeration to represent various timer input events.

Enumerator
SL_NO_EVENT

enum for no input event

SL_EVENT0_RISING_EDGE

enum for input-0 rising edge event

SL_EVENT1_RISING_EDGE

enum for input-1 rising edge event

SL_EVENT2_RISING_EDGE

enum for input-2 rising edge event

SL_EVENT3_RISING_EDGE

enum for input-3 rising edge event

SL_EVENT0_FALLING_EDGE

enum for input-0 falling edge event

SL_EVENT1_FALLING_EDGE

enum for input-1 falling edge event

SL_EVENT2_FALLING_EDGE

enum for input-2 falling edge event

SL_EVENT3_FALLING_EDGE

enum for input-3 falling edge event

SL_EVENT0_RISING_FALLING_EDGE

enum for input-0 rising-falling edge event

SL_EVENT1_RISING_FALLING_EDGE

enum for input-1 rising-falling edge event

SL_EVENT2_RISING_FALLING_EDGE

enum for input-2 rising-falling edge event

SL_EVENT3_RISING_FALLING_EDGE

enum for input-3 rising-falling edge event

SL_EVENT0_LEVEL0

enum for input-0 Level-0 event

SL_EVENT1_LEVEL0

enum for input-0 Level-0 event

SL_EVENT2_LEVEL0

enum for input-0 Level-0 event

SL_EVENT3_LEVEL0

enum for input-0 Level-0 event

SL_EVENT0_LEVEL1

enum for input-0 Level-0 event

SL_EVENT1_LEVEL1

enum for input-0 Level-0 event

SL_EVENT2_LEVEL1

enum for input-0 Level-0 event

SL_EVENT3_LEVEL1

enum for input-0 Level-0 event

SL_AND_EVENT

enum for and-event

SL_OR_EVENT

enum for or-event

SL_EVENT0_RISING_EDGE_AND_EVENT

enum for input-0 rising edge and-event

SL_EVENT0_RISING_EDGE_OR_EVENT

enum for input-0 rising edge or-event

SL_EVENT1_RISING_EDGE_AND_EVENT

enum for input-1 rising edge and-event

SL_EVENT1_RISING_EDGE_OR_EVENT

enum for input-1 rising edge or-event

SL_EVENT2_RISING_EDGE_AND_EVENT

enum for input-2 rising edge and-event

SL_EVENT2_RISING_EDGE_OR_EVENT

enum for input-2 rising edge or-event

SL_EVENT3_RISING_EDGE_AND_EVENT

enum for input-3 rising edge and-event

SL_EVENT3_RISING_EDGE_OR_EVENT

enum for input-3 rising edge or-event

SL_EVENT0_RISING_EDGE_REGISTERED_AND_EVENT

enum for input-0 rising edge registered and-event

SL_EVENT0_RISING_EDGE_REGISTERED_OR_EVENT

enum for input-0 rising edge registered or-event

SL_EVENT1_RISING_EDGE_REGISTERED_AND_EVENT

enum for input-1 rising edge registered and-event

SL_EVENT1_RISING_EDGE_REGISTERED_OR_EVENT

enum for input-1 rising edge registered or-event

SL_EVENT2_RISING_EDGE_REGISTERED_AND_EVENT

enum for input-2 rising edge registered and-event

SL_EVENT2_RISING_EDGE_REGISTERED_OR_EVENT

enum for input-2 rising edge registered or-event

SL_EVENT3_RISING_EDGE_REGISTERED_AND_EVENT

enum for input-3 rising edge registered and-event

SL_EVENT3_RISING_EDGE_REGISTERED_OR_EVENT

enum for input-3 rising edge registered or-event

SL_EVENT_LAST

Last member of enum for validation.


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

sl_config_timer_action_t#

sl_config_timer_action_t

Enumeration to represent various timer actions.

Enumerator
START

enum for timer-start action

STOP

enum for timer-stop action

CONTINUE

enum for timer-continue action

HALT

enum for timer-halt action

INCREMENT

enum for timer-increment action

CAPTURE

enum for timer-capture action

INTERRUPT

enum for timer-interrupt action

OUTPUT

enum for timer-output action

ACTION_LAST

Last member of enum for validation.


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

sl_config_timer_interrupt_flags_values_t#

sl_config_timer_interrupt_flags_values_t

Enumeration to represent various timer interrupt flag values.

Enumerator
SL_CT_EVENT_INTR_0_FLAG

enum for counter-0 event interrupt enable value

SL_CT_FIFO_0_FULL_FLAG

enum for counter-0 FIFO full interrupt enable value

SL_CT_COUNTER_0_IS_ZERO_FLAG

enum for counter-0 zero-count-value interrupt enable value

SL_CT_COUNTER_0_IS_PEAK_FLAG

enum for counter-0 match-value interrupt enable value

SL_CT_EVENT_INTR_1_FLAG

enum for counter-1 event interrupt enable value

SL_CT_FIFO_1_FULL_FLAG

enum for counter-1 FIFO full interrupt enable value

SL_CT_COUNTER_1_IS_ZERO_FLAG

enum for counter-1 zero-count-value interrupt enable value

SL_CT_COUNTER_1_IS_PEAK_FLAG

enum for counter-1 match-value interrupt enable value


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

Typedef Documentation#

sl_config_timer_ocu_params_t#

typedef OCU_PARAMS_T sl_config_timer_ocu_params_t

Renaming OCU parameters structure type.


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

sl_config_timer_wfg_config_t#

typedef WFG_PARAMS_T sl_config_timer_wfg_config_t

Renaming WFG parameters structure type.


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

sl_config_timer_pwm_callback_t#

typedef RSI_CT_CALLBACK_T sl_config_timer_pwm_callback_t

Renaming MCPWM callback structure.


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

sl_config_timer_callback_t#

typedef void(* sl_config_timer_callback_t) (void *callback_flag) )(void *callback_flag)

Typedef for the function pointer of the interrupt callback function.

Parameters
N/Acallback_flag

(void *) parameter for updating flag values


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

Function Documentation#

sl_si91x_config_timer_init#

void sl_si91x_config_timer_init (void )

Initialize config-timer output GPIO pins and configures clock as 16 MHz.

Parameters
[in]

Returns

  • none


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

sl_si91x_config_timer_set_mode#

sl_status_t sl_si91x_config_timer_set_mode (sl_config_timer_mode_t mode)

Set Config-timer mode as 32-bit or 16-bit counters.

Parameters
[in]mode

sl_config_timer_mode_t for possible values

Returns

  • status 0 if successful, else error-code as follow SL_STATUS_INVALID_MODE (0x0024) - 'mode' parameter value is invalid.

    • SL_STATUS_OK (0x0000) - Success, timer-mode is set properly


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

sl_si91x_config_timer_set_configuration#

sl_status_t sl_si91x_config_timer_set_configuration (sl_config_timer_config_t * timer_config_ptr)

Set Config-timer configurations such as 32-bit or 16-bit mode, periodic mode, software trigger enable, soft reset enable, buffer enable, sync trigger enable and direction.

Parameters
[in]timer_config_ptr

Pointer to CT config structure sl_config_timer_config_t

Returns

  • status 0 if successful, else error-code as follow SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer.

    • SL_STATUS_INVALID_PARAMETER (0x0021) - Counter direction parameter has invalid value.

    • SL_STATUS_OK (0x0000) - Success, timer-mode is set properly


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

sl_si91x_config_timer_reset_configuration#

void sl_si91x_config_timer_reset_configuration (void )

Reset config-timer parameters such as sets 16-bit mode, sets up-counter direction and disables periodic mode, soft reset, buffer, sync & software trigger of counters.

Parameters
[in]

Returns

  • none


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

sl_si91x_config_timer_set_ocu_configuration#

sl_status_t sl_si91x_config_timer_set_ocu_configuration (sl_config_timer_ocu_config_t * ocu_config_ptr)

Set Config-timer OCU configurations such as enables outputs in OCU mode, OCU-DMA mode, channel sync with OCU outputs, 8-bit mode for OCU outputs for both counters.

Parameters
[in]ocu_config_ptr

Pointer to CT OCU-config structure sl_config_timer_ocu_config_t

Returns

  • status 0 if successful, else error-code as follow SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer.

    • SL_STATUS_OK (0x0000) - Success, timer-mode is set properly.


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

sl_si91x_config_timer_reset_ocu_configuration#

void sl_si91x_config_timer_reset_ocu_configuration (void )

Reset config-timer OCU parameters such as sets 16-bit mode, sets up-counter direction and disables DMA mode, channel sync and 8-bit mode for OCU outputs.

Parameters
[in]

Returns

  • none


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

sl_si91x_config_timer_set_ocu_control#

sl_status_t sl_si91x_config_timer_set_ocu_control (sl_config_timer_ocu_control_t * ocu_params)

Set Config-timer OCU mode first and next threshold values for counter-0 & counter-1 outputs , register PWM callback, Enable DMA support for counters.

Parameters
[in]ocu_params

Pointer to CT OCU-config structure sl_config_timer_ocu_control_t

Returns

  • status 0 if successful, else error-code as follow SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer.

    • SL_STATUS_OK (0x0000) - Success, timer-mode is set properly.


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

sl_si91x_config_timer_set_wfg_configuration#

sl_status_t sl_si91x_config_timer_set_wfg_configuration (sl_config_timer_wfg_config_t * wfg_config_ptr)

Set Config-timer WFG mode configurations such as select toggle high, low and peak for counter-0 & counter-1 outputs.

Parameters
[in]wfg_config_ptr

Pointer to CT wfg-config structure sl_config_timer_wfg_config_t

Returns

  • status 0 if successful, else error-code as follow SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer.

    • SL_STATUS_OK (0x0000) - Success, timer-mode is set properly.


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

sl_si91x_config_timer_set_initial_count#

sl_status_t sl_si91x_config_timer_set_initial_count (sl_config_timer_mode_t mode, uint32_t counter0_initial_value, uint32_t counter1_initial_value)

Set Config-timer initial count as per timer mode.

Parameters
[in]mode

sl_config_timer_mode_t for possible values

[in]counter0_initial_value

(uint16_t)

[in]counter1_initial_value

(uint16_t)

  • l_si91x_config_timer_set_configuration();

Returns

  • status 0 if successful, else error-code as follow SL_STATUS_INVALID_MODE (0x0024) - 'mode' parameter value is invalid.

    • SL_STATUS_OK (0x0000) - Success, initial-count is set properly


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

sl_si91x_config_timer_set_match_count#

sl_status_t sl_si91x_config_timer_set_match_count (sl_config_timer_mode_t mode, sl_counter_number_t counter_number, uint32_t match_value)

Set Config-timer match-count as per timer mode and counter-number.

Parameters
[in]mode

sl_counter_number_t for possible values

[in]counter_number

sl_config_timer_mode_t for possible values

[in]match_value

(uint32_t)

  • l_si91x_config_timer_set_configuration();

Returns

  • status 0 if successful, else error-code as follow SL_STATUS_INVALID_MODE (0x0024) - 'mode' parameter value is invalid.

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

    • SL_STATUS_OK (0x0000) - Success, match-value is set properly


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

sl_si91x_config_timer_get_count#

sl_status_t sl_si91x_config_timer_get_count (sl_config_timer_mode_t mode, sl_counter_number_t counter_number, uint32_t * count_value)

Get Config-timer current count as per timer mode and counter-number.

Parameters
[in]mode

sl_counter_number_t for possible values

[in]counter_number

sl_config_timer_mode_t for possible values

[in]count_value

*(uint32_t), pointer to the variable to store count value

  • l_si91x_config_timer_set_configuration();

Returns

  • status 0 if successful, else errorcode SL_STATUS_INVALID_MODE (0x0024) - 'mode' parameter value is invalid.

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

    • SL_STATUS_NULL_POINTER (0x0022) - The parameter 'count_value' is null pointer.

    • SL_STATUS_OK (0x0000) - Success, count-value is set properly


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

sl_si91x_config_timer_reset_counter#

sl_status_t sl_si91x_config_timer_reset_counter (sl_counter_number_t counter_number)

Soft reset Config-timer counter.

Parameters
[in]counter_number

sl_counter_number_t for possible values

  • l_si91x_config_timer_set_configuration();

Returns

  • status 0 if successful, else error-code as follow SL_STATUS_INVALID_PARAMETER 0x0021) - 'counter_number' parameter value is invalid.

    • SL_STATUS_OK (0x0000) - Success, count-value is set properly


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

sl_si91x_config_timer_start_on_software_trigger#

sl_status_t sl_si91x_config_timer_start_on_software_trigger (sl_counter_number_t counter_number)

Start config-timer counter by software trigger.

Parameters
[in]counter_number

sl_counter_number_t for possible values

  • l_si91x_config_timer_set_configuration(),keep software trigger disable here

Returns

  • status 0 if successful, else error-code as follow SL_STATUS_INVALID_PARAMETER 0x0021) - 'counter_number' parameter value is invalid.

    • SL_STATUS_OK (0x0000) - Success, count-value is set properly


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

sl_si91x_config_timer_select_action_event#

sl_status_t sl_si91x_config_timer_select_action_event (sl_config_timer_action_t action, sl_config_timer_event_t select_event_counter0, sl_config_timer_event_t select_event_counter1)

Select external input event for triggering selected timer-action such as start, stop, continue, halt, increment, capture, interrupt and output.

Parameters
[in]action

sl_config_timer_action_t for possible values

[in]select_event_counter0

sl_config_timer_event_t for possible values, (selects input event for triggering counter-0 action )

[in]select_event_counter1

sl_config_timer_event_t for possible values, (selects input event for triggering counter-1 action )

Returns

  • status 0 if successful, else error-code as follow SL_STATUS_INVALID_PARAMETER 0x0021) - Selected input event or action parameter value is invalid.

    • SL_STATUS_OK (0x0000) - Success, count-value is set properly


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

sl_si91x_config_timer_configure_action_event#

sl_status_t sl_si91x_config_timer_configure_action_event (sl_config_action_event_t * event_config_handle)

Configure external input-event's AND-event and OR-event for triggering selected timer-action such as start, stop, continue, halt, increment, capture, interrupt and output.

Parameters
[in]event_config_handle

Pointer to CT configure action events structure sl_config_action_event_t

Returns

  • status 0 if successful, else error-code as follow SL_STATUS_NULL_POINTER (0x0022) - The parameter is null pointer.

    • SL_STATUS_INVALID_PARAMETER 0x0021) - and-event or or-event or event-valid-bits value is invalid.

    • SL_STATUS_OK (0x0000) - Success, count-value is set properly


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

sl_si91x_config_timer_register_callback#

sl_status_t sl_si91x_config_timer_register_callback (sl_config_timer_callback_t on_config_timer_callback, void * callback_flag_value, sl_config_timer_interrupt_flags_t * interrupt_flags)

Register callback of timer interrupt and enabling respective interrupts as per selected interrupt flag.

Parameters
[in]on_config_timer_callback

(function pointer) Callback function pointer to be called when timer interrupt occurred sl_config_timer_callback_t

[in]callback_flag_value

(void *) pointer to interrupt flag value variable sl_config_timer_callback_t

[in]interrupt_flags

pointer to interrupt flags structure sl_config_timer_interrupt_flags_t

Returns

  • status 0 if successful, else error-code as follow SL_STATUS_NULL_POINTER (0x0022) - parameter is a null pointer.

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

    • SL_STATUS_OK (0x0000) - Successfully registered timer timer-out callback.


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

sl_si91x_config_timer_unregister_callback#

sl_status_t sl_si91x_config_timer_unregister_callback (sl_config_timer_interrupt_flags_t * interrupt_flags)
Parameters
N/Ainterrupt_flags

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

sl_si91x_config_timer_resume_halt_event#

sl_status_t sl_si91x_config_timer_resume_halt_event (sl_counter_number_t counter_number)

Resume halt operation of Config-timer counter.

Parameters
[in]counter_number

sl_counter_number_t for possible values

  • l_si91x_config_timer_set_configuration();

Returns

  • status 0 if successful, else error-code as follow SL_STATUS_INVALID_PARAMETER 0x0021) - 'counter_number' parameter value is invalid.

    • SL_STATUS_OK (0x0000) - Success, count-value is set properly


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

sl_si91x_config_timer_read_capture#

sl_status_t sl_si91x_config_timer_read_capture (sl_counter_number_t counter_number, uint16_t * capture_value)

Get Config-timer counter count value on occurrence of capture event occurrence.

Parameters
[in]counter_number

sl_counter_number_t for possible values

[in]capture_value

(uint16_t*), pointer to the variable to store count value at capture event.

Returns

  • status 0 if successful, else error-code as follow SL_STATUS_NULL_POINTER (0x0022) - The parameter 'capture_value' is null pointer.

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

    • SL_STATUS_OK (0x0000) - Success, count-value is set properly


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

sl_si91x_config_timer_set_counter_sync#

sl_status_t sl_si91x_config_timer_set_counter_sync (sl_counter_number_t counter_number, uint8_t sync_counter_value)

Sync counter output with other channels, as per sync_counter_value.

Parameters
[in]counter_number

sl_counter_number_t for possible values

[in]sync_counter_value

(uint8_t)

  • l_si91x_config_timer_set_configuration();

Returns

  • status 0 if successful, else error-code as follow SL_STATUS_INVALID_PARAMETER 0x0021) - 'counter_number' parameter value is invalid.

    • SL_STATUS_OK (0x0000) - Success, count-value is set properly


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

sl_si91x_config_timer_set_output_adc_pin#

sl_status_t sl_si91x_config_timer_set_output_adc_pin (uint8_t pin1, uint8_t pin2)

Sync counter output with other channels.

Parameters
[in]pin1

sl_counter_number_t for possible values

[in]pin2

(uint8_t)

  • l_si91x_config_timer_set_configuration();

Returns

  • status 0 if successful, else error-code as follow SL_STATUS_INVALID_PARAMETER 0x0021) - 'counter_number' parameter value is invalid.

    • SL_STATUS_OK (0x0000) - Success, count-value is set properly


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

sl_si91x_config_timer_set_wfg_compare_values#

sl_status_t sl_si91x_config_timer_set_wfg_compare_values (sl_counter_number_t counter_number, sl_config_timer_ocu_params_t * ocu_params)
Parameters
N/Acounter_number
N/Aocu_params

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

sl_si91x_config_timer_deinit#

void sl_si91x_config_timer_deinit (void )

De-initialize config-timer by disabling its clock.

Parameters
[in]

Returns

  • none


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

sl_si91x_config_timer_get_version#

sl_config_timer_version_t sl_si91x_config_timer_get_version (void )

Get the release version of the Config-timer.

Parameters
[in]

Returns

  • (sl_config_version_t) type structure


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

Macro Definition Documentation#

CT#

#define CT
Value:
CT0

pointer to CT base address


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