MC=tm4c1294ncpdt
IDE=keil
In my programme I need to make a particular no of PWM pulses then I have to stop it.For stopping PWM generation I created one Function it is given below
void PWM_Stop(void)
{
pwm_count = 0;
PWMPulseWidthSet (PWM0_BASE, PWM_OUT_0, PWMGenPeriodGet(PWM0_BASE, PWM_OUT_0) *0);
SysCtlDelay ((SysCtlClockGet()/100) );
PWMGenDisable (PWM0_BASE, PWM_GEN_0);/* Deable the PWM generator block.*/
}
The above pgm is a working fine.When ever you need to stop PWM call that function.
According to peripheral library PWMGenDisable() function is enough to stop PWM generation.But when it is not stopping PWM if I wrote it in the fn alone.So in the above pgm i'm making the pulse width in to zero then providing a delay after that I'm calling PWMGenDisable fn.With out that delay sometimes PWM generation is not stopping.I'm not suppose to use any kind of delays in my project.So please tell me a way to stop PWM generation at any time with out a delay?