8 #ifndef HPM_PWMV2_DRV_H
9 #define HPM_PWMV2_DRV_H
13 #include "hpm_soc_feature.h"
23 #define PWM_UNLOCK_KEY (0xB0382607UL)
24 #define PWM_CMP_UNABLE_OUTPUT_INDEX (16)
27 #define PWM_IRQ_FAULT PWM_IRQEN_FAULTIRQE_MASK
28 #define PWM_IRQ_EX_RELOAD PWM_IRQEN_XRLDIRQE_MASK
29 #define PWM_IRQ_HALF_RELOAD PWM_IRQEN_HALFRLDIRQE_MASK
30 #define PWM_IRQ_RELOAD PWM_IRQEN_RLDIRQE_MASK
31 #define PWM_IRQ_CMP(x) PWM_IRQEN_CMPIRQEX_SET((1 << x))
34 #define PWM_FORCE_OUTPUT(pwm_index, force_output) \
35 (force_output << (pwm_index << 1))
37 #define PWM_DUTY_CYCLE_FP_MAX ((1U << 24) - 1)
39 #ifndef PWMV2_SOC_CAL_COUNT_MAX
40 #define PWMV2_SOC_CAL_COUNT_MAX 8
43 #define PWMV2_SHADOW_INDEX(x) PWMV2_SHADOW_VAL_##x
44 #define PWMV2_CMP_INDEX(x) PWMV2_CMP_VAL_WORK_##x
45 #define PWMV2_CALCULATE_INDEX(x) PWMV2_CAL_##x
46 #define PWMV2_CAL_SHADOW_OFFSET_ZERO (31)
731 #ifdef PWM_SOC_HRPWM_SUPPORT
739 static inline void pwmv2_add_delay_tick_after_dead_area(
PWMV2_Type *pwm_x, uint8_t delay_tick)
749 static inline void pwmv2_enable_hrpwm(
PWMV2_Type *pwm_x)
759 static inline void pwmv2_disable_hrpwm(
PWMV2_Type *pwm_x)
1879 if (cmp_index >= 16) {
uint32_t hpm_stat_t
Definition: hpm_common.h:123
static uint32_t pwmv2_get_cmp_irq_status(PWMV2_Type *pwm_x)
Get cmp irq status.
Definition: hpm_pwmv2_drv.h:1007
static void pwmv2_disable_dma_at_reload_point(PWMV2_Type *pwm_x, pwm_dma_chn_t dma_channel)
disable dma at reload point
Definition: hpm_pwmv2_drv.h:1308
static void pwmv2_enable_capture_posedge_irq(PWMV2_Type *pwm_x, pwm_channel_t channel_index)
enable capture posedge irq
Definition: hpm_pwmv2_drv.h:1183
static uint32_t pwmv2_get_capture_posedge_value(PWMV2_Type *pwm_x, pwm_channel_t chn)
get capture posedge value
Definition: hpm_pwmv2_drv.h:917
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.
Definition: hpm_pwmv2_drv.h:942
static void pwmv2_enable_output_invert(PWMV2_Type *pwm_x, pwm_channel_t chn)
Enable pwm output invert.
Definition: hpm_pwmv2_drv.h:460
pwm_counter_t
Definition: hpm_pwmv2_drv.h:48
static void pwmv2_shadow_register_lock(PWMV2_Type *pwm_x)
lock all shawdow register
Definition: hpm_pwmv2_drv.h:273
pwm_cmp_source_t
Definition: hpm_pwmv2_drv.h:164
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
Definition: hpm_pwmv2_drv.h:1320
static void pwmv2_disable_fault_from_pad(PWMV2_Type *pwm_x, pwm_channel_t chn)
Disable the fault signal from the pin.
Definition: hpm_pwmv2_drv.h:427
static void pwmv2_disable_burstend_irq(PWMV2_Type *pwm_x, pwm_counter_t counter_index)
disable burstend irq
Definition: hpm_pwmv2_drv.h:1260
static void pwmv2_enable_software_dac_mode(PWMV2_Type *pwm_x, pwm_dac_channel_t dac_index)
Enable the software dac mode.
Definition: hpm_pwmv2_drv.h:772
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.
Definition: hpm_pwmv2_drv.h:1529
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.
Definition: hpm_pwmv2_drv.h:1865
void pwmv2_config_cmp(PWMV2_Type *pwm_x, uint8_t index, pwmv2_cmp_config_t *config)
config pwm cmp
Definition: hpm_pwmv2_drv.c:50
static void pwmv2_enable_fault_from_trigmux(PWMV2_Type *pwm_x, pwm_channel_t chn)
Enable the fault signal from the trigmux.
Definition: hpm_pwmv2_drv.h:438
static void pwmv2_clear_cmp_irq_status(PWMV2_Type *pwm_x, uint32_t mask)
Clear cmp irq status.
Definition: hpm_pwmv2_drv.h:1018
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.
Definition: hpm_pwmv2_drv.h:1449
static uint32_t pwmv2_get_counter_value(PWMV2_Type *pwm_x, pwm_counter_t counter_index)
Getting the value of a counter.
Definition: hpm_pwmv2_drv.h:893
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.
Definition: hpm_pwmv2_drv.h:620
static void pwmv2_enable_force_by_software(PWMV2_Type *pwm_x, pwm_channel_t chn)
Enable force mode triggered by software.
Definition: hpm_pwmv2_drv.h:575
static void pwmv2_set_dac_value(PWMV2_Type *pwm_x, pwm_dac_channel_t dac_index, uint32_t value)
set dac value
Definition: hpm_pwmv2_drv.h:905
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.
Definition: hpm_pwmv2_drv.h:553
static void pwmv2_enable_calculate_overflow_irq(PWMV2_Type *pwm_x)
enable calculate overflow irq
Definition: hpm_pwmv2_drv.h:986
static uint32_t pwmv2_get_capture_negedge_irq_status(PWMV2_Type *pwm_x)
Get capture negedge irq status.
Definition: hpm_pwmv2_drv.h:1073
static void pwmv2_shadow_register_unlock(PWMV2_Type *pwm_x)
unlock all shadow register
Definition: hpm_pwmv2_drv.h:319
static void pwmv2_enable_force_by_hardware(PWMV2_Type *pwm_x, pwm_channel_t chn)
Trigger forced mode by hardware signal.
Definition: hpm_pwmv2_drv.h:564
struct pwmv2_cmp_config pwmv2_cmp_config_t
pwm compare config
static void pwmv2_calculate_enable_low_limit(PWMV2_Type *pwm_x, uint8_t cal_index)
enable low limit
Definition: hpm_pwmv2_drv.h:1817
void pwmv2_config_pwm(PWMV2_Type *pwm_x, pwm_channel_t index, pwmv2_config_t *config, bool enable_pair_mode)
config pwm
Definition: hpm_pwmv2_drv.c:78
static void pwmv2_start_pwm_output_sync(PWMV2_Type *pwm_x, uint8_t mask)
Multiple pwm out at the same time.
Definition: hpm_pwmv2_drv.h:309
static uint32_t pwmv2_get_force_working_status(PWMV2_Type *pwm_x)
Get force mode work status.
Definition: hpm_pwmv2_drv.h:870
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.
Definition: hpm_pwmv2_drv.h:704
static void pwmv2_counter_burst_disable(PWMV2_Type *pwm_x, pwm_counter_t counter)
Disable counter burst function.
Definition: hpm_pwmv2_drv.h:1632
static void pwmv2_disable_dma_at_compare_point(PWMV2_Type *pwm_x, pwm_dma_chn_t dma_channel)
disable dma at compare point
Definition: hpm_pwmv2_drv.h:1284
static void pwmv2_disable_calculate_overflow_irq(PWMV2_Type *pwm_x)
Disable calculate overflow irq.
Definition: hpm_pwmv2_drv.h:996
void pwmv2_setup_cmp_calculate(PWMV2_Type *pwm_x, uint8_t cal_index, pwmv2_cmp_calculate_cfg_t *cal)
Configure the cmp calculate unit.
Definition: hpm_pwmv2_drv.c:131
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.
Definition: hpm_pwmv2_drv.h:1575
static void pwmv2_disable_invert_by_shadow(PWMV2_Type *pwm_x, pwm_channel_t chn)
Disable invert operations via shadow registers.
Definition: hpm_pwmv2_drv.h:495
static uint32_t pwmv2_get_burstend_irq_status(PWMV2_Type *pwm_x)
Get burstend irq status.
Definition: hpm_pwmv2_drv.h:1117
static void pwmv2_enable_pair_mode(PWMV2_Type *pwm_x, pwm_channel_t chn)
Enable pwm complementary mode.
Definition: hpm_pwmv2_drv.h:597
static void pwmv2_clear_burstend__irq_status(PWMV2_Type *pwm_x, uint32_t mask)
Clear burstend irq status.
Definition: hpm_pwmv2_drv.h:1128
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.
Definition: hpm_pwmv2_drv.h:1852
void pwmv2_deinit(PWMV2_Type *pwm_x)
pwm deinitialize function
Definition: hpm_pwmv2_drv.c:11
static void pwmv2_channel_enable_output(PWMV2_Type *pwm_x, pwm_channel_t chn)
Enable pwm output.
Definition: hpm_pwmv2_drv.h:506
pwm_dac_channel_t
Definition: hpm_pwmv2_drv.h:135
static void pwmv2_enable_cmp_irq(PWMV2_Type *pwm_x, uint8_t cmp_index)
enable cmp irq
Definition: hpm_pwmv2_drv.h:1139
static void pwmv2_counter_disable_update_trig1(PWMV2_Type *pwm_x, pwm_counter_t counter)
Disable counter update by trigmux1.
Definition: hpm_pwmv2_drv.h:1517
static void pwmv2_counter_low_limit_disable(PWMV2_Type *pwm_x, pwm_counter_t counter)
Disable the lower limit of the calculation unit.
Definition: hpm_pwmv2_drv.h:1437
pwm_channel_t
Definition: hpm_pwmv2_drv.h:55
static uint32_t pwmv2_get_counter_working_status(PWMV2_Type *pwm_x, pwm_counter_t counter_index)
Get counter work status.
Definition: hpm_pwmv2_drv.h:847
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.
Definition: hpm_pwmv2_drv.h:1587
static void pwmv2_conuter_select_dac_index(PWMV2_Type *pwm_x, pwm_counter_t counter, pwm_dac_channel_t dac_index)
Select dac index.
Definition: hpm_pwmv2_drv.h:1380
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.
Definition: hpm_pwmv2_drv.h:1414
static void pwmv2_disable_software_force(PWMV2_Type *pwm_x, pwm_channel_t chn)
Disable software forced output.
Definition: hpm_pwmv2_drv.h:726
static void pwmv2_disable_four_cmp(PWMV2_Type *pwm_x, pwm_channel_t chn)
disable four pwm outputs
Definition: hpm_pwmv2_drv.h:381
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.
Definition: hpm_pwmv2_drv.h:929
pwm_force_trigger_t
Definition: hpm_pwmv2_drv.h:109
static uint32_t pwmv2_get_fault_irq_status(PWMV2_Type *pwm_x)
Get fault irq status.
Definition: hpm_pwmv2_drv.h:1095
static void pwmv2_disable_capture_nededge_irq(PWMV2_Type *pwm_x, pwm_channel_t channel_index)
disable capture nedege irq
Definition: hpm_pwmv2_drv.h:1216
static void pwmv2_counter_update_trig1(PWMV2_Type *pwm_x, pwm_counter_t counter, uint8_t trig_index)
Select counter update by trigmux1.
Definition: hpm_pwmv2_drv.h:1495
static void pwmv2_calculate_set_up_limit_parameter(PWMV2_Type *pwm_x, uint8_t cal_index, uint8_t value)
Set calculate up limit parameter.
Definition: hpm_pwmv2_drv.h:1688
pwm_shadow_register_output_polarity_t
Definition: hpm_pwmv2_drv.h:97
static void pwmv2_disable_output_invert(PWMV2_Type *pwm_x, pwm_channel_t chn)
Disable pwm output invert.
Definition: hpm_pwmv2_drv.h:471
static void pwmv2_reset_counter(PWMV2_Type *pwm_x, pwm_counter_t counter)
Reset pwm counter.
Definition: hpm_pwmv2_drv.h:1654
static void pwmv2_disable_debug_mode(PWMV2_Type *pwm_x)
Disable debug mode.
Definition: hpm_pwmv2_drv.h:804
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.
Definition: hpm_pwmv2_drv.h:668
static void pwmv2_enable_multi_counter_sync(PWMV2_Type *pwm_x, uint8_t mask)
Multiple counters are enabled at the same time.
Definition: hpm_pwmv2_drv.h:296
pwm_capture_input_select_t
Definition: hpm_pwmv2_drv.h:142
static void pwmv2_disable_shadow_lock_feature(PWMV2_Type *pwm_x)
Do not use the shadow register function.
Definition: hpm_pwmv2_drv.h:835
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.
Definition: hpm_pwmv2_drv.h:344
static void pwmv2_set_fault_mode(PWMV2_Type *pwm_x, pwm_channel_t chn, pwm_fault_mode_t mode)
set the fault mode
Definition: hpm_pwmv2_drv.h:541
static void pwmv2_disable_force_by_software(PWMV2_Type *pwm_x, pwm_channel_t chn)
Disable force mode triggered by software.
Definition: hpm_pwmv2_drv.h:586
static void pwmv2_calculate_disable_low_limit(PWMV2_Type *pwm_x, uint8_t cal_index)
disable low limit
Definition: hpm_pwmv2_drv.h:1828
static void pwmv2_calculate_disable_up_limit(PWMV2_Type *pwm_x, uint8_t cal_index)
disable calculate up limit
Definition: hpm_pwmv2_drv.h:1770
static uint32_t pwmv2_get_capture_posedge_irq_status(PWMV2_Type *pwm_x)
Get capture posedge irq status.
Definition: hpm_pwmv2_drv.h:1051
static void pwmv2_cmp_select_counter(PWMV2_Type *pwm_x, uint8_t cmp_index, pwm_counter_t counter_index)
Select cmp use counter.
Definition: hpm_pwmv2_drv.h:1877
struct pwmv2_config pwmv2_config_t
pwm config data
static void pwmv2_enable_fault_from_pad(PWMV2_Type *pwm_x, pwm_channel_t chn)
Enable the fault signal from the pin.
Definition: hpm_pwmv2_drv.h:416
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
Definition: hpm_pwmv2_drv.h:1296
static uint32_t pwmv2_get_force_work_out_polarity_status(PWMV2_Type *pwm_x)
Get the status of the output polarity.
Definition: hpm_pwmv2_drv.h:881
static uint32_t pwmv2_get_capture_negedge_value(PWMV2_Type *pwm_x, pwm_channel_t chn)
get capture negedge value
Definition: hpm_pwmv2_drv.h:955
static void pwmv2_counter_set_dac_data_parameter(PWMV2_Type *pwm_x, pwm_counter_t counter, uint8_t dac_parameter)
Set dac data parameter.
Definition: hpm_pwmv2_drv.h:1368
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
Definition: hpm_pwmv2_drv.h:285
static void pwmv2_disable_capture_posedge_irq(PWMV2_Type *pwm_x, pwm_channel_t channel_index)
disable capture posedge irq
Definition: hpm_pwmv2_drv.h:1194
static void pwmv2_counter_enable_update_trig0(PWMV2_Type *pwm_x, pwm_counter_t counter)
Enable counter update by trigmux0.
Definition: hpm_pwmv2_drv.h:1552
static void pwmv2_counter_disable_update_trig0(PWMV2_Type *pwm_x, pwm_counter_t counter)
Disable counter update by trigmux0.
Definition: hpm_pwmv2_drv.h:1563
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.
Definition: hpm_pwmv2_drv.h:1344
static void pwmv2_select_cmp_trigmux(PWMV2_Type *pwm_x, uint8_t cmp_index, uint8_t trig_index)
Select cmp trigmux index.
Definition: hpm_pwmv2_drv.h:1840
pwm_dma_chn_t
Definition: hpm_pwmv2_drv.h:147
static void pwmv2_set_dead_area(PWMV2_Type *pwm_x, pwm_channel_t chn, uint32_t dead)
set pwm dead area
Definition: hpm_pwmv2_drv.h:692
static void pwmv2_enable_burstend_irq(PWMV2_Type *pwm_x, pwm_counter_t counter_index)
enable burstend irq
Definition: hpm_pwmv2_drv.h:1249
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.
Definition: hpm_pwmv2_drv.h:656
static void pwmv2_counter_start_trigger_enable(PWMV2_Type *pwm_x, pwm_counter_t counter)
Enable trigmux to trigger counter initiation.
Definition: hpm_pwmv2_drv.h:1598
static uint32_t pwmv2_get_cmp_working_status(PWMV2_Type *pwm_x, uint8_t cmp_index)
Get cmp work status.
Definition: hpm_pwmv2_drv.h:859
static void pwmv2_enable_four_cmp(PWMV2_Type *pwm_x, pwm_channel_t chn)
enable four pwm outputs
Definition: hpm_pwmv2_drv.h:370
static void pwmv2_enable_reload_irq(PWMV2_Type *pwm_x, pwm_counter_t counter_index)
enable reload irq
Definition: hpm_pwmv2_drv.h:1161
static void pwmv2_disable_pair_mode(PWMV2_Type *pwm_x, pwm_channel_t chn)
Disable pwm complementary mode.
Definition: hpm_pwmv2_drv.h:608
static void pwmv2_disable_software_dac_mode(PWMV2_Type *pwm_x, pwm_dac_channel_t dac_index)
Disable the software dac mode.
Definition: hpm_pwmv2_drv.h:783
static void pwmv2_issue_shadow_register_lock_event(PWMV2_Type *pwm_x)
issue all shawdow register
Definition: hpm_pwmv2_drv.h:263
static void pwmv2_enable_software_force(PWMV2_Type *pwm_x, pwm_channel_t chn)
Enable software forced output.
Definition: hpm_pwmv2_drv.h:715
static void pwmv2_counter_start_trigger_disable(PWMV2_Type *pwm_x, pwm_counter_t counter)
Disable trigmux to trigger counter initiation.
Definition: hpm_pwmv2_drv.h:1609
static void pwmv2_clear_capture_posedge_irq_status(PWMV2_Type *pwm_x, uint32_t mask)
Clear capture posedge irq status.
Definition: hpm_pwmv2_drv.h:1062
static uint32_t pwmv2_get_irq_status_all(PWMV2_Type *pwm_x)
Get all interrupt status.
Definition: hpm_pwmv2_drv.h:966
static void pwmv2_force_output(PWMV2_Type *pwm_x, pwm_channel_t chn, pwm_force_mode_t mode, bool invert)
force pwm output
Definition: hpm_pwmv2_drv.h:357
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.
Definition: hpm_pwmv2_drv.h:644
pwm_force_shadow_trigger_t
Definition: hpm_pwmv2_drv.h:102
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.
Definition: hpm_pwmv2_drv.h:330
static uint32_t pwmv2_get_reload_irq_status(PWMV2_Type *pwm_x)
Get reload irq status.
Definition: hpm_pwmv2_drv.h:1029
pwm_logic_four_cmp_cfg_t
Definition: hpm_pwmv2_drv.h:117
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.
Definition: hpm_pwmv2_drv.h:1461
static void pwmv2_set_counter_burst(PWMV2_Type *pwm_x, pwm_counter_t counter, uint16_t burst)
Set counter burst value.
Definition: hpm_pwmv2_drv.h:1621
static void pwmv2_enable_capture_nededge_irq(PWMV2_Type *pwm_x, pwm_channel_t channel_index)
enable capture nedege irq
Definition: hpm_pwmv2_drv.h:1205
static void pwmv2_start_pwm_output(PWMV2_Type *pwm_x, pwm_counter_t counter)
start pwm output
Definition: hpm_pwmv2_drv.h:1643
static void pwmv2_fault_signal_polarity(PWMV2_Type *pwm_x, pwm_channel_t chn, pwm_fault_pad_polarity_t polarity)
Configure the polarity of the fail signal.
Definition: hpm_pwmv2_drv.h:405
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.
Definition: hpm_pwmv2_drv.c:102
static void pwmv2_calculate_set_period_parameter(PWMV2_Type *pwm_x, uint8_t cal_index, uint8_t value)
Set calculate period parameter.
Definition: hpm_pwmv2_drv.h:1712
struct pwmv2_async_fault_source_config pwmv2_async_fault_source_config_t
pwm fault source config
static void pwmv2_channel_disable_output(PWMV2_Type *pwm_x, pwm_channel_t chn)
Disable pwm output.
Definition: hpm_pwmv2_drv.h:517
static void pwmv2_disable_fault_from_trigmux(PWMV2_Type *pwm_x, pwm_channel_t chn)
Disable the fault signal from the trigmux.
Definition: hpm_pwmv2_drv.h:449
static void pwmv2_calculate_set_dac_value_parameter(PWMV2_Type *pwm_x, uint8_t cal_index, uint8_t value)
Set calculate dac value parameter.
Definition: hpm_pwmv2_drv.h:1724
static void pwmv2_enable_shadow_lock_feature(PWMV2_Type *pwm_x)
Using the Shadow Register Function.
Definition: hpm_pwmv2_drv.h:825
static void pwmv2_counter_enable_update_trig1(PWMV2_Type *pwm_x, pwm_counter_t counter)
Enable counter update by trigmux1.
Definition: hpm_pwmv2_drv.h:1506
static void pwmv2_calculate_select_in_offset(PWMV2_Type *pwm_x, uint8_t cal_index, uint8_t shadow_index)
Select offset from shadow index.
Definition: hpm_pwmv2_drv.h:1806
static void pwmv2_clear_capture_negedge_irq_status(PWMV2_Type *pwm_x, uint32_t mask)
Clear capture negedge irq status.
Definition: hpm_pwmv2_drv.h:1084
static void pwmv2_counter_low_limit_enable(PWMV2_Type *pwm_x, pwm_counter_t counter)
Enable the lower limit of the calculation unit.
Definition: hpm_pwmv2_drv.h:1425
static void pwmv2_calculate_enable_up_limit(PWMV2_Type *pwm_x, uint8_t cal_index)
enable calculate up limit
Definition: hpm_pwmv2_drv.h:1759
static void pwmv2_disable_reload_irq(PWMV2_Type *pwm_x, pwm_counter_t counter_index)
disable reload irq
Definition: hpm_pwmv2_drv.h:1172
static void pwmv2_disable_cmp_irq(PWMV2_Type *pwm_x, uint8_t cmp_index)
disable cmp irq
Definition: hpm_pwmv2_drv.h:1150
static void pwmv2_counter_up_limit_disable(PWMV2_Type *pwm_x, pwm_counter_t counter)
Disable the upper limit of the calculation unit.
Definition: hpm_pwmv2_drv.h:1402
static void pwmv2_clear_fault_irq_status(PWMV2_Type *pwm_x, uint32_t mask)
Clear fault irq status.
Definition: hpm_pwmv2_drv.h:1106
static void pwmv2_clear_reload_irq_status(PWMV2_Type *pwm_x, uint32_t mask)
Clear reload irq status.
Definition: hpm_pwmv2_drv.h:1040
pwm_reload_update_time_t
Definition: hpm_pwmv2_drv.h:67
static void pwmv2_fault_signal_select_from_pad(PWMV2_Type *pwm_x, pwm_channel_t chn, uint8_t pad_index)
Direct selection of the fail signal from the pin.
Definition: hpm_pwmv2_drv.h:393
static void pwmv2_counter_up_limit_enable(PWMV2_Type *pwm_x, pwm_counter_t counter)
Enable the upper limit of the calculation unit.
Definition: hpm_pwmv2_drv.h:1391
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
Definition: hpm_pwmv2_drv.h:1332
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.
Definition: hpm_pwmv2_drv.h:1794
static void pwmv2_enable_counter(PWMV2_Type *pwm_x, pwm_counter_t counter)
Enable pwm counter.
Definition: hpm_pwmv2_drv.h:1665
static void pwmv2_enable_fault_irq(PWMV2_Type *pwm_x, pwm_channel_t channel_index)
enable fault irq
Definition: hpm_pwmv2_drv.h:1227
pwm_force_mode_t
pwm output type
Definition: hpm_pwmv2_drv.h:79
pwm_fault_mode_t
Definition: hpm_pwmv2_drv.h:86
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
Definition: hpm_pwmv2_drv.h:1272
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
Definition: hpm_pwmv2_drv.c:116
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.
Definition: hpm_pwmv2_drv.h:632
static void pwmv2_enable_debug_mode(PWMV2_Type *pwm_x)
Enable debug mode.
Definition: hpm_pwmv2_drv.h:793
static void pwmv2_counter_disable_reload_by_trig(PWMV2_Type *pwm_x, pwm_counter_t counter)
disable counter reload by trigmux
Definition: hpm_pwmv2_drv.h:1483
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.
Definition: hpm_pwmv2_drv.h:1782
static void pwmv2_disable_counter(PWMV2_Type *pwm_x, pwm_counter_t counter)
Disable pwm counter.
Definition: hpm_pwmv2_drv.h:1676
struct pwmv2_pair_config pwmv2_pair_config_t
pair pwm config
static void pwmv2_counter_enable_reload_by_trig(PWMV2_Type *pwm_x, pwm_counter_t counter)
enable counter reload by trigmux
Definition: hpm_pwmv2_drv.h:1472
static void pwmv2_counter_update_trig0(PWMV2_Type *pwm_x, pwm_counter_t counter, uint8_t trig_index)
Select counter update by trigmux0.
Definition: hpm_pwmv2_drv.h:1541
pwm_fault_recovery_trigger_t
select when to recover PWM output after fault
Definition: hpm_pwmv2_drv.h:128
pwm_fault_pad_polarity_t
Definition: hpm_pwmv2_drv.h:92
struct pwmv2_cmp_calculate_cfg pwmv2_cmp_calculate_cfg_t
static void pwmv2_clear_fault_event(PWMV2_Type *pwm_x, pwm_channel_t chn)
Clear fault event.
Definition: hpm_pwmv2_drv.h:815
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.
Definition: hpm_pwmv2_drv.h:680
static void pwmv2_calculate_set_low_limit_parameter(PWMV2_Type *pwm_x, uint8_t cal_index, uint8_t value)
Set calculate low limit parameter.
Definition: hpm_pwmv2_drv.h:1700
static void pwmv2_disable_fault_irq(PWMV2_Type *pwm_x, pwm_channel_t channel_index)
disable fault irq
Definition: hpm_pwmv2_drv.h:1238
#define PWM_UNLOCK_KEY
Definition: hpm_pwmv2_drv.h:23
pwm_cmp_shadow_register_update_trigger_t
Definition: hpm_pwmv2_drv.h:154
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.
Definition: hpm_pwmv2_drv.h:1356
static void pwmv2_calculate_select_in_value(PWMV2_Type *pwm_x, uint8_t cal_index, uint8_t index)
Select calculate input value.
Definition: hpm_pwmv2_drv.h:1748
static void pwmv2_clear_calculate_overflow_irq_status(PWMV2_Type *pwm_x)
clear calculate overflow irq status
Definition: hpm_pwmv2_drv.h:976
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.
Definition: hpm_pwmv2_drv.h:1736
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.
Definition: hpm_pwmv2_drv.h:483
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.
Definition: hpm_pwmv2_drv.h:529
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
Definition: hpm_pwmv2_drv.c:71
@ pwm_counter_1
Definition: hpm_pwmv2_drv.h:50
@ pwm_counter_0
Definition: hpm_pwmv2_drv.h:49
@ pwm_counter_2
Definition: hpm_pwmv2_drv.h:51
@ pwm_counter_3
Definition: hpm_pwmv2_drv.h:52
@ cmp_value_fffff000
Definition: hpm_pwmv2_drv.h:169
@ cmp_value_ffffff00
Definition: hpm_pwmv2_drv.h:170
@ cmp_value_from_calculate
Definition: hpm_pwmv2_drv.h:166
@ cmp_value_from_capture_posedge
Definition: hpm_pwmv2_drv.h:167
@ cmp_value_from_counters
Definition: hpm_pwmv2_drv.h:168
@ cmp_value_from_shadow_val
Definition: hpm_pwmv2_drv.h:165
@ pwm_dac_channel_2
Definition: hpm_pwmv2_drv.h:138
@ pwm_dac_channel_1
Definition: hpm_pwmv2_drv.h:137
@ pwm_dac_channel_3
Definition: hpm_pwmv2_drv.h:139
@ pwm_dac_channel_0
Definition: hpm_pwmv2_drv.h:136
@ pwm_channel_2
Definition: hpm_pwmv2_drv.h:58
@ pwm_channel_7
Definition: hpm_pwmv2_drv.h:63
@ pwm_channel_1
Definition: hpm_pwmv2_drv.h:57
@ pwm_channel_4
Definition: hpm_pwmv2_drv.h:60
@ pwm_channel_6
Definition: hpm_pwmv2_drv.h:62
@ pwm_channel_5
Definition: hpm_pwmv2_drv.h:61
@ pwm_channel_3
Definition: hpm_pwmv2_drv.h:59
@ pwm_channel_0
Definition: hpm_pwmv2_drv.h:56
@ pwm_force_at_trigmux
Definition: hpm_pwmv2_drv.h:112
@ pwm_force_none
Definition: hpm_pwmv2_drv.h:113
@ pwm_force_immediately
Definition: hpm_pwmv2_drv.h:110
@ pwm_force_at_reload
Definition: hpm_pwmv2_drv.h:111
@ pwm_shadow_register_output_polarity_on_reload
Definition: hpm_pwmv2_drv.h:99
@ pwm_shadow_register_output_polarity_on_shlk
Definition: hpm_pwmv2_drv.h:98
@ pwm_capture_from_trigmux
Definition: hpm_pwmv2_drv.h:143
@ pwm_capture_from_gpio
Definition: hpm_pwmv2_drv.h:144
@ pwm_dma_0
Definition: hpm_pwmv2_drv.h:148
@ pwm_dma_1
Definition: hpm_pwmv2_drv.h:149
@ pwm_dma_2
Definition: hpm_pwmv2_drv.h:150
@ pwm_dma_3
Definition: hpm_pwmv2_drv.h:151
@ pwm_force_update_shadow_at_reload
Definition: hpm_pwmv2_drv.h:105
@ pwm_force_update_shadow_immediately
Definition: hpm_pwmv2_drv.h:103
@ pwm_force_update_shadow_at_cmp_point
Definition: hpm_pwmv2_drv.h:104
@ pwm_force_update_shadow_none
Definition: hpm_pwmv2_drv.h:106
@ pwm_logic_four_cmp_xor
Definition: hpm_pwmv2_drv.h:120
@ pwm_logic_four_cmp_or
Definition: hpm_pwmv2_drv.h:118
@ pwm_logic_four_cmp_and
Definition: hpm_pwmv2_drv.h:119
@ pwm_logic_four_cmp_cd
Definition: hpm_pwmv2_drv.h:121
@ pwm_reload_update_on_reload
Definition: hpm_pwmv2_drv.h:70
@ pwm_reload_update_on_compare_point
Definition: hpm_pwmv2_drv.h:69
@ pwm_reload_update_on_trigger
Definition: hpm_pwmv2_drv.h:71
@ pwm_reload_update_on_shlk
Definition: hpm_pwmv2_drv.h:68
@ pwm_force_output_no_force
Definition: hpm_pwmv2_drv.h:83
@ pwm_force_output_1
Definition: hpm_pwmv2_drv.h:81
@ pwm_force_output_high_z
Definition: hpm_pwmv2_drv.h:82
@ pwm_force_output_0
Definition: hpm_pwmv2_drv.h:80
@ pwm_fault_output_high_z
Definition: hpm_pwmv2_drv.h:89
@ pwm_fault_output_0
Definition: hpm_pwmv2_drv.h:87
@ pwm_fault_output_1
Definition: hpm_pwmv2_drv.h:88
@ pwm_fault_recovery_on_hw_event
Definition: hpm_pwmv2_drv.h:131
@ pwm_fault_recovery_on_fault_clear
Definition: hpm_pwmv2_drv.h:132
@ pwm_fault_recovery_immediately
Definition: hpm_pwmv2_drv.h:129
@ pwm_fault_recovery_on_reload
Definition: hpm_pwmv2_drv.h:130
@ pad_fault_active_high
Definition: hpm_pwmv2_drv.h:94
@ pad_fault_active_low
Definition: hpm_pwmv2_drv.h:93
@ pwm_shadow_register_update_on_trigmux
Definition: hpm_pwmv2_drv.h:158
@ pwm_shadow_register_update_on_shlk
Definition: hpm_pwmv2_drv.h:155
@ pwm_shadow_register_update_on_rld_cmp_select1
Definition: hpm_pwmv2_drv.h:160
@ pwm_shadow_register_update_on_reload
Definition: hpm_pwmv2_drv.h:157
@ pwm_shadow_register_update_on_modify
Definition: hpm_pwmv2_drv.h:156
@ pwm_shadow_register_update_on_none
Definition: hpm_pwmv2_drv.h:161
@ pwm_shadow_register_update_on_rld_cmp_select0
Definition: hpm_pwmv2_drv.h:159
#define PWMV2_CNT_CFG2_CNT_RELOAD_TRIG_SET(x)
Definition: hpm_pwmv2_regs.h:1030
#define PWMV2_GLB_CTRL2_DAC_SW_MODE_SET(x)
Definition: hpm_pwmv2_regs.h:469
#define PWMV2_CNT_CFG3_CNT_HW_START_EN_MASK
Definition: hpm_pwmv2_regs.h:1109
#define PWMV2_CNT_CFG1_CNT_LU_EN_MASK
Definition: hpm_pwmv2_regs.h:967
#define PWMV2_IRQ_STS_CMP_IRQ_STS_CMP_GET(x)
Definition: hpm_pwmv2_regs.h:691
#define PWMV2_FORCE_WORK_OUT_POLARITY_GET(x)
Definition: hpm_pwmv2_regs.h:532
#define PWMV2_CNT_CFG0_CNT_D_PARAM_MASK
Definition: hpm_pwmv2_regs.h:946
#define PWMV2_CAL_CFG1_CAL_LIM_UP_MASK
Definition: hpm_pwmv2_regs.h:1237
#define PWMV2_CAPTURE_POS_CAPTURE_SELGPIO_SET(x)
Definition: hpm_pwmv2_regs.h:583
#define PWMV2_CNT_CFG3_CNT_START_SEL_MASK
Definition: hpm_pwmv2_regs.h:1099
#define PWMV2_IRQ_EN_CAP_POS_IRQ_EN_CAP_POS_SET(x)
Definition: hpm_pwmv2_regs.h:778
#define PWMV2_PWM_CFG0_POL_UPDATE_SEL_SET(x)
Definition: hpm_pwmv2_regs.h:225
#define PWMV2_IRQ_STS_BURSTEND_IRQ_STS_BURSTEND_SET(x)
Definition: hpm_pwmv2_regs.h:745
#define PWMV2_IRQ_STS_IRQ_CAL_OVERFLOW_MASK
Definition: hpm_pwmv2_regs.h:612
#define PWMV2_CAL_CFG1_CAL_IN_INDEX_SET(x)
Definition: hpm_pwmv2_regs.h:1219
#define PWMV2_CNT_CFG1_CNT_IN_OFF_SET(x)
Definition: hpm_pwmv2_regs.h:1009
#define PWMV2_PWM_CFG0_TRIG_SEL4_MASK
Definition: hpm_pwmv2_regs.h:171
#define PWMV2_CMP_VAL_WORK_VALUE_GET(x)
Definition: hpm_pwmv2_regs.h:522
#define PWMV2_PWM_CFG1_PAIR_MODE_MASK
Definition: hpm_pwmv2_regs.h:321
#define PWMV2_CMP_CFG_CMP_CNT_MASK
Definition: hpm_pwmv2_regs.h:1322
#define PWMV2_GLB_CTRL_HR_PWM_EN_MASK
Definition: hpm_pwmv2_regs.h:446
#define PWMV2_FORCE_MODE_FORCE_MODE_SET(x)
Definition: hpm_pwmv2_regs.h:144
#define PWMV2_CNT_CFG2_CNT_UPDATE_TRIG0_MASK
Definition: hpm_pwmv2_regs.h:1068
#define PWMV2_DMA_EN_DMA0_SEL_SET(x)
Definition: hpm_pwmv2_regs.h:892
#define PWMV2_GLB_CTRL2_DEBUG_IN_EN_MASK
Definition: hpm_pwmv2_regs.h:477
#define PWMV2_CAL_CFG0_CAL_LU_PARAM_MASK
Definition: hpm_pwmv2_regs.h:1166
#define PWMV2_SHADOW_VAL_VALUE_SET(x)
Definition: hpm_pwmv2_regs.h:117
#define PWMV2_IRQ_EN_FAULT_IRQ_EN_FAULT_SET(x)
Definition: hpm_pwmv2_regs.h:800
#define PWMV2_IRQ_STS_FAULT_IRQ_STS_FAULT_SET(x)
Definition: hpm_pwmv2_regs.h:734
#define PWMV2_GLB_CTRL2_FAULT_CLEAR_SET(x)
Definition: hpm_pwmv2_regs.h:491
#define PWMV2_CAPTURE_POS_CNT_INDEX_SET(x)
Definition: hpm_pwmv2_regs.h:593
#define PWMV2_PWM_CFG1_FAULT_REC_SEL_MASK
Definition: hpm_pwmv2_regs.h:390
#define PWMV2_PWM_CFG1_FORCE_TIME_MASK
Definition: hpm_pwmv2_regs.h:350
#define PWMV2_IRQ_STS_CAP_POS_IRQ_STS_CAP_POS_GET(x)
Definition: hpm_pwmv2_regs.h:713
#define PWMV2_CAPTURE_POS_CAPTURE_SELGPIO_MASK
Definition: hpm_pwmv2_regs.h:581
#define PWMV2_CNT_CFG3_CNT_BURST_MASK
Definition: hpm_pwmv2_regs.h:1122
#define PWMV2_CAL_CFG0_CAL_T_PARAM_MASK
Definition: hpm_pwmv2_regs.h:1186
#define PWMV2_WORK_CTRL1_SHADOW_LOCK_MASK
Definition: hpm_pwmv2_regs.h:154
#define PWMV2_CNT_CFG1_CNT_LIM_LO_SET(x)
Definition: hpm_pwmv2_regs.h:999
#define PWMV2_PWM_CFG1_FORCE_UPDATE_TIME_SET(x)
Definition: hpm_pwmv2_regs.h:274
#define PWMV2_CNT_CFG0_RLD_UPDATE_TIME_MASK
Definition: hpm_pwmv2_regs.h:936
#define PWMV2_IRQ_STS_RELOAD_IRQ_STS_RELOAD_SET(x)
Definition: hpm_pwmv2_regs.h:701
#define PWMV2_CAL_CFG1_CAL_LL_EN_MASK
Definition: hpm_pwmv2_regs.h:1247
#define PWMV2_IRQ_STS_BURSTEND_IRQ_STS_BURSTEND_GET(x)
Definition: hpm_pwmv2_regs.h:746
#define PWMV2_CAPTURE_POS_CNT_INDEX_MASK
Definition: hpm_pwmv2_regs.h:591
#define PWMV2_CMP_CFG_CMP_IN_SEL_SET(x)
Definition: hpm_pwmv2_regs.h:1313
#define PWMV2_CNT_CFG2_CNT_TRIG0_MASK
Definition: hpm_pwmv2_regs.h:1088
#define PWMV2_CNT_CFG1_CNT_IN_OFF_MASK
Definition: hpm_pwmv2_regs.h:1007
#define PWMV2_CAL_CFG1_CAL_LIM_LO_MASK
Definition: hpm_pwmv2_regs.h:1257
#define PWMV2_PWM_CFG1_FAULT_REC_TIME_SET(x)
Definition: hpm_pwmv2_regs.h:299
#define PWMV2_PWM_CFG1_FORCE_TRIG_SEL_MASK
Definition: hpm_pwmv2_regs.h:360
#define PWMV2_PWM_CFG0_FAULT_EN_SYNC_MASK
Definition: hpm_pwmv2_regs.h:211
#define PWMV2_FORCE_MODE_POLARITY_SET(x)
Definition: hpm_pwmv2_regs.h:129
#define PWMV2_PWM_CFG1_FORCE_TIME_SET(x)
Definition: hpm_pwmv2_regs.h:352
#define PWMV2_CMP_CFG_CMP_CNT_SET(x)
Definition: hpm_pwmv2_regs.h:1324
#define PWMV2_PWM_CFG0_POLARITY_OPT0_MASK
Definition: hpm_pwmv2_regs.h:245
#define PWMV2_CMP_CFG_CMP_TRIG_SEL_SET(x)
Definition: hpm_pwmv2_regs.h:1280
#define PWMV2_CNT_CFG2_CNT_RELOAD_EN_MASK
Definition: hpm_pwmv2_regs.h:1018
#define PWMV2_PWM_CFG1_PWM_FORCE_SEL_MASK
Definition: hpm_pwmv2_regs.h:380
#define PWMV2_PWM_CFG0_OUT_POLARITY_MASK
Definition: hpm_pwmv2_regs.h:235
#define PWMV2_CNT_CFG2_CNT_TRIG1_MASK
Definition: hpm_pwmv2_regs.h:1058
#define PWMV2_IRQ_STS_CAP_POS_IRQ_STS_CAP_POS_SET(x)
Definition: hpm_pwmv2_regs.h:712
#define PWMV2_CAL_CFG1_CAL_T_INDEX_MASK
Definition: hpm_pwmv2_regs.h:1207
#define PWMV2_CNT_CFG2_CNT_UPDATE_EN0_MASK
Definition: hpm_pwmv2_regs.h:1078
#define PWMV2_DMA_EN_DMA0_SEL_MASK
Definition: hpm_pwmv2_regs.h:890
#define PWMV2_IRQ_EN_CMP_IRQ_EN_CMP_SET(x)
Definition: hpm_pwmv2_regs.h:756
#define PWMV2_IRQ_STS_CAP_NEG_IRQ_STS_CAP_NEG_GET(x)
Definition: hpm_pwmv2_regs.h:724
#define PWMV2_PWM_CFG0_FAULT_POL_ASYNC_SET(x)
Definition: hpm_pwmv2_regs.h:193
#define PWMV2_CMP_CFG_CMP_IN_SEL_MASK
Definition: hpm_pwmv2_regs.h:1311
#define PWMV2_CNT_CFG1_CNT_DAC_INDEX_SET(x)
Definition: hpm_pwmv2_regs.h:959
#define PWMV2_CNT_GLBCFG_TIMER_RESET_SET(x)
Definition: hpm_pwmv2_regs.h:1146
#define PWMV2_CMP_CFG_CMP_TRIG_SEL_MASK
Definition: hpm_pwmv2_regs.h:1278
#define PWMV2_PWM_CFG1_FAULT_MODE_SET(x)
Definition: hpm_pwmv2_regs.h:286
#define PWMV2_CAL_CFG1_CAL_IN_INDEX_MASK
Definition: hpm_pwmv2_regs.h:1217
#define PWMV2_PWM_CFG1_FAULT_REC_SEL_SET(x)
Definition: hpm_pwmv2_regs.h:392
#define PWMV2_PWM_CFG1_FORCE_TRIG_SEL_SET(x)
Definition: hpm_pwmv2_regs.h:362
#define PWMV2_PWM_CFG1_FORCE_ACT_SEL_MASK
Definition: hpm_pwmv2_regs.h:370
#define PWMV2_GLB_CTRL2_FAULT_CLEAR_MASK
Definition: hpm_pwmv2_regs.h:489
#define PWMV2_CAL_CFG0_CAL_LU_PARAM_SET(x)
Definition: hpm_pwmv2_regs.h:1168
#define PWMV2_CNT_GLBCFG_TIMER_ENABLE_SET(x)
Definition: hpm_pwmv2_regs.h:1157
#define PWMV2_CNT_CFG3_CNT_BURST_SET(x)
Definition: hpm_pwmv2_regs.h:1124
#define PWMV2_GLB_CTRL_OUTPUT_DELAY_SET(x)
Definition: hpm_pwmv2_regs.h:438
#define PWMV2_IRQ_STS_CMP_IRQ_STS_CMP_SET(x)
Definition: hpm_pwmv2_regs.h:690
#define PWMV2_IRQ_EN_RELOAD_IRQ_EN_RELOAD_SET(x)
Definition: hpm_pwmv2_regs.h:767
#define PWMV2_CNT_CFG0_RLD_CMP_SEL0_SET(x)
Definition: hpm_pwmv2_regs.h:913
#define PWMV2_TRIGGER_CFG_TRIGGER_OUT_SEL_MASK
Definition: hpm_pwmv2_regs.h:415
#define PWMV2_GLB_CTRL2_SHADOW_LOCK_EN_MASK
Definition: hpm_pwmv2_regs.h:499
#define PWMV2_PWM_CFG1_PWM_LOGIC_MASK
Definition: hpm_pwmv2_regs.h:335
#define PWMV2_CAL_CFG1_CAL_LU_EN_MASK
Definition: hpm_pwmv2_regs.h:1227
#define PWMV2_CNT_CFG0_CNT_D_PARAM_SET(x)
Definition: hpm_pwmv2_regs.h:948
#define PWMV2_TRIGGER_CFG_TRIGGER_OUT_SEL_SET(x)
Definition: hpm_pwmv2_regs.h:417
#define PWMV2_CNT_CFG1_CNT_LL_EN_MASK
Definition: hpm_pwmv2_regs.h:987
#define PWMV2_CAL_CFG0_CAL_D_PARAM_SET(x)
Definition: hpm_pwmv2_regs.h:1198
#define PWMV2_CAPTURE_NEG_CAPTURE_NEG_GET(x)
Definition: hpm_pwmv2_regs.h:604
#define PWMV2_CNT_CFG1_CNT_DAC_INDEX_MASK
Definition: hpm_pwmv2_regs.h:957
#define PWMV2_CAL_CFG0_CAL_LL_PARAM_SET(x)
Definition: hpm_pwmv2_regs.h:1178
#define PWMV2_CNT_CFG2_CNT_UPDATE_EN1_MASK
Definition: hpm_pwmv2_regs.h:1048
#define PWMV2_CNT_CFG2_CNT_TRIG0_SET(x)
Definition: hpm_pwmv2_regs.h:1090
#define PWMV2_CNT_CFG0_RLD_CMP_SEL1_SET(x)
Definition: hpm_pwmv2_regs.h:903
#define PWMV2_CNT_GLBCFG_CNT_SW_START_SET(x)
Definition: hpm_pwmv2_regs.h:1136
#define PWMV2_CNT_CFG0_RLD_TRIG_SEL_MASK
Definition: hpm_pwmv2_regs.h:921
#define PWMV2_FORCE_WORK_FORCE_MODE_GET(x)
Definition: hpm_pwmv2_regs.h:541
#define PWMV2_DMA_EN_DMA1_SEL_SHIFT
Definition: hpm_pwmv2_regs.h:871
#define PWMV2_PWM_CFG1_HIGHZ_EN_N_MASK
Definition: hpm_pwmv2_regs.h:256
#define PWMV2_CNT_CFG0_RLD_TRIG_SEL_SET(x)
Definition: hpm_pwmv2_regs.h:923
#define PWMV2_CNT_CFG0_RLD_CMP_SEL1_MASK
Definition: hpm_pwmv2_regs.h:901
#define PWMV2_CNT_CFG1_CNT_LIM_UP_MASK
Definition: hpm_pwmv2_regs.h:977
#define PWMV2_PWM_CFG1_PWM_FORCE_SEL_SET(x)
Definition: hpm_pwmv2_regs.h:382
#define PWMV2_IRQ_EN_CAP_NEG_IRQ_EN_CAP_NEG_SET(x)
Definition: hpm_pwmv2_regs.h:789
#define PWMV2_IRQ_STS_RELOAD_IRQ_STS_RELOAD_GET(x)
Definition: hpm_pwmv2_regs.h:702
#define PWMV2_CAL_CFG1_CAL_LIM_LO_SET(x)
Definition: hpm_pwmv2_regs.h:1259
#define PWMV2_CNT_RELOAD_WORK_VALUE_GET(x)
Definition: hpm_pwmv2_regs.h:512
#define PWMV2_IRQ_STS_FAULT_IRQ_STS_FAULT_GET(x)
Definition: hpm_pwmv2_regs.h:735
#define PWMV2_CNT_CFG0_RLD_UPDATE_TIME_SET(x)
Definition: hpm_pwmv2_regs.h:938
#define PWMV2_DAC_VALUE_SV_VALUE_SET(x)
Definition: hpm_pwmv2_regs.h:562
#define PWMV2_CNT_VAL_VALUE_GET(x)
Definition: hpm_pwmv2_regs.h:551
#define PWMV2_PWM_CFG0_FAULT_EN_ASYNC_MASK
Definition: hpm_pwmv2_regs.h:201
#define PWMV2_PWM_CFG0_FAULT_SEL_ASYNC_SET(x)
Definition: hpm_pwmv2_regs.h:183
#define PWMV2_CAL_CFG0_CAL_T_PARAM_SET(x)
Definition: hpm_pwmv2_regs.h:1188
#define PWMV2_CAL_CFG1_CAL_IN_OFF_MASK
Definition: hpm_pwmv2_regs.h:1267
#define PWMV2_IRQ_EN_IRQ_EN_OVERFLOW_MASK
Definition: hpm_pwmv2_regs.h:677
#define PWMV2_PWM_CFG0_FAULT_POL_ASYNC_MASK
Definition: hpm_pwmv2_regs.h:191
#define PWMV2_PWM_CFG1_FORCE_UPDATE_TIME_MASK
Definition: hpm_pwmv2_regs.h:272
#define PWMV2_CAPTURE_POS_CAPTURE_POS_GET(x)
Definition: hpm_pwmv2_regs.h:573
#define PWMV2_CAL_CFG0_CAL_D_PARAM_MASK
Definition: hpm_pwmv2_regs.h:1196
#define PWMV2_IRQ_STS_CAP_NEG_IRQ_STS_CAP_NEG_SET(x)
Definition: hpm_pwmv2_regs.h:723
#define PWMV2_CMP_CFG_CMP_UPDATE_TIME_MASK
Definition: hpm_pwmv2_regs.h:1295
#define PWMV2_CAL_CFG1_CAL_T_INDEX_SET(x)
Definition: hpm_pwmv2_regs.h:1209
#define PWMV2_CAL_CFG1_CAL_IN_OFF_SET(x)
Definition: hpm_pwmv2_regs.h:1269
#define PWMV2_PWM_CFG1_FORCE_ACT_SEL_SET(x)
Definition: hpm_pwmv2_regs.h:372
#define PWMV2_PWM_CFG1_FAULT_MODE_MASK
Definition: hpm_pwmv2_regs.h:284
#define PWMV2_PWM_CFG1_SW_FORCE_EN_MASK
Definition: hpm_pwmv2_regs.h:308
#define PWMV2_CAL_CFG1_CAL_LIM_UP_SET(x)
Definition: hpm_pwmv2_regs.h:1239
#define PWMV2_CMP_CFG_CMP_UPDATE_TIME_SET(x)
Definition: hpm_pwmv2_regs.h:1297
#define PWMV2_PWM_CFG0_FAULT_SEL_ASYNC_MASK
Definition: hpm_pwmv2_regs.h:181
#define PWMV2_PWM_DEAD_AREA_DEAD_AREA_SET(x)
Definition: hpm_pwmv2_regs.h:406
#define PWMV2_CNT_CFG3_CNT_START_SEL_SET(x)
Definition: hpm_pwmv2_regs.h:1101
#define PWMV2_CNT_CFG1_CNT_LIM_UP_SET(x)
Definition: hpm_pwmv2_regs.h:979
#define PWMV2_CNT_CFG2_CNT_UPDATE_TRIG1_MASK
Definition: hpm_pwmv2_regs.h:1038
#define PWMV2_GLB_CTRL_OUTPUT_DELAY_MASK
Definition: hpm_pwmv2_regs.h:436
#define PWMV2_CNT_CFG2_CNT_UPDATE_TRIG1_SET(x)
Definition: hpm_pwmv2_regs.h:1040
#define PWMV2_CNT_CFG2_CNT_RELOAD_TRIG_MASK
Definition: hpm_pwmv2_regs.h:1028
#define PWMV2_PWM_CFG1_FAULT_REC_TIME_MASK
Definition: hpm_pwmv2_regs.h:297
#define PWMV2_CAL_CFG0_CAL_LL_PARAM_MASK
Definition: hpm_pwmv2_regs.h:1176
#define PWMV2_PWM_CFG0_POL_UPDATE_SEL_MASK
Definition: hpm_pwmv2_regs.h:223
#define PWMV2_CNT_CFG2_CNT_UPDATE_TRIG0_SET(x)
Definition: hpm_pwmv2_regs.h:1070
#define PWMV2_CNT_CFG2_CNT_TRIG1_SET(x)
Definition: hpm_pwmv2_regs.h:1060
#define PWMV2_CNT_CFG0_RLD_CMP_SEL0_MASK
Definition: hpm_pwmv2_regs.h:911
#define PWMV2_DMA_EN_DMA0_EN_MASK
Definition: hpm_pwmv2_regs.h:880
#define PWMV2_PWM_CFG1_PWM_LOGIC_SET(x)
Definition: hpm_pwmv2_regs.h:337
#define PWMV2_CNT_CFG1_CNT_LIM_LO_MASK
Definition: hpm_pwmv2_regs.h:997
#define PWMV2_GLB_CTRL_SW_FORCE_SET(x)
Definition: hpm_pwmv2_regs.h:428
#define fencerw()
execute fence rw
Definition: riscv_core.h:94
Definition: hpm_pwmv2_regs.h:12
__RW uint32_t IRQ_EN_CAP_POS
Definition: hpm_pwmv2_regs.h:54
__RW uint32_t GLB_CTRL2
Definition: hpm_pwmv2_regs.h:28
__RW uint32_t WORK_CTRL0
Definition: hpm_pwmv2_regs.h:13
__R uint32_t CAPTURE_NEG[8]
Definition: hpm_pwmv2_regs.h:40
__W uint32_t IRQ_STS_RELOAD
Definition: hpm_pwmv2_regs.h:46
__RW uint32_t IRQ_EN_BURSTEND
Definition: hpm_pwmv2_regs.h:57
__R uint32_t CNT_RELOAD_WORK[4]
Definition: hpm_pwmv2_regs.h:30
__R uint32_t CNT_VAL[4]
Definition: hpm_pwmv2_regs.h:35
__RW uint32_t CFG2
Definition: hpm_pwmv2_regs.h:64
__RW uint32_t DEAD_AREA
Definition: hpm_pwmv2_regs.h:22
__W uint32_t IRQ_STS_FAULT
Definition: hpm_pwmv2_regs.h:49
__RW uint32_t IRQ_EN_CMP
Definition: hpm_pwmv2_regs.h:52
__RW uint32_t CAPTURE_POS[8]
Definition: hpm_pwmv2_regs.h:38
struct PWMV2_Type::@694 CNT[4]
__RW uint32_t TRIGGER_CFG[8]
Definition: hpm_pwmv2_regs.h:25
__W uint32_t IRQ_STS_BURSTEND
Definition: hpm_pwmv2_regs.h:50
__RW uint32_t UNLOCK
Definition: hpm_pwmv2_regs.h:14
__RW uint32_t CFG0
Definition: hpm_pwmv2_regs.h:20
__RW uint32_t SHADOW_VAL[28]
Definition: hpm_pwmv2_regs.h:15
__W uint32_t IRQ_STS_CMP
Definition: hpm_pwmv2_regs.h:45
__RW uint32_t CNT_GLBCFG
Definition: hpm_pwmv2_regs.h:67
__RW uint32_t WORK_CTRL1
Definition: hpm_pwmv2_regs.h:17
__W uint32_t IRQ_STS_CAP_POS
Definition: hpm_pwmv2_regs.h:47
__R uint32_t CMP_VAL_WORK[24]
Definition: hpm_pwmv2_regs.h:31
__RW uint32_t IRQ_EN_RELOAD
Definition: hpm_pwmv2_regs.h:53
__RW uint32_t CFG
Definition: hpm_pwmv2_regs.h:76
__RW uint32_t DMA_EN
Definition: hpm_pwmv2_regs.h:59
struct PWMV2_Type::@693 PWM[8]
__R uint32_t FORCE_WORK
Definition: hpm_pwmv2_regs.h:33
__RW uint32_t IRQ_EN
Definition: hpm_pwmv2_regs.h:43
__RW uint32_t IRQ_STS
Definition: hpm_pwmv2_regs.h:42
__RW uint32_t GLB_CTRL
Definition: hpm_pwmv2_regs.h:27
__RW uint32_t IRQ_EN_CAP_NEG
Definition: hpm_pwmv2_regs.h:55
__RW uint32_t IRQ_EN_FAULT
Definition: hpm_pwmv2_regs.h:56
__RW uint32_t DAC_VALUE_SV[4]
Definition: hpm_pwmv2_regs.h:36
struct PWMV2_Type::@696 CMP[24]
__RW uint32_t CFG1
Definition: hpm_pwmv2_regs.h:21
__RW uint32_t FORCE_MODE
Definition: hpm_pwmv2_regs.h:16
__W uint32_t IRQ_STS_CAP_NEG
Definition: hpm_pwmv2_regs.h:48
__RW uint32_t CFG3
Definition: hpm_pwmv2_regs.h:65
struct PWMV2_Type::@695 CAL[16]
pwm config data
Definition: hpm_pwm_drv.h:175
pair pwm config
Definition: hpm_pwm_drv.h:192
pwm fault source config
Definition: hpm_pwmv2_drv.h:194
uint8_t async_signal_from_pad_index
Definition: hpm_pwmv2_drv.h:195
pwm_fault_pad_polarity_t fault_async_pad_level
Definition: hpm_pwmv2_drv.h:196
Definition: hpm_pwmv2_drv.h:231
uint8_t up_limit_offset_index
Definition: hpm_pwmv2_drv.h:238
uint8_t low_limit_offset_index
Definition: hpm_pwmv2_drv.h:240
int8_t d_param
Definition: hpm_pwmv2_drv.h:236
bool enable_up_limit
Definition: hpm_pwmv2_drv.h:241
int8_t t_param
Definition: hpm_pwmv2_drv.h:235
int8_t up_limit_param
Definition: hpm_pwmv2_drv.h:237
uint8_t counter_index
Definition: hpm_pwmv2_drv.h:232
int8_t low_limit_param
Definition: hpm_pwmv2_drv.h:239
uint8_t in_offset_index
Definition: hpm_pwmv2_drv.h:234
bool enbale_low_limit
Definition: hpm_pwmv2_drv.h:242
uint8_t in_index
Definition: hpm_pwmv2_drv.h:233
pwm compare config
Definition: hpm_pwmv2_drv.h:177
pwm_cmp_shadow_register_update_trigger_t update_trigger
Definition: hpm_pwmv2_drv.h:185
uint32_t cmp
Definition: hpm_pwmv2_drv.h:178
pwm_counter_t cmp_use_counter
Definition: hpm_pwmv2_drv.h:182
bool enable_half_cmp
Definition: hpm_pwmv2_drv.h:179
uint8_t update_trigger_index
Definition: hpm_pwmv2_drv.h:186
uint8_t cmp_source_index
Definition: hpm_pwmv2_drv.h:183
uint8_t mode
Definition: hpm_pwmv2_drv.h:184
uint8_t hrcmp
Definition: hpm_pwmv2_drv.h:187
pwm_cmp_source_t cmp_source
Definition: hpm_pwmv2_drv.h:181
bool enable_hrcmp
Definition: hpm_pwmv2_drv.h:180
pwm config data
Definition: hpm_pwmv2_drv.h:203
pwm_logic_four_cmp_cfg_t logic
Definition: hpm_pwmv2_drv.h:211
uint8_t force_shadow_trigmux_index
Definition: hpm_pwmv2_drv.h:216
bool enable_async_fault
Definition: hpm_pwmv2_drv.h:205
uint8_t force_trigmux_index
Definition: hpm_pwmv2_drv.h:218
bool enable_four_cmp
Definition: hpm_pwmv2_drv.h:208
pwm_force_shadow_trigger_t force_shadow_trigger
Definition: hpm_pwmv2_drv.h:217
pwm_fault_recovery_trigger_t fault_recovery_trigger
Definition: hpm_pwmv2_drv.h:214
uint8_t fault_mode
Definition: hpm_pwmv2_drv.h:213
pwmv2_async_fault_source_config_t async_fault_source
Definition: hpm_pwmv2_drv.h:209
uint32_t dead_zone_in_half_cycle
Definition: hpm_pwmv2_drv.h:220
bool enable_sync_fault
Definition: hpm_pwmv2_drv.h:206
uint8_t fault_recovery_trigmux_index
Definition: hpm_pwmv2_drv.h:215
bool enable_output
Definition: hpm_pwmv2_drv.h:204
pwm_shadow_register_output_polarity_t update_polarity_time
Definition: hpm_pwmv2_drv.h:210
bool invert_output
Definition: hpm_pwmv2_drv.h:207
pwm_force_trigger_t force_trigger
Definition: hpm_pwmv2_drv.h:219
uint8_t update_trigger
Definition: hpm_pwmv2_drv.h:212
pair pwm config
Definition: hpm_pwmv2_drv.h:227
pwmv2_config_t pwm[2]
Definition: hpm_pwmv2_drv.h:228