Hello,
I have programmed 2 PWM signals in CCS and everything is going well in standalone mode,
See below an extract of my main program
void main(void)
{
initSystem();
CLK_enablePwmClock(myClk, PWM_Number_1); // Enable la clock du PWM1
CLK_enablePwmClock(myClk, PWM_Number_2); // Enable la clock du PWM2
initEPWM(myPWM1);
initEPWM(myPWM2);
} // END of MAIN
NOW, I want to control the start&stop of the PWM signals through a toggle-button in IHM ==> I build-up a Gui Composer interface, using the variable "GO" for binding the toggle-button and the program.
Herafter is an extract of my main-program for doing that, but it does not work.
for(;;)
{
Start=*(&GO);
if (*(&Start)!=0)
{
Visu_GO=1;
CLK_enablePwmClock(myClk, PWM_Number_1);
CLK_enablePwmClock(myClk, PWM_Number_2);
initEPWM(myPWM1);
initEPWM(myPWM2);
}
else
{
Visu_GO=0;
CLK_disablePwmClock(myClk, PWM_Number_1);
CLK_disablePwmClock(myClk, PWM_Number_2);
}
}
Does anyone have an example of this kind of basic application ?
Many thanks in advance for your kind support.