AnsweredAssumed Answered

Anveshan 2014: updating values of PWM ADuCM360

Question asked by KoushiK_KopS on Mar 23, 2015
Latest reply on Apr 17, 2015 by MMA

hi,

i m not able to update the PWM dynamically. Every time i have to disable and enable the PWM for the values to get updated. Can u please help me out.

 

This code is not working:

PwmInit(UCLK_2,PWMCON0_PWMIEN_DIS,PWMCON0_SYNC_DIS,PWMCON1_TRIPEN_DIS);

uiTime0 = PwmTime(PWM0_1,2000,150,40);

PwmGo(PWMCON0_ENABLE_EN,PWMCON0_MOD_DIS);

delay(1000);

uiTime0 = PwmTime(PWM0_1,2000,200,40);

delay(10000);

uiTime0 = PwmTime(PWM0_1,2000,400,40);



but this is working:

PwmInit(UCLK_2,PWMCON0_PWMIEN_DIS,PWMCON0_SYNC_DIS,PWMCON1_TRIPEN_DIS);

uiTime0 = PwmTime(PWM0_1,2000,150,40);

PwmGo(PWMCON0_ENABLE_EN,PWMCON0_MOD_DIS);

delay(1000);

PwmGo(PWMCON0_ENABLE_DIS,PWMCON0_MOD_DIS);

uiTime0 = PwmTime(PWM0_1,2000,200,40);

PwmGo(PWMCON0_ENABLE_EN,PWMCON0_MOD_DIS);

 

delay(10000);

PwmGo(PWMCON0_ENABLE_DIS,PWMCON0_MOD_DIS);

uiTime0 = PwmTime(PWM0_1,2000,400,40);

PwmGo(PWMCON0_ENABLE_EN,PWMCON0_MOD_DIS);


Outcomes