Pulse Width Modulation#
Introduction#
The Motor Control Pulse Width Modulation (MCPWM) controller is used to generate a periodic pulse waveform, which is useful in motor control and power control applications. The MCPWM controller acts as a timer to count up to a period count value. The time period and the duty cycle of the pulses are both programmable.
Features of Pulse Width Modulation:
Supports up to eight PWM outputs with four duty cycle generators
Complementary and Independent output modes are supported
Dead time insertion in Complementary mode
Manual override option for PWM output pins. Output pin polarity is programmable
Supports generation of interrupt for different events
Supports two hardware fault input pins
Special event trigger for synchronizing analog-to-digital conversions
Configuration#
The configurable parameters of Pulse Width Modulation are frequency, mode, timer counter, duty cycle, output polarity, duty cycle. And the apis used to call them are:
For more information on configuring available parameters refer to the respective peripheral example readme document.
Usage#
The driver PWM exhibits the production of a 50% duty cycle, continuous ON/OFF digital signal at a frequency of 25 kHz. Since this component may be instantiated, several named instances can be made of it.An initialization struct set in accordance with the configuration is constructed for every instance. An instance of channel_0 is generated by default. and the APIs utilized to set up and initialize PWM are
Modules#
Enumerations#
Enum to control dead time.
Enum to control duty cycle.
Enum to control output fault.
Enumeration for PWM channels(1-4)
Enumeration for PWM timer.
Enumeration for PWM polarity low.
Enumeration for PWM polarity high.
Enumeration for PWM base timer modes.
Enumeration for PWM output complementary pairs.
Enumeration for PWM special event trigger time base.
Enumeration for PWM Time base output post scale bits.
Enumeration for PWM input clock pre scale select value.
Enumeration for fault input override value.
Enumeration for output override control.
Enumeration for override value.
PWM enable external triggering.
Typedefs#
PWM structure.
PWM Special Event trigger configuration parameters structure.
PWM DeadTime configuration parameters structure.
PWM Callback structure.
Variables#
Release version number.
major version number
minor version number
PWM channel selection(ch0 to ch4)
PWM frequency.
PWM output polarity for low side.
PWM output polarity for high side.
PWM mode(independent/complementary)
PWM base time counter initial value.
PWM duty cycle.
PWM base timer mode.
PWM channel timer selection.
PWM GPIO output low side port.
PWM GPIO output low side pin.
PWM GPIO output high side port.
PWM GPIO output high side pin.
PWM GPIO output low side mux.
PWM GPIO output high side mux.
PWM GPIO output low side pad.
PWM GPIO output high side pad.
PWM GPIO port.
PWM GPIO pin.
PWM GPIO mux.
PWM GPIO pad.
Functions#
This API is used to de-initialize the PWM peripheral.
This API is used to get the API version of PWM.
This API sets the PWM configuration parameters.
This API is used to set output polarity for Motor Control Pulse Width Modulation (MCPWM).
This API is used to start the Motor Control Pulse Width Modulation (MCPWM).
This API is used to stop the Motor Control Pulse Width Modulation (MCPWM) operation for the required channel.
This API is used to select number of base timers as four base timers for four channels or one base timer for all channels of Motor Control Pulse Width Modulation (MCPWM).
This API is used to set time period and counter initial value for the required Motor Control Pulse Width Modulation (MCPWM) channel.
This API is used to configure special event trigger generation for required Motor Control Pulse Width Modulation (MCPWM) channel which allows the A/D converter to be synchronized to the PWM time base.
This API is used to configure Dead time insertion parameters for Motor Control Pulse Width Modulation (MCPWM).
This API is used to reset the required channel of Motor Control Pulse Width Modulation (MCPWM).
This API is used to reset the counter from the required channel of Motor Control Pulse Width Modulation (MCPWM)
This API is used to set base time period control for the required Motor Control Pulse Width Modulation (MCPWM) channel.
This API is used to control fault A/B pin output value to be overridden when fault condition occurs.
This API is used to set the mode of base timer for required channel.
This API is used to set output mode for the Motor Control Pulse Width Modulation (MCPWM).
Handles all interrupt flags of Motor Control Pulse Width Modulation (MCPWM).
Unregisters the PWM event.
This API is used to read the counter current value for required Motor Control Pulse Width Modulation (MCPWM) channel.
This API is used to get time period counter direction status of required Motor Control Pulse Width Modulation (MCPWM) channel whether counter up / down.
Controls dead time insertion at rise edge (or) fall edge of any four channels.
This API is used to clear the interrupts of Motor Control Pulse Width Modulation (MCPWM)
This API is used to get the interrupt status of interrupt flags of Motor Control Pulse Width Modulation (MCPWM).
This API is used to control duty cycle control parameters for the required Motor Control Pulse Width Modulation (MCPWM) channel.
This API is used to control the output override operation of Motor Control Pulse Width Modulation (MCPWM).
This API is used to control the override control parameter and output is in sync with PWM time period depending on operating mode.
This API is used to control override value for the required output of Motor Control Pulse Width Modulation (MCPWM)
This API is used to control output fault in pwm module.
This API is used to control the special event trigger.
This API is used to control the dead time.
This API is used to select duty cycle for the required Motor Control Pulse Width Modulation (MCPWM) channel.
This API is used to get duty cycle for the required Motor Control Pulse Width Modulation (MCPWM) channel.
This API is used to enables an external trigger.
Get time period for the required channel.
This API is used to initialize PWM pins and clock.
This API is used to initialize PWM event pins.
This API is used to disable the reset for the required channel of MCPWM.
This API is used to disable the counter reset for the required channel of MCPWM.
Enumeration Documentation#
sl_pwm_fault_t#
sl_pwm_fault_t
Enum to control fault a and fault b.
Enumerator | |
---|---|
SL_FAULTA | PWM fault A. |
SL_FAULTB | PWM fault B. |
SL_FAULT_LAST | Last member of enum for validation. |
70
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_pwm_dead_time_t#
sl_pwm_dead_time_t
Enum to control dead time.
Enumerator | |
---|---|
SL_DEAD_TIME_DISABLE | PWM dead time disable. |
SL_DEAD_TIME_ENABLE | PWM dead time enable. |
SL_DEAD_TIME_LAST | Last member of enum for validation. |
77
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_pwm_duty_cycle_t#
sl_pwm_duty_cycle_t
Enum to control duty cycle.
Enumerator | |
---|---|
SL_DUTY_CYCLE_DISABLE | PWM duty cycle disable. |
SL_DUTY_CYCLE_ENABLE | PWM duty cycle enable. |
SL_DUTY_CYCLE_LAST | Last member of enum for validation. |
84
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_pwm_override_t#
sl_pwm_override_t
Enum to control override.
Enumerator | |
---|---|
SL_OVERRIDE_RESET | PWM override reset. |
SL_OVERRIDE_SET | PWM override set. |
SL_OVERRIDE_LAST | Last member of enum for validation. |
91
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_pwm_output_fault_t#
sl_pwm_output_fault_t
Enum to control output fault.
Enumerator | |
---|---|
SL_OUTPUT_FAULT_RESET | PWM output fault reset. |
SL_OUTPUT_FAULT_SET | PWM output fault set. |
SL_OUTPUT_FAULT_LAST | Last member of enum for validation. |
98
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_pwm_event_t#
sl_pwm_event_t
Enum to control events.
Enumerator | |
---|---|
SL_EVENT_DISABLE | PWM event disable. |
SL_EVENT_ENABLE | PWM event enable. |
SL_EVENT_LAST | Last member of enum for validation. |
105
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_pwm_channel_t#
sl_pwm_channel_t
Enumeration for PWM channels(1-4)
Enumerator | |
---|---|
SL_CHANNEL_1 | PWM channel 1. |
SL_CHANNEL_2 | PWM channel 2. |
SL_CHANNEL_3 | PWM channel 3. |
SL_CHANNEL_4 | PWM channel 4. |
SL_CHANNEL_LAST | Last member of enum for validation. |
112
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_pwm_timer_t#
sl_pwm_timer_t
Enumeration for PWM timer.
Enumerator | |
---|---|
SL_BASE_TIMER_EACH_CHANNEL | PWM timer for each channel. |
SL_BASE_TIMER_ALL_CHANNEL | PWM timer for all channels. |
SL_BASE_TIMER_LAST | Last member of enum for validation. |
121
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_pwm_polarity_low_t#
sl_pwm_polarity_low_t
Enumeration for PWM polarity low.
Enumerator | |
---|---|
SL_POLARITYL_LOW | PWM output polarity for low side(L0-L3)-low. |
SL_POLARITYL_HIGH | PWM output polarity for low side(H0-H3)-high. |
SL_POLARITYL_LAST | Last member of enum for validation. |
128
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_pwm_polarity_high_t#
sl_pwm_polarity_high_t
Enumeration for PWM polarity high.
Enumerator | |
---|---|
SL_POLARITYH_LOW | PWM output polarity for high side(L0-L3)-low. |
SL_POLARITYH_HIGH | PWM output polarity for high side(H0-H3)-high. |
SL_POLARITYH_LAST | Last member of enum for validation. |
135
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_pwm_mode_t#
sl_pwm_mode_t
Enumeration for PWM mode.
Enumerator | |
---|---|
SL_MODE_INDEPENDENT | PWM independent mode. |
SL_MODE_COMPLEMENTARY | PWM complementary mode. |
SL_MODE_LAST | Last member of enum for validation. |
142
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_pwm_base_timer_mode_t#
sl_pwm_base_timer_mode_t
Enumeration for PWM base timer modes.
Enumerator | |
---|---|
SL_FREE_RUN_MODE | PWM free run mode. |
SL_SINGLE_EVENT_MODE | PWM single event mode. |
SL_DOWN_COUNT_MODE | PWM down count mode. |
SL_UP_DOWN_MODE | PWM up/down mode. |
SL_UP_DOWN_DOUBLE_UPDATE | PWM up/down double update mode. |
SL_BASE_TIMER_MODE_LAST | Last member of enum for validation. |
149
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_pwm_output_t#
sl_pwm_output_t
Enumeration for PWM output complementary pairs.
Enumerator | |
---|---|
SL_OUTPUT_LOW0 | PWM output L0. |
SL_OUTPUT_LOW1 | PWM output L1. |
SL_OUTPUT_LOW2 | PWM output L2. |
SL_OUTPUT_LOW3 | PWM output L3. |
SL_OUTPUT_HIGH0 | PWM output H0. |
SL_OUTPUT_HIGH1 | PWM output H1. |
SL_OUTPUT_HIGH2 | PWM output H2. |
SL_OUTPUT_HIGH3 | PWM output H3. |
SL_OUTPUT_LAST | Last member of enum for validation. |
159
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_pwm_svt_t#
sl_pwm_svt_t
Enumeration for PWM special event trigger time base.
Enumerator | |
---|---|
SL_SVT_COUNT_UP | Special event trigger occurs when time base is counting up. |
SL_SVT_COUNT_DOWN | Special event trigger occurs when time base is counting down. |
SL_SVT_COUNT_LAST | Last member of enum for validation. |
172
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_pwm_post_t#
sl_pwm_post_t
Enumeration for PWM Time base output post scale bits.
Enumerator | |
---|---|
SL_TIME_PERIOD_POSTSCALE_1_1 | 1:1 post scale |
SL_TIME_PERIOD_POSTSCALE_1_2 | 1:2 post scale |
SL_TIME_PERIOD_POSTSCALE_1_3 | 1:3 post scale |
SL_TIME_PERIOD_POSTSCALE_1_4 | 1:4 post scale |
SL_TIME_PERIOD_POSTSCALE_1_5 | 1:5 post scale |
SL_TIME_PERIOD_POSTSCALE_1_6 | 1:6 post scale |
SL_TIME_PERIOD_POSTSCALE_1_7 | 1:7 post scale |
SL_TIME_PERIOD_POSTSCALE_1_8 | 1:8 post scale |
SL_TIME_PERIOD_POSTSCALE_1_9 | 1:9 post scale |
SL_TIME_PERIOD_POSTSCALE_1_10 | 1:10 post scale |
SL_TIME_PERIOD_POSTSCALE_1_11 | 1:11 post scale |
SL_TIME_PERIOD_POSTSCALE_1_12 | 1:12 post scale |
SL_TIME_PERIOD_POSTSCALE_1_13 | 1:13 post scale |
SL_TIME_PERIOD_POSTSCALE_1_14 | 1:14 post scale |
SL_TIME_PERIOD_POSTSCALE_1_15 | 1:15 post scale |
SL_TIME_PERIOD_POSTSCALE_1_16 | 1:16 post scale |
SL_TIME_PERIOD_POSTSCALE_1_LAST | Last member of enum for validation. |
179
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_pwm_pre_t#
sl_pwm_pre_t
Enumeration for PWM input clock pre scale select value.
Enumerator | |
---|---|
SL_TIME_PERIOD_PRESCALE_1 | 1x input clock period |
SL_TIME_PERIOD_PRESCALE_2 | 2x input clock period |
SL_TIME_PERIOD_PRESCALE_4 | 4x input clock period |
SL_TIME_PERIOD_PRESCALE_8 | 8x input clock period |
SL_TIME_PERIOD_PRESCALE_16 | 16x input clock period |
SL_TIME_PERIOD_PRESCALE_32 | 32x input clock period |
SL_TIME_PERIOD_PRESCALE_64 | 64x input clock period |
SL_TIME_PERIOD_PRESCALE_LAST | Last member of enum for validation. |
200
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_pwm_fault_input_t#
sl_pwm_fault_input_t
Enumeration for fault input override value.
Enumerator | |
---|---|
SL_VALUE_INACTIVE | PWM output pin is driven inactive on an external fault input A/B event. |
SL_VALUE_ACTIVE | PWM output pin is driven active on an external fault input A/B event. |
SL_VALUE_LAST | Last member of enum for validation. |
212
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_pwm_output_override_t#
sl_pwm_output_override_t
Enumeration for output override control.
Enumerator | |
---|---|
SL_OP_OVERRIDE_UNSYNC | no effect. |
SL_OP_OVERRIDE_SYNC | Output override is in sync with pwm time period depending on operating mode. |
SL_OP_OVERRIDE_LAST | Last member of enum for validation. |
219
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_pwm_override_value_t#
sl_pwm_override_value_t
Enumeration for override value.
Enumerator | |
---|---|
SL_OVERRIDE_VALUE0 | Override value 0. |
SL_OVERRIDE_VALUE1 | Override value 1. |
SL_OVERRIDE_VALUE_LAST | Last member of enum for validation. |
226
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_pwm_trigger_t#
sl_pwm_trigger_t
PWM enable external triggering.
Enumerator | |
---|---|
SL_TRIGGER_DISABLE | Disabling external triggering. |
SL_TRIGGER_ENABLE | Enabling external triggering. |
SL_TRIGGER_LAST | Last member of enum for validation. |
233
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
Typedef Documentation#
sl_si91x_mcpwm_t#
typedef RSI_MCPWM_T sl_si91x_mcpwm_t
PWM structure.
53
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_svt_config_t#
typedef RSI_MCPWM_SVT_CONFIG_T sl_si91x_pwm_svt_config_t
PWM Special Event trigger configuration parameters structure.
55
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_dt_config_t#
typedef RSI_MCPWM_DT_CONFIG_T sl_si91x_pwm_dt_config_t
PWM DeadTime configuration parameters structure.
56
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_callback_t#
typedef RSI_MCPWM_CALLBACK_T sl_si91x_pwm_callback_t
PWM Callback structure.
57
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
Variable Documentation#
release#
uint8_t sl_pwm_version_t::release
Release version number.
244
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
major#
uint8_t sl_pwm_version_t::major
major version number
245
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
minor#
uint8_t sl_pwm_version_t::minor
minor version number
246
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
channel#
sl_pwm_channel_t sl_pwm_config_t::channel
PWM channel selection(ch0 to ch4)
251
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
frequency#
uint32_t sl_pwm_config_t::frequency
PWM frequency.
252
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
is_polarity_low#
boolean_t sl_pwm_config_t::is_polarity_low
PWM output polarity for low side.
253
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
is_polarity_high#
boolean_t sl_pwm_config_t::is_polarity_high
PWM output polarity for high side.
254
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
is_mode#
boolean_t sl_pwm_config_t::is_mode
PWM mode(independent/complementary)
255
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
base_time_counter_initial_value#
uint32_t sl_pwm_config_t::base_time_counter_initial_value
PWM base time counter initial value.
256
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
duty_cycle#
uint8_t sl_pwm_config_t::duty_cycle
PWM duty cycle.
257
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
base_timer_mode#
uint8_t sl_pwm_config_t::base_timer_mode
PWM base timer mode.
258
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
channel_timer_selection#
uint8_t sl_pwm_config_t::channel_timer_selection
PWM channel timer selection.
259
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
port_l#
uint8_t sl_pwm_init_t::port_l
PWM GPIO output low side port.
264
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
pin_l#
uint8_t sl_pwm_init_t::pin_l
PWM GPIO output low side pin.
265
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
port_h#
uint8_t sl_pwm_init_t::port_h
PWM GPIO output high side port.
266
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
pin_h#
uint8_t sl_pwm_init_t::pin_h
PWM GPIO output high side pin.
267
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
mux_l#
uint8_t sl_pwm_init_t::mux_l
PWM GPIO output low side mux.
268
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
mux_h#
uint8_t sl_pwm_init_t::mux_h
PWM GPIO output high side mux.
269
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
pad_l#
uint8_t sl_pwm_init_t::pad_l
PWM GPIO output low side pad.
270
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
pad_h#
uint8_t sl_pwm_init_t::pad_h
PWM GPIO output high side pad.
271
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
port#
uint8_t sl_pwm_fault_init_t::port
PWM GPIO port.
276
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
pin#
uint8_t sl_pwm_fault_init_t::pin
PWM GPIO pin.
277
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
mux#
uint8_t sl_pwm_fault_init_t::mux
PWM GPIO mux.
278
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
pad#
uint8_t sl_pwm_fault_init_t::pad
PWM GPIO pad.
279
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
Function Documentation#
sl_si91x_pwm_deinit#
void sl_si91x_pwm_deinit (void )
This API is used to de-initialize the PWM peripheral.
N/A |
This will de-initialize the PWM peripheral and also it disables PWM module clock.
Pre-conditions:
Returns
none
295
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_get_version#
sl_pwm_version_t sl_si91x_pwm_get_version (void )
This API is used to get the API version of PWM.
N/A |
version which includes Release, SQA and DEV version numbers of PWM Returns
returns structure of type sl_pwm_version_t
303
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_set_configuration#
sl_status_t sl_si91x_pwm_set_configuration (sl_pwm_config_t * pwm_config)
This API sets the PWM configuration parameters.
[in] | pwm_config | pointer to configuration parameters of type sl_pwm_config_t |
It configures the output polarity, set time period, output mode, set duty cycle set base timer mode and base timer selection for each channel.
Pre-condition:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
318
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_set_output_polarity#
sl_status_t sl_si91x_pwm_set_output_polarity (boolean_t polarity_low, boolean_t polarity_high)
This API is used to set output polarity for Motor Control Pulse Width Modulation (MCPWM).
[in] | polarity_low | Output polarity for low side (L3, L2, L1, L0) |
[in] | polarity_high | Output polarity for high side (H3, H2, H1, H0) |
Setting polarity positive sets the digital pulse ON for the duty cycle and off for remainder of the period. Setting polarity negative is vice-versa of positive polarity set.
Pre-condition:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
334
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_start#
sl_status_t sl_si91x_pwm_start (sl_pwm_channel_t channel)
This API is used to start the Motor Control Pulse Width Modulation (MCPWM).
[in] | channel | Channel number (1 to 4) of type sl_pwm_channel_t |
Operation for required channel is based on duty cycle set, polarity and all other configurations done for respective channels.
Pre-conditions:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
353
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_stop#
sl_status_t sl_si91x_pwm_stop (sl_pwm_channel_t channel)
This API is used to stop the Motor Control Pulse Width Modulation (MCPWM) operation for the required channel.
[in] | channel | Channel number (1 to 4) of type sl_pwm_channel_t |
Pre-conditions:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
371
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_control_base_timer#
sl_status_t sl_si91x_pwm_control_base_timer (sl_pwm_timer_t base_timer)
This API is used to select number of base timers as four base timers for four channels or one base timer for all channels of Motor Control Pulse Width Modulation (MCPWM).
[in] | base_timer | PWM base timer of type sl_pwm_timer_t |
One base timer is used when single timer to be selected for all channels. Instead of only one base timer, there is also one base timer for each channel selection, where separate base timers are used for separate channels.
Pre-conditions:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
389
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_set_time_period#
sl_status_t sl_si91x_pwm_set_time_period (sl_pwm_channel_t channel, uint32_t period, uint32_t init_val)
This API is used to set time period and counter initial value for the required Motor Control Pulse Width Modulation (MCPWM) channel.
[in] | channel | Channel number (1 to 4) of type sl_pwm_channel_t. |
[in] | period | Time period value in the range of 0 - 65535. |
[in] | init_val | Update the base time counter initial value, in the range of 0 - 65535. |
It updates the base timer period and base timer counter initial values for required channel.
Pre-conditions:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
407
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_trigger_special_event#
sl_status_t sl_si91x_pwm_trigger_special_event (sl_pwm_svt_t direction, sl_si91x_pwm_svt_config_t * pwm_config)
This API is used to configure special event trigger generation for required Motor Control Pulse Width Modulation (MCPWM) channel which allows the A/D converter to be synchronized to the PWM time base.
[in] | direction | Special event trigger for time base direction of type sl_pwm_svt_t |
[in] | pwm_config | Pointer to the structure of type sl_si91x_pwm_svt_config_t |
Pre-conditions:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
426
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_configure_dead_time#
sl_status_t sl_si91x_pwm_configure_dead_time (sl_si91x_pwm_dt_config_t * dead_time, sl_pwm_channel_t channel)
This API is used to configure Dead time insertion parameters for Motor Control Pulse Width Modulation (MCPWM).
[in] | dead_time | Pointer to the structure of type sl_si91x_pwm_dt_config_t |
[in] | channel | Channel number (1 to 4) of type sl_pwm_channel_t |
Dead time is a small amount of time inserted between the switching edges of PWM signals.
Pre-conditions:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
446
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_reset_channel#
sl_status_t sl_si91x_pwm_reset_channel (sl_pwm_channel_t channel)
This API is used to reset the required channel of Motor Control Pulse Width Modulation (MCPWM).
[in] | channel | Channel number (1 to 4) of type sl_pwm_channel_t |
Pre-conditions:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
463
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_reset_counter#
sl_status_t sl_si91x_pwm_reset_counter (sl_pwm_channel_t channel)
This API is used to reset the counter from the required channel of Motor Control Pulse Width Modulation (MCPWM)
[in] | channel | Channel number (1 to 4) of type sl_pwm_channel_t |
Pre-conditions:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
480
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_control_period#
sl_status_t sl_si91x_pwm_control_period (sl_pwm_post_t post_scale, sl_pwm_pre_t pre_scale, sl_pwm_channel_t channel)
This API is used to set base time period control for the required Motor Control Pulse Width Modulation (MCPWM) channel.
[in] | post_scale | Time base output post scale bits of type sl_pwm_post_t |
[in] | pre_scale | Base timer input clock pre scale select value of type sl_pwm_pre_t |
[in] | channel | Channel number (1 to 4) of type sl_pwm_channel_t |
This sets the base timer output post scalar bits and base timer input clock prescalar value.
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
499
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_control_fault#
sl_status_t sl_si91x_pwm_control_fault (sl_pwm_fault_t fault, sl_pwm_output_t pwm_output, sl_pwm_override_value_t value)
This API is used to control fault A/B pin output value to be overridden when fault condition occurs.
[in] | fault | Enum of type sl_pwm_fault_t |
[in] | pwm_output | Enum of type sl_pwm_output_t |
[in] | value | Fault input A/B PWM output override value of type sl_pwm_override_value_t |
When it is asserted, these pins can optionally drive each of the PWM I/O pins to a defined state.
Pre-conditions:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
520
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_set_base_timer_mode#
sl_status_t sl_si91x_pwm_set_base_timer_mode (sl_pwm_base_timer_mode_t mode, sl_pwm_channel_t channel)
This API is used to set the mode of base timer for required channel.
[in] | mode | Base timer operating mode of type sl_pwm_base_timer_mode_t |
[in] | channel | Channel number (1 to 4) of type sl_pwm_channel_t |
There are different modes set like free running mode, single event mode etc.
Pre-conditions:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
536
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_set_output_mode#
sl_status_t sl_si91x_pwm_set_output_mode (sl_pwm_mode_t mode, sl_pwm_channel_t channel)
This API is used to set output mode for the Motor Control Pulse Width Modulation (MCPWM).
[in] | mode | PWM Output mode of type sl_pwm_mode_t |
[in] | channel | Channel number (1 to 4) of type sl_pwm_channel_t |
There are two modes we can configure i.e., independent mode (or) complementary mode.
Pre-conditions:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
552
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_register_callback#
sl_status_t sl_si91x_pwm_register_callback (sl_si91x_pwm_callback_t * callback_event, uint16_t flag)
Handles all interrupt flags of Motor Control Pulse Width Modulation (MCPWM).
[in] | callback_event | Structure of type sl_si91x_pwm_callback_t |
[in] | flag | It is the logical OR of different interrupts generated on multiple channels(in the range of 0 - 65535). |
It handles IRQ handler, Timer interrupt and callback event which handles different events.
Pre-conditions:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is a null pointer
570
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_unregister_callback#
sl_status_t sl_si91x_pwm_unregister_callback (uint16_t flag)
Unregisters the PWM event.
[in] | flag | It is the logical OR of different interrupts generated on multiple channels(in the range of 0 - 65535). |
Pre-conditions:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is a null pointer
587
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_read_counter#
sl_status_t sl_si91x_pwm_read_counter (uint16_t * counter_value, sl_pwm_channel_t channel)
This API is used to read the counter current value for required Motor Control Pulse Width Modulation (MCPWM) channel.
[out] | counter_value | Counter value |
[in] | channel | Channel number (1 to 4) of type sl_pwm_channel_t |
Pre-conditions:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
606
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_get_counter_direction#
sl_status_t sl_si91x_pwm_get_counter_direction (uint8_t * counter_direction, sl_pwm_channel_t channel)
This API is used to get time period counter direction status of required Motor Control Pulse Width Modulation (MCPWM) channel whether counter up / down.
[out] | counter_direction | Pointer to the counter direction (up/down) of type uint8_t |
[in] | channel | Channel number (1 to 4) of type sl_pwm_channel_t |
Pre-conditions:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
626
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_control_dead_time#
sl_status_t sl_si91x_pwm_control_dead_time (sl_pwm_dead_time_t dead_time, uint32_t flag)
Controls dead time insertion at rise edge (or) fall edge of any four channels.
[in] | dead_time | Enum of type sl_pwm_dead_time_t |
[in] | flag | ORing of the following values: (In the range of 0 - 65535).
|
Dead time applies only to PWM output pair, which are in complementary mode.
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
647
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_clear_interrupt#
sl_status_t sl_si91x_pwm_clear_interrupt (uint32_t flag)
This API is used to clear the interrupts of Motor Control Pulse Width Modulation (MCPWM)
[in] | flag | The logical OR of different interrupts generated on multiple channels(in the range of 0-511). |
Pre-conditions:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is a null pointer
664
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_get_interrupt_status#
sl_status_t sl_si91x_pwm_get_interrupt_status (uint32_t flag, uint16_t * intr_status)
This API is used to get the interrupt status of interrupt flags of Motor Control Pulse Width Modulation (MCPWM).
[in] | flag | Flag value (0 - 65535) |
[out] | intr_status | Pointer to interrupt status |
Events which are raised can be identified by checking the status.
Pre-conditions:
Returns
Interrupt status of the required interrupt flag
680
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_configure_duty_cycle#
sl_status_t sl_si91x_pwm_configure_duty_cycle (sl_pwm_duty_cycle_t duty_cycle, uint32_t value, sl_pwm_channel_t channel)
This API is used to control duty cycle control parameters for the required Motor Control Pulse Width Modulation (MCPWM) channel.
[in] | duty_cycle | Enum of type sl_pwm_duty_cycle_t |
[in] | value | This can be a logical OR of the following parameters:(Range 0 -127).
|
[in] | channel | Channel number (1 to 4) of type sl_pwm_channel_t |
This API controls duty cycle parameters for the required Motor Control Pulse Width Modulation (MCPWM) channel. It can also enable (or prevent) duty cycle updating.
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
703
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_output_override#
sl_status_t sl_si91x_pwm_output_override (sl_pwm_override_t override, sl_pwm_output_t pwm_output)
This API is used to control the output override operation of Motor Control Pulse Width Modulation (MCPWM).
[in] | override | Enum of type sl_pwm_override_t |
[in] | pwm_output | PWM output override of type sl_pwm_output_t |
This API controls MCPWM's output override operation. It enables you to enable or disable PWM output override.
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
721
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_control_override#
sl_status_t sl_si91x_pwm_control_override (sl_pwm_override_t override, sl_pwm_output_override_t value)
This API is used to control the override control parameter and output is in sync with PWM time period depending on operating mode.
[in] | override | Enum of type sl_pwm_override_t |
[in] | value | Output override to be in sync with PWM time period sl_pwm_output_override_t |
This API is used for controlling the override control parameters and also the output is synchronized with the PWM time period, depending on the operating mode.
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
740
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_control_override_value#
sl_status_t sl_si91x_pwm_control_override_value (sl_pwm_override_t override, sl_pwm_output_t pwm_output, sl_pwm_override_value_t value)
This API is used to control override value for the required output of Motor Control Pulse Width Modulation (MCPWM)
[in] | override | Enum of type sl_pwm_override_t |
[in] | pwm_output | PWM output override of type sl_pwm_output_t |
[in] | value | Override value of type sl_pwm_override_value_t |
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
757
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_control_output_fault#
sl_status_t sl_si91x_pwm_control_output_fault (sl_pwm_output_fault_t output_fault, uint32_t value)
This API is used to control output fault in pwm module.
[in] | output_fault | Enum of type sl_pwm_output_fault_t |
[in] | value | This can be a logical OR of the below parameters: (in the range of 0 - 65535)
|
This API is used to control output fault in pwm override control parameters for the required PWM output.
Pre-conditions:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
789
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_control_special_event_trigger#
sl_status_t sl_si91x_pwm_control_special_event_trigger (sl_pwm_event_t event)
This API is used to control the special event trigger.
[in] | event | Enum of type sl_pwm_event_t |
This API controls the generation of a special event trigger for the required channel of the Motor Control Pulse Width Modulation (MCPWM).
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
805
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_select_dead_time#
sl_status_t sl_si91x_pwm_select_dead_time (sl_pwm_dead_time_t dead_time, uint32_t value)
This API is used to control the dead time.
[in] | dead_time | Enum of type sl_pwm_dead_time_t |
[in] | value | This can be a logical OR of the below parameters: (in the range of 0 - 4095).
|
This API is used to control dead time control parameters for the required channel.
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
825
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_set_duty_cycle#
sl_status_t sl_si91x_pwm_set_duty_cycle (uint32_t duty_cycle, sl_pwm_channel_t channel)
This API is used to select duty cycle for the required Motor Control Pulse Width Modulation (MCPWM) channel.
[in] | duty_cycle | Duty cycle value (0 - 65535). |
[in] | channel | Channel number (1 to 4) of type sl_pwm_channel_t |
Pre-conditions:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
840
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_get_duty_cycle#
sl_status_t sl_si91x_pwm_get_duty_cycle (sl_pwm_channel_t channel, uint32_t * duty_cycle)
This API is used to get duty cycle for the required Motor Control Pulse Width Modulation (MCPWM) channel.
[in] | channel | Channel number (1 to 4) of type sl_pwm_channel_t |
[out] | duty_cycle | Pointer to the duty cycle value |
Pre-conditions:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
855
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_enable_external_trigger#
sl_status_t sl_si91x_pwm_enable_external_trigger (sl_pwm_trigger_t enable)
This API is used to enables an external trigger.
[in] | enable | Controlling external trigger of type sl_pwm_trigger_t |
This API is used to enables the use of an external trigger for base time counter increment or decrement of Motor Control Pulse Width Modulation (MCPWM).
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
872
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_get_time_period#
sl_status_t sl_si91x_pwm_get_time_period (sl_pwm_channel_t channel, uint16_t * time_period)
Get time period for the required channel.
[in] | channel | Channel number (1 to 4) of type sl_pwm_channel_t |
[out] | time_period | Pointer to read time period |
Pre-conditions:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
887
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_init#
sl_status_t sl_si91x_pwm_init (sl_pwm_init_t * pwm_init)
This API is used to initialize PWM pins and clock.
[in] | pwm_init | Pointer to the structure of type sl_pwm_init_t |
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
897
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_fault_init#
sl_status_t sl_si91x_pwm_fault_init (sl_pwm_fault_init_t * pwm_fault)
This API is used to initialize PWM event pins.
[in] | pwm_fault | Pointer to the structure of type sl_pwm_fault_init_t |
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_OK - Success
SL_STATUS_NULL_POINTER - The parameter is null pointer
907
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_reset_channel_disable#
sl_status_t sl_si91x_pwm_reset_channel_disable (sl_pwm_channel_t channel)
This API is used to disable the reset for the required channel of MCPWM.
[in] | channel | Channel number (0 to 3) of type sl_pwm_channel_t |
Pre-conditions:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
924
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h
sl_si91x_pwm_reset_counter_disable#
sl_status_t sl_si91x_pwm_reset_counter_disable (sl_pwm_channel_t channel)
This API is used to disable the counter reset for the required channel of MCPWM.
[in] | channel | Channel number (0 to 3) of type sl_pwm_channel_t |
Pre-conditions:
Returns
returns status 0 if successful, else error code as follows:
SL_STATUS_INVALID_PARAMETER - The parameter is an invalid argument
SL_STATUS_OK - Success
941
of file components/device/silabs/si91x/mcu/drivers/unified_api/inc/sl_si91x_pwm.h