cancel
Showing results for 
Search instead for 
Did you mean: 

WICED Smart Bluetooth

ArvindS_76
Employee

Continued from this closed thread: Wiced Sense hardware timer example

> I tested the above piece of code but that didn't work as expected.

Could you please describe what you see?

If you want glitch free PWM transitions, you might want to use pwm_transitionToSubstituteValues() instead of pwm_start in the timer interrupt handler. Other than that and the fact that the timer is too short, this is the right way to use the timer. Have you tried longer timer intervals?

1 Solution
ArvindS_76
Employee

roger_lu

Yes, you are right, pwm_startWithAlternateValues() is glitch free because it first disables the channel, reinitializes the PWM configuration and then enables it. On the other hand, pwm_transitionToSubstituteValues() reconfigures the PWM HW while it is running, so there might be some glitches/incorrect PWM frequency for one cycle.

View solution in original post

0 Likes
3 Replies
Anonymous
Not applicable

Hi arvinds

From the comments in pwm_tones.c in SDK 2.2.0, pwm_transitionToSubstituteValues() is NOT glitch free while pwm_startWithAlternateValues() is glitch free.

Can you make a double check?

thanks.

0 Likes
ArvindS_76
Employee

roger_lu

Yes, you are right, pwm_startWithAlternateValues() is glitch free because it first disables the channel, reinitializes the PWM configuration and then enables it. On the other hand, pwm_transitionToSubstituteValues() reconfigures the PWM HW while it is running, so there might be some glitches/incorrect PWM frequency for one cycle.

View solution in original post

0 Likes
Anonymous
Not applicable

Understood. thanks a lot:-)

0 Likes