PWM driver APIs. More...
Data Structures | |
| struct | pwmv2_cmp_config |
| pwm compare config More... | |
| struct | pwmv2_async_fault_source_config |
| pwm fault source config More... | |
| struct | pwmv2_config |
| pwm config data More... | |
| struct | pwmv2_pair_config |
| pair pwm config More... | |
| struct | pwmv2_cmp_calculate_cfg |
Typedefs | |
| typedef struct pwmv2_cmp_config | pwmv2_cmp_config_t |
| pwm compare config More... | |
| typedef struct pwmv2_async_fault_source_config | pwmv2_async_fault_source_config_t |
| pwm fault source config More... | |
| typedef struct pwmv2_config | pwmv2_config_t |
| pwm config data More... | |
| typedef struct pwmv2_pair_config | pwmv2_pair_config_t |
| pair pwm config More... | |
| typedef struct pwmv2_cmp_calculate_cfg | pwmv2_cmp_calculate_cfg_t |
Functions | |
| void | pwmv2_deinit (PWMV2_Type *pwm_x) |
| pwm deinitialize function More... | |
| static void | pwmv2_get_default_config (pwmv2_config_t *config) |
| get default pwm config More... | |
| static void | pwmv2_issue_shadow_register_lock_event (PWMV2_Type *pwm_x) |
| issue all shawdow register More... | |
| static void | pwmv2_shadow_register_lock (PWMV2_Type *pwm_x) |
| lock all shawdow register More... | |
| static void | pwmv2_set_counter_reload_trigmux_index (PWMV2_Type *pwm_x, pwm_counter_t counter, uint8_t trig_index) |
| select one trigger from 8, set to use input signal(selected by cnt_reload_trig) to reload timer More... | |
| static void | pwmv2_enable_multi_counter_sync (PWMV2_Type *pwm_x, uint8_t mask) |
| Multiple counters are enabled at the same time. More... | |
| static void | pwmv2_disable_multi_counter_sync (PWMV2_Type *pwm_x, uint8_t mask) |
| Multiple counters are disabled at the same time. More... | |
| static void | pwmv2_reset_multi_counter_sync (PWMV2_Type *pwm_x, uint8_t mask) |
| Multiple counters are reset at the same time. More... | |
| static void | pwmv2_start_pwm_output_sync (PWMV2_Type *pwm_x, uint8_t mask) |
| Multiple pwm out at the same time. More... | |
| static void | pwmv2_shadow_register_unlock (PWMV2_Type *pwm_x) |
| unlock all shadow register More... | |
| static void | pwmv2_shadow_unlock_bit_mask (PWMV2_Type *pwm_x, uint32_t mask) |
| The shadow registers can be updated only when related unlock_bit is set. More... | |
| static void | pwmv2_set_shadow_val (PWMV2_Type *pwm_x, uint8_t index, uint32_t value, uint8_t high_resolution_tick, bool enable_half_cycle) |
| Set the value of the shadow register. More... | |
| static void | pwmv2_force_output (PWMV2_Type *pwm_x, pwm_channel_t chn, pwm_force_mode_t mode, bool invert) |
| force pwm output More... | |
| static void | pwmv2_enable_four_cmp (PWMV2_Type *pwm_x, pwm_channel_t chn) |
| enable four pwm outputs More... | |
| static void | pwmv2_disable_four_cmp (PWMV2_Type *pwm_x, pwm_channel_t chn) |
| disable four pwm outputs More... | |
| static void | pwmv2_async_fault_signal_select (PWMV2_Type *pwm_x, pwm_channel_t chn, uint8_t pad_index) |
| Direct selection of the fail signal from the pin. More... | |
| static void | pwmv2_async_fault_polarity (PWMV2_Type *pwm_x, pwm_channel_t chn, pwm_fault_pad_polarity_t polarity) |
| Configure the polarity of the fail signal. More... | |
| static void | pwmv2_enable_async_fault (PWMV2_Type *pwm_x, pwm_channel_t chn) |
| Enable the fault signal from the pin. More... | |
| static void | pwmv2_disable_async_fault (PWMV2_Type *pwm_x, pwm_channel_t chn) |
| Disable the fault signal from the pin. More... | |
| static void | pwmv2_enable_sync_fault (PWMV2_Type *pwm_x, pwm_channel_t chn) |
| Enable the fault signal from the trigmux. More... | |
| static void | pwmv2_disable_sync_fault (PWMV2_Type *pwm_x, pwm_channel_t chn) |
| Disable the fault signal from the trigmux. More... | |
| static void | pwmv2_enable_output_invert (PWMV2_Type *pwm_x, pwm_channel_t chn) |
| Enable pwm output invert. More... | |
| static void | pwmv2_disable_output_invert (PWMV2_Type *pwm_x, pwm_channel_t chn) |
| Disable pwm output invert. More... | |
| static void | pwmv2_enable_invert_by_shadow (PWMV2_Type *pwm_x, pwm_channel_t chn, pwm_shadow_register_output_polarity_t update_select) |
| Enable invert operations via shadow registers. More... | |
| static void | pwmv2_disable_invert_by_shadow (PWMV2_Type *pwm_x, pwm_channel_t chn) |
| Disable invert operations via shadow registers. More... | |
| static void | pwmv2_channel_enable_output (PWMV2_Type *pwm_x, pwm_channel_t chn) |
| Enable pwm output. More... | |
| static void | pwmv2_channel_disable_output (PWMV2_Type *pwm_x, pwm_channel_t chn) |
| Disable pwm output. More... | |
| static void | pwmv2_force_update_time_by_shadow (PWMV2_Type *pwm_x, pwm_channel_t chn, pwm_force_shadow_trigger_t update_time) |
| Forces the output configuration to be updated from the time shadow hosting takes effect. More... | |
| static void | pwmv2_set_fault_mode (PWMV2_Type *pwm_x, pwm_channel_t chn, pwm_fault_mode_t mode) |
| set the fault mode More... | |
| static void | pwmv2_set_fault_recovery_time (PWMV2_Type *pwm_x, pwm_channel_t chn, pwm_fault_recovery_trigger_t trig) |
| Set the fault mode recovery time. More... | |
| static void | pwmv2_enable_force_by_hardware (PWMV2_Type *pwm_x, pwm_channel_t chn) |
| Trigger forced mode by hardware signal. More... | |
| static void | pwmv2_enable_force_by_software (PWMV2_Type *pwm_x, pwm_channel_t chn) |
| Enable force mode triggered by software. More... | |
| static void | pwmv2_disable_force_by_software (PWMV2_Type *pwm_x, pwm_channel_t chn) |
| Disable force mode triggered by software. More... | |
| static void | pwmv2_enable_pair_mode (PWMV2_Type *pwm_x, pwm_channel_t chn) |
| Enable pwm complementary mode. More... | |
| static void | pwmv2_disable_pair_mode (PWMV2_Type *pwm_x, pwm_channel_t chn) |
| Disable pwm complementary mode. More... | |
| static void | pwmv2_set_four_cmp_logic (PWMV2_Type *pwm_x, pwm_channel_t chn, pwm_logic_four_cmp_cfg_t logic) |
| Configure the logic between the 4 cmp, valid only if the 4 cmp output is enabled. More... | |
| static void | pwmv2_set_force_update_time (PWMV2_Type *pwm_x, pwm_channel_t chn, pwm_force_trigger_t time) |
| Setting the effective time of forced output. More... | |
| static void | pwmv2_trig_force_mode_select_trigmux_index (PWMV2_Type *pwm_x, pwm_channel_t chn, uint8_t trigmux_index) |
| Selecting trigmux's signal as a forced mode trigger source. More... | |
| static void | pwmv2_trig_force_hardware_or_software_select_trigmux_index (PWMV2_Type *pwm_x, pwm_channel_t chn, uint8_t trigmux_index) |
| Selection of trigger signals for software or hardware trigmux. More... | |
| static void | pwmv2_select_force_trigmux_index (PWMV2_Type *pwm_x, pwm_channel_t chn, uint8_t trigmux_index) |
| Select the trigger source that forces the output to take effect. More... | |
| static void | pwmv2_select_recovery_fault_trigmux_index (PWMV2_Type *pwm_x, pwm_channel_t chn, uint8_t trigmux_index) |
| Selection of trigger signal for fault recovery. More... | |
| static void | pwmv2_set_dead_area (PWMV2_Type *pwm_x, pwm_channel_t chn, uint32_t dead) |
| set pwm dead area More... | |
| static void | pwmv2_set_dead_area_hrpwm (PWMV2_Type *pwm_x, pwm_channel_t chn, uint16_t dead_cycle, uint8_t dead_hrpwm) |
| set pwm dead area with high resolution More... | |
| static void | pwmv2_set_trigout_cmp_index (PWMV2_Type *pwm_x, pwm_channel_t trigmux_chn, uint8_t cmp_index) |
| Setting the comparator as an input to trigmux. More... | |
| static void | pwmv2_enable_software_force (PWMV2_Type *pwm_x, pwm_channel_t chn) |
| Enable software forced output. More... | |
| static void | pwmv2_disable_software_force (PWMV2_Type *pwm_x, pwm_channel_t chn) |
| Disable software forced output. More... | |
| static void | pwmv2_enable_software_dac_mode (PWMV2_Type *pwm_x, pwm_dac_channel_t dac_index) |
| Enable the software dac mode. More... | |
| static void | pwmv2_disable_software_dac_mode (PWMV2_Type *pwm_x, pwm_dac_channel_t dac_index) |
| Disable the software dac mode. More... | |
| static void | pwmv2_enable_debug_mode (PWMV2_Type *pwm_x) |
| Enable debug mode. More... | |
| static void | pwmv2_disable_debug_mode (PWMV2_Type *pwm_x) |
| Disable debug mode. More... | |
| static void | pwmv2_clear_fault_event (PWMV2_Type *pwm_x, pwm_channel_t chn) |
| Clear fault event. More... | |
| static void | pwmv2_enable_shadow_lock_feature (PWMV2_Type *pwm_x) |
| Using the Shadow Register Function. More... | |
| static void | pwmv2_disable_shadow_lock_feature (PWMV2_Type *pwm_x) |
| Do not use the shadow register function. More... | |
| static uint32_t | pwmv2_get_counter_working_status (PWMV2_Type *pwm_x, pwm_counter_t counter_index) |
| Get counter work status. More... | |
| static uint32_t | pwmv2_get_cmp_working_status (PWMV2_Type *pwm_x, uint8_t cmp_index) |
| Get cmp work status. More... | |
| static uint32_t | pwmv2_get_force_working_status (PWMV2_Type *pwm_x) |
| Get force mode work status. More... | |
| static uint32_t | pwmv2_get_force_work_out_polarity_status (PWMV2_Type *pwm_x) |
| Get the status of the output polarity. More... | |
| static uint32_t | pwmv2_get_counter_value (PWMV2_Type *pwm_x, pwm_counter_t counter_index) |
| Getting the value of a counter. More... | |
| static void | pwmv2_set_dac_value (PWMV2_Type *pwm_x, pwm_dac_channel_t dac_index, uint32_t value) |
| set dac value More... | |
| static uint32_t | pwmv2_get_capture_posedge_value (PWMV2_Type *pwm_x, pwm_channel_t chn) |
| get capture posedge value More... | |
| static void | pwmv2_capture_selection_input_source (PWMV2_Type *pwm_x, pwm_channel_t chn, pwm_capture_input_select_t select) |
| Select the input source for the captured signal. More... | |
| static void | pwmv2_set_capture_counter_index (PWMV2_Type *pwm_x, pwm_channel_t chn, uint8_t counter_index) |
| Set the counter to be used for the capture channel. More... | |
| static uint32_t | pwmv2_get_capture_negedge_value (PWMV2_Type *pwm_x, pwm_channel_t chn) |
| get capture negedge value More... | |
| static uint32_t | pwmv2_get_irq_status_all (PWMV2_Type *pwm_x) |
| Get all interrupt status. More... | |
| static void | pwmv2_clear_calculate_overflow_irq_status (PWMV2_Type *pwm_x) |
| clear calculate overflow irq status More... | |
| static void | pwmv2_enable_calculate_overflow_irq (PWMV2_Type *pwm_x) |
| enable calculate overflow irq More... | |
| static void | pwmv2_disable_calculate_overflow_irq (PWMV2_Type *pwm_x) |
| Disable calculate overflow irq. More... | |
| static uint32_t | pwmv2_get_cmp_irq_status (PWMV2_Type *pwm_x) |
| Get cmp irq status. More... | |
| static void | pwmv2_clear_cmp_irq_status (PWMV2_Type *pwm_x, uint32_t mask) |
| Clear cmp irq status. More... | |
| static uint32_t | pwmv2_get_reload_irq_status (PWMV2_Type *pwm_x) |
| Get reload irq status. More... | |
| static void | pwmv2_clear_reload_irq_status (PWMV2_Type *pwm_x, uint32_t mask) |
| Clear reload irq status. More... | |
| static uint32_t | pwmv2_get_capture_posedge_irq_status (PWMV2_Type *pwm_x) |
| Get capture posedge irq status. More... | |
| static void | pwmv2_clear_capture_posedge_irq_status (PWMV2_Type *pwm_x, uint32_t mask) |
| Clear capture posedge irq status. More... | |
| static uint32_t | pwmv2_get_capture_negedge_irq_status (PWMV2_Type *pwm_x) |
| Get capture negedge irq status. More... | |
| static void | pwmv2_clear_capture_negedge_irq_status (PWMV2_Type *pwm_x, uint32_t mask) |
| Clear capture negedge irq status. More... | |
| static uint32_t | pwmv2_get_fault_irq_status (PWMV2_Type *pwm_x) |
| Get fault irq status. More... | |
| static void | pwmv2_clear_fault_irq_status (PWMV2_Type *pwm_x, uint32_t mask) |
| Clear fault irq status. More... | |
| static uint32_t | pwmv2_get_burstend_irq_status (PWMV2_Type *pwm_x) |
| Get burstend irq status. More... | |
| static void | pwmv2_clear_burstend__irq_status (PWMV2_Type *pwm_x, uint32_t mask) |
| Clear burstend irq status. More... | |
| static void | pwmv2_enable_cmp_irq (PWMV2_Type *pwm_x, uint8_t cmp_index) |
| enable cmp irq More... | |
| static void | pwmv2_disable_cmp_irq (PWMV2_Type *pwm_x, uint8_t cmp_index) |
| disable cmp irq More... | |
| static uint32_t | pwmv2_get_enabled_cmp_irq (PWMV2_Type *pwm_x) |
| get enabled compare irq More... | |
| static void | pwmv2_enable_reload_irq (PWMV2_Type *pwm_x, pwm_counter_t counter_index) |
| enable reload irq More... | |
| static void | pwmv2_disable_reload_irq (PWMV2_Type *pwm_x, pwm_counter_t counter_index) |
| disable reload irq More... | |
| static void | pwmv2_enable_capture_posedge_irq (PWMV2_Type *pwm_x, pwm_channel_t channel_index) |
| enable capture posedge irq More... | |
| static void | pwmv2_disable_capture_posedge_irq (PWMV2_Type *pwm_x, pwm_channel_t channel_index) |
| disable capture posedge irq More... | |
| static void | pwmv2_enable_capture_nededge_irq (PWMV2_Type *pwm_x, pwm_channel_t channel_index) |
| enable capture nedege irq More... | |
| static void | pwmv2_disable_capture_nededge_irq (PWMV2_Type *pwm_x, pwm_channel_t channel_index) |
| disable capture nedege irq More... | |
| static void | pwmv2_enable_fault_irq (PWMV2_Type *pwm_x, pwm_channel_t channel_index) |
| enable fault irq More... | |
| static void | pwmv2_disable_fault_irq (PWMV2_Type *pwm_x, pwm_channel_t channel_index) |
| disable fault irq More... | |
| static void | pwmv2_enable_burstend_irq (PWMV2_Type *pwm_x, pwm_counter_t counter_index) |
| enable burstend irq More... | |
| static void | pwmv2_disable_burstend_irq (PWMV2_Type *pwm_x, pwm_counter_t counter_index) |
| disable burstend irq More... | |
| static void | pwmv2_enable_dma_at_compare_point (PWMV2_Type *pwm_x, pwm_dma_chn_t dma_channel, uint8_t cmp_index) |
| enable dma at compare point More... | |
| static void | pwmv2_disable_dma_at_compare_point (PWMV2_Type *pwm_x, pwm_dma_chn_t dma_channel) |
| disable dma at compare point More... | |
| static void | pwmv2_enable_dma_at_reload_point (PWMV2_Type *pwm_x, pwm_dma_chn_t dma_channel, pwm_counter_t reload_index) |
| enable dma at reload point More... | |
| static void | pwmv2_disable_dma_at_reload_point (PWMV2_Type *pwm_x, pwm_dma_chn_t dma_channel) |
| disable dma at reload point More... | |
| static void | pwmv2_reload_select_compare_point0_index (PWMV2_Type *pwm_x, pwm_counter_t counter, uint8_t cmp_index) |
| select compare point 0 index More... | |
| static void | pwmv2_reload_select_compare_point1_index (PWMV2_Type *pwm_x, pwm_counter_t counter, uint8_t cmp_index) |
| select compare point 1 index More... | |
| static void | pwmv2_reload_select_input_trigger (PWMV2_Type *pwm_x, pwm_counter_t counter, uint8_t trig_index) |
| Select the input trigger source for the reload point. More... | |
| static void | pwmv2_set_reload_update_time (PWMV2_Type *pwm_x, pwm_counter_t counter, pwm_reload_update_time_t update) |
| Set reload update time. More... | |
| static void | pwmv2_counter_set_dac_data_parameter (PWMV2_Type *pwm_x, pwm_counter_t counter, uint8_t dac_parameter) |
| Set dac data parameter. More... | |
| static void | pwmv2_conuter_select_dac_index (PWMV2_Type *pwm_x, pwm_counter_t counter, pwm_dac_channel_t dac_index) |
| Select dac index. More... | |
| static void | pwmv2_counter_up_limit_enable (PWMV2_Type *pwm_x, pwm_counter_t counter) |
| Enable the upper limit of the calculation unit. More... | |
| static void | pwmv2_counter_up_limit_disable (PWMV2_Type *pwm_x, pwm_counter_t counter) |
| Disable the upper limit of the calculation unit. More... | |
| static void | pwmv2_counter_select_up_limit_from_shadow_value (PWMV2_Type *pwm_x, pwm_counter_t counter, uint8_t index) |
| Select the upper limit from the shadow register. More... | |
| static void | pwmv2_counter_low_limit_enable (PWMV2_Type *pwm_x, pwm_counter_t counter) |
| Enable the lower limit of the calculation unit. More... | |
| static void | pwmv2_counter_low_limit_disable (PWMV2_Type *pwm_x, pwm_counter_t counter) |
| Disable the lower limit of the calculation unit. More... | |
| static void | pwmv2_counter_select_low_limit_from_shadow_value (PWMV2_Type *pwm_x, pwm_counter_t counter, uint8_t index) |
| Select the lower limit from the shadow register. More... | |
| static void | pwmv2_counter_select_data_offset_from_shadow_value (PWMV2_Type *pwm_x, pwm_counter_t counter, uint8_t index) |
| Select data offset from shadow register. More... | |
| static void | pwmv2_counter_enable_reload_by_trig (PWMV2_Type *pwm_x, pwm_counter_t counter) |
| enable counter reload by trigmux More... | |
| static void | pwmv2_counter_disable_reload_by_trig (PWMV2_Type *pwm_x, pwm_counter_t counter) |
| disable counter reload by trigmux More... | |
| static void | pwmv2_counter_update_trig1 (PWMV2_Type *pwm_x, pwm_counter_t counter, uint8_t trig_index) |
| Select counter update by trigmux1. More... | |
| static void | pwmv2_counter_enable_update_trig1 (PWMV2_Type *pwm_x, pwm_counter_t counter) |
| Enable counter update by trigmux1. More... | |
| static void | pwmv2_counter_disable_update_trig1 (PWMV2_Type *pwm_x, pwm_counter_t counter) |
| Disable counter update by trigmux1. More... | |
| static void | pwmv2_counter_set_trig1_calculate_cell_index (PWMV2_Type *pwm_x, pwm_counter_t counter, uint8_t cal_index) |
| Enable change counter value to one of the calculation cell output when cnt_update_triger1 issued. More... | |
| static void | pwmv2_counter_update_trig0 (PWMV2_Type *pwm_x, pwm_counter_t counter, uint8_t trig_index) |
| Select counter update by trigmux0. More... | |
| static void | pwmv2_counter_enable_update_trig0 (PWMV2_Type *pwm_x, pwm_counter_t counter) |
| Enable counter update by trigmux0. More... | |
| static void | pwmv2_counter_disable_update_trig0 (PWMV2_Type *pwm_x, pwm_counter_t counter) |
| Disable counter update by trigmux0. More... | |
| static void | pwmv2_counter_set_trig0_calculate_cell_index (PWMV2_Type *pwm_x, pwm_counter_t counter, uint8_t cal_index) |
| Enable change counter value to one of the calculation cell output when cnt_update_triger0 issued. More... | |
| static void | pwmv2_counter_start_select_trigger_index (PWMV2_Type *pwm_x, pwm_counter_t counter, uint8_t trig_index) |
| Set trigmux index to control channel output. More... | |
| static void | pwmv2_counter_start_trigger_enable (PWMV2_Type *pwm_x, pwm_counter_t counter) |
| Enable trigmux to trigger channel output. More... | |
| static void | pwmv2_counter_start_trigger_disable (PWMV2_Type *pwm_x, pwm_counter_t counter) |
| Disable trigmux to trigger channel output. More... | |
| static void | pwmv2_set_counter_burst (PWMV2_Type *pwm_x, pwm_counter_t counter, uint16_t burst) |
| Set counter burst value. More... | |
| static void | pwmv2_counter_burst_disable (PWMV2_Type *pwm_x, pwm_counter_t counter) |
| Disable counter burst function. More... | |
| static void | pwmv2_start_pwm_output (PWMV2_Type *pwm_x, pwm_counter_t counter) |
| start pwm output More... | |
| static void | pwmv2_reset_counter (PWMV2_Type *pwm_x, pwm_counter_t counter) |
| Reset pwm counter. More... | |
| static void | pwmv2_enable_counter (PWMV2_Type *pwm_x, pwm_counter_t counter) |
| Enable pwm counter. More... | |
| static void | pwmv2_disable_counter (PWMV2_Type *pwm_x, pwm_counter_t counter) |
| Disable pwm counter. More... | |
| static void | pwmv2_calculate_set_up_limit_parameter (PWMV2_Type *pwm_x, uint8_t cal_index, uint8_t value) |
| Set calculate up limit parameter. More... | |
| static void | pwmv2_calculate_set_low_limit_parameter (PWMV2_Type *pwm_x, uint8_t cal_index, uint8_t value) |
| Set calculate low limit parameter. More... | |
| static void | pwmv2_calculate_set_period_parameter (PWMV2_Type *pwm_x, uint8_t cal_index, uint8_t value) |
| Set calculate period parameter. More... | |
| static void | pwmv2_calculate_set_dac_value_parameter (PWMV2_Type *pwm_x, uint8_t cal_index, uint8_t value) |
| Set calculate dac value parameter. More... | |
| static void | pwmv2_calculate_select_counter_calculate_index (PWMV2_Type *pwm_x, uint8_t cal_index, uint8_t counter_calculate) |
| Select calculate index to counter. More... | |
| static void | pwmv2_calculate_select_in_value (PWMV2_Type *pwm_x, uint8_t cal_index, uint8_t index) |
| Select calculate input value. More... | |
| static void | pwmv2_calculate_enable_up_limit (PWMV2_Type *pwm_x, uint8_t cal_index) |
| enable calculate up limit More... | |
| static void | pwmv2_calculate_disable_up_limit (PWMV2_Type *pwm_x, uint8_t cal_index) |
| disable calculate up limit More... | |
| static void | pwmv2_calculate_select_up_limit_offset (PWMV2_Type *pwm_x, uint8_t cal_index, uint8_t shadow_index) |
| Select up limit offset from shadow index. More... | |
| static void | pwmv2_calculate_select_low_limit_offset (PWMV2_Type *pwm_x, uint8_t cal_index, uint8_t shadow_index) |
| Select low limit offset from shadow index. More... | |
| static void | pwmv2_calculate_select_in_offset (PWMV2_Type *pwm_x, uint8_t cal_index, uint8_t shadow_index) |
| Select offset from shadow index. More... | |
| static void | pwmv2_calculate_enable_low_limit (PWMV2_Type *pwm_x, uint8_t cal_index) |
| enable low limit More... | |
| static void | pwmv2_calculate_disable_low_limit (PWMV2_Type *pwm_x, uint8_t cal_index) |
| disable low limit More... | |
| static void | pwmv2_select_cmp_trigmux (PWMV2_Type *pwm_x, uint8_t cmp_index, uint8_t trig_index) |
| Select cmp trigmux index. More... | |
| static void | pwmv2_cmp_update_trig_time (PWMV2_Type *pwm_x, uint8_t cmp_index, pwm_cmp_shadow_register_update_trigger_t trig_time) |
| Select cmp update trigmux time. More... | |
| static void | pwmv2_select_cmp_source (PWMV2_Type *pwm_x, uint8_t cmp_index, pwm_cmp_source_t cmp_sel, uint8_t index) |
| Select cmp source. More... | |
| static void | pwmv2_cmp_select_counter (PWMV2_Type *pwm_x, uint8_t cmp_index, pwm_counter_t counter_index) |
| Select cmp use counter. More... | |
| void | pwmv2_config_cmp (PWMV2_Type *pwm_x, uint8_t index, pwmv2_cmp_config_t *config) |
| config pwm cmp More... | |
| void | pwmv2_config_async_fault_source (PWMV2_Type *pwm_x, pwm_channel_t index, pwmv2_async_fault_source_config_t *config) |
| config async fault source More... | |
| void | pwmv2_config_pwm (PWMV2_Type *pwm_x, pwm_channel_t index, pwmv2_config_t *config, bool enable_pair_mode) |
| config pwm More... | |
| hpm_stat_t | pwmv2_setup_waveform (PWMV2_Type *pwm_x, pwm_channel_t chn, pwmv2_config_t *pwm_config, uint8_t cmp_start_index, pwmv2_cmp_config_t *cmp, uint8_t cmp_num) |
| Set pwm waveform. More... | |
| hpm_stat_t | pwmv2_setup_waveform_in_pair (PWMV2_Type *pwm_x, pwm_channel_t chn, pwmv2_pair_config_t *pwm_pair_config, uint8_t cmp_start_index, pwmv2_cmp_config_t *cmp, uint8_t cmp_num) |
| set the pwm waveform complementary mode More... | |
| void | pwmv2_setup_cmp_calculate (PWMV2_Type *pwm_x, uint8_t cal_index, pwmv2_cmp_calculate_cfg_t *cal) |
| Configure the cmp calculate unit. More... | |
PWM driver APIs.
| #define PWM_CMP_UNABLE_OUTPUT_INDEX (16) |
| #define PWM_DUTY_CYCLE_FP_MAX ((1U << 24) - 1) |
| #define PWM_FORCE_OUTPUT | ( | pwm_index, | |
| force_output | |||
| ) | (force_output << (pwm_index << 1)) |
| #define PWM_IRQ_BURSTEND | ( | counter | ) | PWMV2_IRQ_EN_BURSTEND_IRQ_EN_BURSTEND_SET((1 << counter)) |
| #define PWM_IRQ_CAP_NEG | ( | chn | ) | PWMV2_IRQ_EN_CAP_NEG_IRQ_EN_CAP_NEG_SET((1 << chn)) |
| #define PWM_IRQ_CAP_POS | ( | chn | ) | PWMV2_IRQ_EN_CAP_POS_IRQ_EN_CAP_POS_SET((1 << chn)) |
| #define PWM_IRQ_CMP | ( | cmp | ) | PWMV2_IRQ_EN_CMP_IRQ_EN_CMP_SET((1 << cmp)) |
| #define PWM_IRQ_FAULT | ( | chn | ) | PWMV2_IRQ_EN_FAULT_IRQ_EN_FAULT_SET((1 << chn)) |
| #define PWM_IRQ_RELOAD | ( | counter | ) | PWMV2_IRQ_EN_RELOAD_IRQ_EN_RELOAD_SET((1 << counter)) |
| #define PWM_IRQ_STS_BURSTEND | ( | counter | ) | PWMV2_IRQ_STS_BURSTEND_IRQ_STS_BURSTEND_SET((1 << counter)) |
| #define PWM_IRQ_STS_CAP_NEG | ( | chn | ) | PWMV2_IRQ_STS_CAP_NEG_IRQ_STS_CAP_NEG_SET((1 << chn)) |
| #define PWM_IRQ_STS_CAP_POS | ( | chn | ) | PWMV2_IRQ_STS_CAP_POS_IRQ_STS_CAP_POS_SET((1 << chn)) |
| #define PWM_IRQ_STS_CMP | ( | cmp | ) | PWMV2_IRQ_STS_CMP_IRQ_STS_CMP_SET((1 << cmp)) |
| #define PWM_IRQ_STS_FAULT | ( | chn | ) | PWMV2_IRQ_STS_FAULT_IRQ_STS_FAULT_SET((1 << chn)) |
| #define PWM_IRQ_STS_RELOAD | ( | counter | ) | PWMV2_IRQ_STS_RELOAD_IRQ_STS_RELOAD_SET((1 << counter)) |
| #define PWM_UNLOCK_KEY (0xB0382607UL) |
| #define PWMV2_CAL_SHADOW_OFFSET_ZERO (31) |
| #define PWMV2_CALCULATE_INDEX | ( | x | ) | PWMV2_CAL_##x |
| #define PWMV2_CMP_INDEX | ( | x | ) | PWMV2_CMP_VAL_WORK_##x |
| #define PWMV2_DMA_SEL_CMP_OFFSET (0U) |
| #define PWMV2_DMA_SEL_COUNTER_RELOAD_OFFSET (24U) |
| #define PWMV2_SHADOW_INDEX | ( | x | ) | PWMV2_SHADOW_VAL_##x |
| typedef struct pwmv2_async_fault_source_config pwmv2_async_fault_source_config_t |
pwm fault source config
| typedef struct pwmv2_cmp_calculate_cfg pwmv2_cmp_calculate_cfg_t |
| typedef struct pwmv2_cmp_config pwmv2_cmp_config_t |
pwm compare config
| typedef struct pwmv2_config pwmv2_config_t |
pwm config data
| typedef struct pwmv2_pair_config pwmv2_pair_config_t |
pair pwm config
| enum pwm_channel_t |
| enum pwm_cmp_source_t |
| enum pwm_counter_t |
| enum pwm_dac_channel_t |
| enum pwm_dma_chn_t |
| enum pwm_fault_mode_t |
select when to recover PWM output after fault
| enum pwm_force_mode_t |
| enum pwm_force_trigger_t |
|
inlinestatic |
Configure the polarity of the fail signal.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
| polarity | pwm_fault_pad_polarity_t |
|
inlinestatic |
Direct selection of the fail signal from the pin.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
| pad_index | motor pad |
|
inlinestatic |
disable low limit
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
|
inlinestatic |
disable calculate up limit
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
|
inlinestatic |
enable low limit
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
|
inlinestatic |
enable calculate up limit
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
|
inlinestatic |
Select calculate index to counter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
| counter_calculate | counter index |
|
inlinestatic |
Select offset from shadow index.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
| shadow_index | shadow index |
|
inlinestatic |
Select calculate input value.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
| index | shadow index |
|
inlinestatic |
Select low limit offset from shadow index.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
| shadow_index | shadow index |
|
inlinestatic |
Select up limit offset from shadow index.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
| shadow_index | shadow index |
|
inlinestatic |
Set calculate dac value parameter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
| value | parameter |
|
inlinestatic |
Set calculate low limit parameter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
| value | parameter |
|
inlinestatic |
Set calculate period parameter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
| value | parameter |
|
inlinestatic |
Set calculate up limit parameter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
| value | parameter |
|
inlinestatic |
Select the input source for the captured signal.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
| select | pwm_capture_input_select_t |
|
inlinestatic |
Disable pwm output.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
Enable pwm output.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
Clear burstend irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| mask | mask status |
|
inlinestatic |
clear calculate overflow irq status
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
Clear capture negedge irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| mask | capture posedge irq mask |
|
inlinestatic |
Clear capture posedge irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| mask | capture posedge irq mask |
|
inlinestatic |
Clear cmp irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| mask | uint32_t irq status |
|
inlinestatic |
Clear fault event.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
Clear fault irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| mask | pwm irq mask |
|
inlinestatic |
Clear reload irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| mask | irq status mask |
|
inlinestatic |
Select cmp use counter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cmp_index | cmp index |
| counter_index | pwm_counter_t |
|
inlinestatic |
Select cmp update trigmux time.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cmp_index | cmp index |
| trig_time | pwm_cmp_shadow_register_update_trigger_t |
| void pwmv2_config_async_fault_source | ( | PWMV2_Type * | pwm_x, |
| pwm_channel_t | index, | ||
| pwmv2_async_fault_source_config_t * | config | ||
| ) |
config async fault source
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| index | cmp index |
| config | pwmv2_async_fault_source_config_t |
| void pwmv2_config_cmp | ( | PWMV2_Type * | pwm_x, |
| uint8_t | index, | ||
| pwmv2_cmp_config_t * | config | ||
| ) |
config pwm cmp
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| index | cmp index |
| config | pwmv2_cmp_config_t |
| void pwmv2_config_pwm | ( | PWMV2_Type * | pwm_x, |
| pwm_channel_t | index, | ||
| pwmv2_config_t * | config, | ||
| bool | enable_pair_mode | ||
| ) |
config pwm
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| index | pwm_channel_t |
| config | pwmv2_config_t |
| enable_pair_mode | bool |
|
inlinestatic |
Select dac index.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| dac_index | pwm_dac_channel_t |
|
inlinestatic |
Disable counter burst function.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
disable counter reload by trigmux
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
Disable counter update by trigmux0.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
Disable counter update by trigmux1.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
enable counter reload by trigmux
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
Enable counter update by trigmux0.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
Enable counter update by trigmux1.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
Disable the lower limit of the calculation unit.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
Enable the lower limit of the calculation unit.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
Select data offset from shadow register.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| index | shadow index |
|
inlinestatic |
Select the lower limit from the shadow register.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| index | shadow index |
|
inlinestatic |
Select the upper limit from the shadow register.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| index | shadow index |
|
inlinestatic |
Set dac data parameter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| dac_parameter | dac parameter |
|
inlinestatic |
Enable change counter value to one of the calculation cell output when cnt_update_triger0 issued.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| cal_index | cal index |
|
inlinestatic |
Enable change counter value to one of the calculation cell output when cnt_update_triger1 issued.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| cal_index | cal index |
|
inlinestatic |
Set trigmux index to control channel output.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| trig_index | trig index |
|
inlinestatic |
Disable trigmux to trigger channel output.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
Enable trigmux to trigger channel output.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
Disable the upper limit of the calculation unit.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
Enable the upper limit of the calculation unit.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
Select counter update by trigmux0.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| trig_index | trigmux index |
|
inlinestatic |
Select counter update by trigmux1.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| trig_index | trigmux index |
| void pwmv2_deinit | ( | PWMV2_Type * | pwm_x | ) |
pwm deinitialize function
| [in] | pwm_x | PWM base address, HPM_PWMx(x=0..n) |
Disables pwm force by default to prevent unintended force if the user has not configured pwm force.
|
inlinestatic |
Disable the fault signal from the pin.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
disable burstend irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter_index | pwm_counter_t |
|
inlinestatic |
Disable calculate overflow irq.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
disable capture nedege irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| channel_index | pwm_channel_t |
|
inlinestatic |
disable capture posedge irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| channel_index | pwm_counter_t |
|
inlinestatic |
disable cmp irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cmp_index | cmp index |
|
inlinestatic |
Disable pwm counter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
Disable debug mode.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
disable dma at compare point
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| dma_channel | pwm_dma_chn_t |
|
inlinestatic |
disable dma at reload point
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| dma_channel | pwm_dma_chn_t |
|
inlinestatic |
disable fault irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| channel_index | pwm_channel_t |
|
inlinestatic |
Disable force mode triggered by software.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
disable four pwm outputs
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
Disable invert operations via shadow registers.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
Multiple counters are disabled at the same time.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| mask | bit0 - cnt0, bit1 - cnt1, bitn - cntn, n==3 |
|
inlinestatic |
Disable pwm output invert.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
Disable pwm complementary mode.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
disable reload irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter_index | pwm_counter_t |
|
inlinestatic |
Do not use the shadow register function.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
Disable the software dac mode.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| dac_index | pwm_dac_channel_t |
|
inlinestatic |
Disable software forced output.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
Disable the fault signal from the trigmux.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
Enable the fault signal from the pin.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
enable burstend irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter_index | pwm_counter_t |
|
inlinestatic |
enable calculate overflow irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
enable capture nedege irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| channel_index | pwm_channel_t |
|
inlinestatic |
enable capture posedge irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| channel_index | pwm_counter_t |
|
inlinestatic |
enable cmp irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cmp_index | cmp index |
|
inlinestatic |
Enable pwm counter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
Enable debug mode.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
enable dma at compare point
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| dma_channel | pwm_dma_chn_t |
| cmp_index | cmp index |
|
inlinestatic |
enable dma at reload point
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| dma_channel | pwm_dma_chn_t, DMA channel to enable |
| reload_index | pwm_counter_t, this parameter is not used |
|
inlinestatic |
enable fault irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| channel_index | pwm_channel_t |
|
inlinestatic |
Trigger forced mode by hardware signal.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
Enable force mode triggered by software.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
enable four pwm outputs
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
Enable invert operations via shadow registers.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
| update_select | pwm_shadow_register_output_polarity_t |
|
inlinestatic |
Multiple counters are enabled at the same time.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| mask | bit0 - cnt0, bit1 - cnt1, bitn - cntn, n==3 |
|
inlinestatic |
Enable pwm output invert.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
Enable pwm complementary mode.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
enable reload irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter_index | pwm_counter_t |
|
inlinestatic |
Using the Shadow Register Function.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
Enable the software dac mode.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| dac_index | pwm_dac_channel_t |
|
inlinestatic |
Enable software forced output.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
Enable the fault signal from the trigmux.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
force pwm output
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
| mode | pwm_force_mode_t |
| invert | 0 - low level, 1 - high level |
|
inlinestatic |
Forces the output configuration to be updated from the time shadow hosting takes effect.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
| update_time | pwm_force_shadow_trigger_t |
|
inlinestatic |
Get burstend irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
Get capture negedge irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
get capture negedge value
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
Get capture posedge irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
get capture posedge value
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
Get cmp irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
Get cmp work status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cmp_index | cmp index |
|
inlinestatic |
Getting the value of a counter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter_index | pwm_counter_t |
|
inlinestatic |
Get counter work status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter_index | pwm_counter_t |
|
inlinestatic |
get default pwm config
| [out] | config | pwmv2_config_t |
|
inlinestatic |
get enabled compare irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
Get fault irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
Get the status of the output polarity.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
Get force mode work status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
Get all interrupt status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
Get reload irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
issue all shawdow register
| [in] | pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
select compare point 0 index
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| cmp_index | cmp index |
|
inlinestatic |
select compare point 1 index
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| cmp_index | cmp index |
|
inlinestatic |
Select the input trigger source for the reload point.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| trig_index | trig index |
|
inlinestatic |
Reset pwm counter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
Multiple counters are reset at the same time.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| mask | bit0 - cnt0, bit1 - cnt1, bitn - cntn, n==3 |
|
inlinestatic |
Select cmp source.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cmp_index | cmp index |
| cmp_sel | pwm_cmp_source_t |
| index | source index |
|
inlinestatic |
Select cmp trigmux index.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cmp_index | cmp index |
| trig_index | trigmux index |
|
inlinestatic |
Select the trigger source that forces the output to take effect.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
| trigmux_index | select one trigger from 8 |
|
inlinestatic |
Selection of trigger signal for fault recovery.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
| trigmux_index | select one trigger from 8 |
|
inlinestatic |
Set the counter to be used for the capture channel.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
| counter_index | counter index |
|
inlinestatic |
Set counter burst value.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| burst | burst value |
|
inlinestatic |
select one trigger from 8, set to use input signal(selected by cnt_reload_trig) to reload timer
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| trig_index | one trigger from 8 |
|
inlinestatic |
set dac value
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| dac_index | pwm_dac_channel_t |
| value | dac value |
|
inlinestatic |
set pwm dead area
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
| dead | dead area time |
|
inlinestatic |
set pwm dead area with high resolution
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
| dead_cycle | dead area in clock cycles (16-bit) |
| dead_hrpwm | dead area in high resolution ticks (8-bit, 0-255) |
|
inlinestatic |
set the fault mode
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
| mode | pwm_fault_mode_t |
|
inlinestatic |
Set the fault mode recovery time.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
| trig | pwm_fault_recovery_trigger_t |
|
inlinestatic |
Setting the effective time of forced output.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
| time | pwm_force_trigger_t |
|
inlinestatic |
Configure the logic between the 4 cmp, valid only if the 4 cmp output is enabled.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
| logic | pwm_logic_four_cmp_cfg_t |
|
inlinestatic |
Set reload update time.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| update | pwm_reload_update_time_t |
|
inlinestatic |
Set the value of the shadow register.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| index | shadow index |
| value | normal value (24bit) |
| high_resolution_tick | High precision pwm values (0 -255) |
| enable_half_cycle | half-cycle pwm |
|
inlinestatic |
Setting the comparator as an input to trigmux.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| trigmux_chn | pwm_channel_t |
| cmp_index | cmp index |
| void pwmv2_setup_cmp_calculate | ( | PWMV2_Type * | pwm_x, |
| uint8_t | cal_index, | ||
| pwmv2_cmp_calculate_cfg_t * | cal | ||
| ) |
Configure the cmp calculate unit.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
| cal | pwmv2_cmp_calculate_cfg_t |
| hpm_stat_t pwmv2_setup_waveform | ( | PWMV2_Type * | pwm_x, |
| pwm_channel_t | chn, | ||
| pwmv2_config_t * | pwm_config, | ||
| uint8_t | cmp_start_index, | ||
| pwmv2_cmp_config_t * | cmp, | ||
| uint8_t | cmp_num | ||
| ) |
Set pwm waveform.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
| pwm_config | pwmv2_config_t |
| cmp_start_index | cmp start index |
| cmp | pwmv2_cmp_config_t |
| cmp_num | cmp number |
| hpm_stat_t pwmv2_setup_waveform_in_pair | ( | PWMV2_Type * | pwm_x, |
| pwm_channel_t | chn, | ||
| pwmv2_pair_config_t * | pwm_pair_config, | ||
| uint8_t | cmp_start_index, | ||
| pwmv2_cmp_config_t * | cmp, | ||
| uint8_t | cmp_num | ||
| ) |
set the pwm waveform complementary mode
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
| pwm_pair_config | pwmv2_pair_config_t |
| cmp_start_index | cmp start index |
| cmp | pwmv2_cmp_config_t |
| cmp_num | cmp number |
|
inlinestatic |
lock all shawdow register
| [in] | pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
unlock all shadow register
| [in] | pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
The shadow registers can be updated only when related unlock_bit is set.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| mask | bit2 to bit 29 for value_shadow, bit30 for force_mode, bit31 for polarity. |
|
inlinestatic |
start pwm output
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
Multiple pwm out at the same time.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| mask | bit0 - cnt0, bit1 - cnt1, bitn - cntn, n==3 |
|
inlinestatic |
Selection of trigger signals for software or hardware trigmux.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
| trigmux_index | select one trigger from 8 |
|
inlinestatic |
Selecting trigmux's signal as a forced mode trigger source.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
| trigmux_index | trigmux index |