|
@@ -113,6 +113,9 @@ static void _init_pwm_timer(void) {
|
|
|
timer_channel_output_mode_config(timer,TIMER_CH_2,TIMER_OC_MODE_PWM0);
|
|
timer_channel_output_mode_config(timer,TIMER_CH_2,TIMER_OC_MODE_PWM0);
|
|
|
timer_channel_output_shadow_config(timer,TIMER_CH_2,TIMER_OC_SHADOW_ENABLE);
|
|
timer_channel_output_shadow_config(timer,TIMER_CH_2,TIMER_OC_SHADOW_ENABLE);
|
|
|
|
|
|
|
|
|
|
+ timer_ocintpara.outputstate = TIMER_CCX_ENABLE;
|
|
|
|
|
+ timer_ocintpara.outputnstate = TIMER_CCXN_DISABLE;
|
|
|
|
|
+ timer_ocintpara.ocpolarity = TIMER_OC_POLARITY_HIGH;
|
|
|
|
|
|
|
|
/* chan3 trigger adc O3CPRE is alwary active high, adc trigger is rising */
|
|
/* chan3 trigger adc O3CPRE is alwary active high, adc trigger is rising */
|
|
|
timer_channel_output_config(timer,TIMER_CH_3,&timer_ocintpara);
|
|
timer_channel_output_config(timer,TIMER_CH_3,&timer_ocintpara);
|