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_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_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 start counter. More... | |
| static void | pwmv2_counter_start_trigger_enable (PWMV2_Type *pwm_x, pwm_counter_t counter) |
| Enable trigmux to trigger counter initiation. More... | |
| static void | pwmv2_counter_start_trigger_disable (PWMV2_Type *pwm_x, pwm_counter_t counter) |
| Disable trigmux to trigger counter initiation. 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) |
#include <drivers/inc/hpm_pwmv2_drv.h>
| #define PWM_DUTY_CYCLE_FP_MAX ((1U << 24) - 1) |
#include <drivers/inc/hpm_pwmv2_drv.h>
| #define PWM_FORCE_OUTPUT | ( | pwm_index, | |
| force_output | |||
| ) | (force_output << (pwm_index << 1)) |
#include <drivers/inc/hpm_pwmv2_drv.h>
| #define PWM_IRQ_BURSTEND | ( | counter | ) | PWMV2_IRQ_EN_BURSTEND_IRQ_EN_BURSTEND_SET((1 << counter)) |
#include <drivers/inc/hpm_pwmv2_drv.h>
| #define PWM_IRQ_CAP_NEG | ( | chn | ) | PWMV2_IRQ_EN_CAP_NEG_IRQ_EN_CAP_NEG_SET((1 << chn)) |
#include <drivers/inc/hpm_pwmv2_drv.h>
| #define PWM_IRQ_CAP_POS | ( | chn | ) | PWMV2_IRQ_EN_CAP_POS_IRQ_EN_CAP_POS_SET((1 << chn)) |
#include <drivers/inc/hpm_pwmv2_drv.h>
| #define PWM_IRQ_CMP | ( | cmp | ) | PWMV2_IRQ_EN_CMP_IRQ_EN_CMP_SET((1 << cmp)) |
#include <drivers/inc/hpm_pwmv2_drv.h>
| #define PWM_IRQ_FAULT | ( | chn | ) | PWMV2_IRQ_EN_FAULT_IRQ_EN_FAULT_SET((1 << chn)) |
#include <drivers/inc/hpm_pwmv2_drv.h>
| #define PWM_IRQ_RELOAD | ( | counter | ) | PWMV2_IRQ_EN_RELOAD_IRQ_EN_RELOAD_SET((1 << counter)) |
#include <drivers/inc/hpm_pwmv2_drv.h>
| #define PWM_IRQ_STS_BURSTEND | ( | counter | ) | PWMV2_IRQ_STS_BURSTEND_IRQ_STS_BURSTEND_SET((1 << counter)) |
#include <drivers/inc/hpm_pwmv2_drv.h>
| #define PWM_IRQ_STS_CAP_NEG | ( | chn | ) | PWMV2_IRQ_STS_CAP_NEG_IRQ_STS_CAP_NEG_SET((1 << chn)) |
#include <drivers/inc/hpm_pwmv2_drv.h>
| #define PWM_IRQ_STS_CAP_POS | ( | chn | ) | PWMV2_IRQ_STS_CAP_POS_IRQ_STS_CAP_POS_SET((1 << chn)) |
#include <drivers/inc/hpm_pwmv2_drv.h>
| #define PWM_IRQ_STS_CMP | ( | cmp | ) | PWMV2_IRQ_STS_CMP_IRQ_STS_CMP_SET((1 << cmp)) |
#include <drivers/inc/hpm_pwmv2_drv.h>
| #define PWM_IRQ_STS_FAULT | ( | chn | ) | PWMV2_IRQ_STS_FAULT_IRQ_STS_FAULT_SET((1 << chn)) |
#include <drivers/inc/hpm_pwmv2_drv.h>
| #define PWM_IRQ_STS_RELOAD | ( | counter | ) | PWMV2_IRQ_STS_RELOAD_IRQ_STS_RELOAD_SET((1 << counter)) |
#include <drivers/inc/hpm_pwmv2_drv.h>
| #define PWM_UNLOCK_KEY (0xB0382607UL) |
#include <drivers/inc/hpm_pwmv2_drv.h>
| #define PWMV2_CAL_SHADOW_OFFSET_ZERO (31) |
#include <drivers/inc/hpm_pwmv2_drv.h>
| #define PWMV2_CALCULATE_INDEX | ( | x | ) | PWMV2_CAL_##x |
#include <drivers/inc/hpm_pwmv2_drv.h>
| #define PWMV2_CMP_INDEX | ( | x | ) | PWMV2_CMP_VAL_WORK_##x |
#include <drivers/inc/hpm_pwmv2_drv.h>
| #define PWMV2_SHADOW_INDEX | ( | x | ) | PWMV2_SHADOW_VAL_##x |
#include <drivers/inc/hpm_pwmv2_drv.h>
| #define PWMV2_SOC_CAL_COUNT_MAX 8 |
#include <drivers/inc/hpm_pwmv2_drv.h>
| typedef struct pwmv2_async_fault_source_config pwmv2_async_fault_source_config_t |
#include <drivers/inc/hpm_pwmv2_drv.h>
pwm fault source config
| typedef struct pwmv2_cmp_calculate_cfg pwmv2_cmp_calculate_cfg_t |
#include <drivers/inc/hpm_pwmv2_drv.h>
| typedef struct pwmv2_cmp_config pwmv2_cmp_config_t |
#include <drivers/inc/hpm_pwmv2_drv.h>
pwm compare config
| typedef struct pwmv2_config pwmv2_config_t |
#include <drivers/inc/hpm_pwmv2_drv.h>
pwm config data
| typedef struct pwmv2_pair_config pwmv2_pair_config_t |
#include <drivers/inc/hpm_pwmv2_drv.h>
pair pwm config
#include <drivers/inc/hpm_pwmv2_drv.h>
| Enumerator | |
|---|---|
| pwm_capture_from_trigmux | |
| pwm_capture_from_gpio | |
| enum pwm_channel_t |
#include <drivers/inc/hpm_pwmv2_drv.h>
| Enumerator | |
|---|---|
| pwm_channel_0 | |
| pwm_channel_1 | |
| pwm_channel_2 | |
| pwm_channel_3 | |
| pwm_channel_4 | |
| pwm_channel_5 | |
| pwm_channel_6 | |
| pwm_channel_7 | |
#include <drivers/inc/hpm_pwmv2_drv.h>
| enum pwm_cmp_source_t |
#include <drivers/inc/hpm_pwmv2_drv.h>
| Enumerator | |
|---|---|
| cmp_value_from_shadow_val | |
| cmp_value_from_calculate | |
| cmp_value_from_capture_posedge | |
| cmp_value_from_counters | |
| cmp_value_fffff000 | |
| cmp_value_ffffff00 | |
| enum pwm_counter_t |
#include <drivers/inc/hpm_pwmv2_drv.h>
| Enumerator | |
|---|---|
| pwm_counter_0 | |
| pwm_counter_1 | |
| pwm_counter_2 | |
| pwm_counter_3 | |
| enum pwm_dac_channel_t |
#include <drivers/inc/hpm_pwmv2_drv.h>
| Enumerator | |
|---|---|
| pwm_dac_channel_0 | |
| pwm_dac_channel_1 | |
| pwm_dac_channel_2 | |
| pwm_dac_channel_3 | |
| enum pwm_dma_chn_t |
#include <drivers/inc/hpm_pwmv2_drv.h>
| Enumerator | |
|---|---|
| pwm_dma_0 | |
| pwm_dma_1 | |
| pwm_dma_2 | |
| pwm_dma_3 | |
| enum pwm_fault_mode_t |
#include <drivers/inc/hpm_pwmv2_drv.h>
| Enumerator | |
|---|---|
| pwm_fault_output_0 | output 0 |
| pwm_fault_output_1 | output 1 |
| pwm_fault_output_high_z | output |
#include <drivers/inc/hpm_pwmv2_drv.h>
| Enumerator | |
|---|---|
| pad_fault_active_low | |
| pad_fault_active_high | |
#include <drivers/inc/hpm_pwmv2_drv.h>
select when to recover PWM output after fault
| enum pwm_force_mode_t |
#include <drivers/inc/hpm_pwmv2_drv.h>
pwm output type
| Enumerator | |
|---|---|
| pwm_force_output_0 | output 0 |
| pwm_force_output_1 | output 1 |
| pwm_force_output_high_z | output |
| pwm_force_output_no_force | |
#include <drivers/inc/hpm_pwmv2_drv.h>
| enum pwm_force_trigger_t |
#include <drivers/inc/hpm_pwmv2_drv.h>
| Enumerator | |
|---|---|
| pwm_force_immediately | after software set shlk bit of shlk register |
| pwm_force_at_reload | |
| pwm_force_at_trigmux | |
| pwm_force_none | after SHSYNCI assert |
#include <drivers/inc/hpm_pwmv2_drv.h>
| Enumerator | |
|---|---|
| pwm_logic_four_cmp_or | |
| pwm_logic_four_cmp_and | |
| pwm_logic_four_cmp_xor | |
| pwm_logic_four_cmp_cd | |
#include <drivers/inc/hpm_pwmv2_drv.h>
| Enumerator | |
|---|---|
| pwm_reload_update_on_shlk | |
| pwm_reload_update_on_compare_point | |
| pwm_reload_update_on_reload | |
| pwm_reload_update_on_trigger | |
#include <drivers/inc/hpm_pwmv2_drv.h>
| Enumerator | |
|---|---|
| pwm_shadow_register_output_polarity_on_shlk | |
| pwm_shadow_register_output_polarity_on_reload | |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
disable low limit
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
disable calculate up limit
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
enable low limit
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
enable calculate up limit
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Select calculate index to counter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
| counter_calculate | counter index |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Select offset from shadow index.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
| shadow_index | shadow index |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Select calculate input value.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
| index | shadow index |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
Set calculate dac value parameter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
| value | parameter |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Set calculate low limit parameter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
| value | parameter |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Set calculate period parameter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
| value | parameter |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Set calculate up limit parameter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cal_index | calculate index |
| value | parameter |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
Disable pwm output.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Enable pwm output.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Clear burstend irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| mask | mask status |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
clear calculate overflow irq status
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Clear capture negedge irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| mask | capture posedge irq mask |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Clear capture posedge irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| mask | capture posedge irq mask |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Clear cmp irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| mask | uint32_t irq status |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Clear fault event.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Clear fault irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| mask | pwm irq mask |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Clear reload irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| mask | irq status mask |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Select cmp use counter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cmp_index | cmp index |
| counter_index | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 | ||
| ) |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 | ||
| ) |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 | ||
| ) |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
Select dac index.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| dac_index | pwm_dac_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Disable counter burst function.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
disable counter reload by trigmux
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Disable counter update by trigmux0.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Disable counter update by trigmux1.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
enable counter reload by trigmux
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Enable counter update by trigmux0.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Enable counter update by trigmux1.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Disable the lower limit of the calculation unit.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Enable the lower limit of the calculation unit.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Select data offset from shadow register.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| index | shadow index |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
Set dac data parameter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| dac_parameter | dac parameter |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
Set trigmux index to start counter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| trig_index | trig index |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Disable trigmux to trigger counter initiation.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Enable trigmux to trigger counter initiation.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Disable the upper limit of the calculation unit.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Enable the upper limit of the calculation unit.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Select counter update by trigmux0.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| trig_index | trigmux index |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 | ) |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
Disable the fault signal from the pin.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
disable burstend irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter_index | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Disable calculate overflow irq.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
disable capture nedege irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| channel_index | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
disable capture posedge irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| channel_index | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
disable cmp irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cmp_index | cmp index |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Disable pwm counter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Disable debug mode.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
disable dma at compare point
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| dma_channel | pwm_dma_chn_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
disable dma at reload point
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| dma_channel | pwm_dma_chn_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
disable fault irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| channel_index | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Disable force mode triggered by software.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
disable four pwm outputs
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Disable invert operations via shadow registers.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
Disable pwm output invert.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Disable pwm complementary mode.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
disable reload irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter_index | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Do not use the shadow register function.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Disable the software dac mode.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| dac_index | pwm_dac_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Disable software forced output.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Disable the fault signal from the trigmux.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Enable the fault signal from the pin.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
enable burstend irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter_index | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
enable calculate overflow irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
enable capture nedege irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| channel_index | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
enable capture posedge irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| channel_index | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
enable cmp irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cmp_index | cmp index |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Enable pwm counter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Enable debug mode.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
enable dma at reload point
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| dma_channel | pwm_dma_chn_t |
| reload_index | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
enable fault irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| channel_index | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Trigger forced mode by hardware signal.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Enable force mode triggered by software.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
enable four pwm outputs
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
Enable pwm output invert.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Enable pwm complementary mode.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
enable reload irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter_index | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Using the Shadow Register Function.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Enable the software dac mode.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| dac_index | pwm_dac_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Enable software forced output.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Enable the fault signal from the trigmux.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
Get burstend irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Get capture negedge irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
get capture negedge value
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Get capture posedge irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
get capture posedge value
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Get cmp irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Get cmp work status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cmp_index | cmp index |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Getting the value of a counter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter_index | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Get counter work status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter_index | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
get enabled compare irq
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Get fault irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Get the status of the output polarity.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Get force mode work status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Get all interrupt status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
Get reload irq status.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
issue all shawdow register
| [in] | pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
select compare point 0 index
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| cmp_index | cmp index |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
select compare point 1 index
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| cmp_index | cmp index |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
Reset pwm counter.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
Select cmp trigmux index.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| cmp_index | cmp index |
| trig_index | trigmux index |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
Set counter burst value.
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
| burst | burst value |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
set dac value
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| dac_index | pwm_dac_channel_t |
| value | dac value |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
set pwm dead area
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
| dead | dead area time |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
set the fault mode
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| chn | pwm_channel_t |
| mode | pwm_fault_mode_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 | ||
| ) |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 | ||
| ) |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 | ||
| ) |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
lock all shawdow register
| [in] | pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
unlock all shadow register
| [in] | pwm_x | PWM base address, HPM_PWMx(x=0..n) |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
start pwm output
| pwm_x | PWM base address, HPM_PWMx(x=0..n) |
| counter | pwm_counter_t |
|
inlinestatic |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |
#include <drivers/inc/hpm_pwmv2_drv.h>
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 |