AnsweredAssumed Answered

Interrupt on PWM

Question asked by bricesup on May 30, 2017
Latest reply on Jun 13, 2017 by Mario Ignacio Castaneda Lopez

Hello,

 

I want to make an interrupt on my PWM signal i use this function :

vAHI_TimerEnable(E_AHI_TIMER_1,1,FALSE,TRUE,TRUE);

 

and my PWM is this :

vAHI_TimerStartRepeat(E_AHI_TIMER_1,PWM1,20000);

 

With a button I modify the variable PWM but for have a perfect signal I want to modify the PWM signal with the new time of low signal(0 Volt) when the actual signal is at 0 Volt. For that i detect the falling and I use this command :

vAHI_Timer1RegisterCallback(Timer1); 

 

PRIVATE void Timer1(uint32 u32DeviceId, uint32 u32ItemBitmap)
{
         vAHI_TimerStartRepeat(E_AHI_TIMER_1,PWM1,20000); //Repeat the PWM with a new PWM1 value

}

 

I think it's possible but nothing happen when I make that.

 

Thanks for your answers.

Outcomes