AnsweredAssumed Answered

how to initialize PWM2 on pin DO0?

Question asked by dylan ou on Dec 11, 2018
Latest reply on Dec 13, 2018 by Mario Ignacio Castaneda Lopez

Hi, i use the pin DO0 to generate PWM,my code is below,but it does not work.

--project: JN-AN_1217-Zigbee-3-0-Base-Device

--ROUTER

 

PUBLIC void tim2_PWMInit(void)
{
vAHI_TimerSetLocation(E_AHI_TIMER_2,FALSE,TRUE); // PWM2
vAHI_TimerFineGrainDIOControl(1<<4);
vAHI_TimerEnable(E_AHI_TIMER_2,10,FALSE,FALSE,TRUE);
vAHI_TimerConfigureOutputs(E_AHI_TIMER_2,TRUE,TRUE);
vAHI_TimerClockSelect(E_AHI_TIMER_2, FALSE, TRUE);

vAHI_TimerStartRepeat(E_AHI_TIMER_2,1000,1000);
}

Outcomes