定时器2生成PWM波如何广告just the phase?

2 posts / 0 new
Last post
fengmailx
Offline
Last seen:4 years 3 weeks ago
Joined:2014-11-21 03:48
定时器2生成PWM波如何广告just the phase?

I can use Timer2 generate PWM wave , how to adjust the phase?

I need 3-channel PWM waveform generation,I used timer2 ,how can i do it?

// initilalize PWM with the desired settings (sw paused)
timer2_init(HW_CAN_NOT_PAUSE_PWM_2_3_4, PWM_2_3_4_SW_PAUSE_ENABLED, 1000);

// set pwm3 duty cycle
timer2_set_pwm3_duty_cycle(500);//500

// set pwm4 duty cycle
timer2_set_pwm4_duty_cycle(900);//500

Thanks

MH_Dialog (not verified)
Hi there,

Hi there,

DA14580_peripheral_setup.uvprojhas two example codes in timer0_test and timer2_test inside pwm_test.c. which may help you to setup PWM function.

BR, Morris