mcpwm_timer_set_period() is only used within ESP-IDF.
 
Symbols
loading...
Files
loading...
SummarySyntaxArgumentsRelatedReferencesCall TreeData Use

Return value

- ESP_OK: Set new period for MCPWM timer successfully - ESP_ERR_INVALID_ARG: Set new period for MCPWM timer failed because of invalid argument - ESP_FAIL: Set new period for MCPWM timer failed because of other error

Notes

If `mcpwm_timer_config_t::update_period_on_empty` and `mcpwm_timer_config_t::update_period_on_sync` are not set, the new period will take effect immediately. Otherwise, the new period will take effect when timer counts to zero or on sync event. You may need to use `mcpwm_comparator_set_compare_value` to set a new compare value for MCPWM comparator in order to keep the same PWM duty cycle.

References