XMC4700 Set PWM Frequency while running

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
User13948
Level 2
Level 2
First like received
Hello, I need to keep the XMC PWM synchronized with an external synch signal.
PWM frequency is nominally 16 times the external synch signal, but since it comes from a different clock it has some error.
I would like to PLL the XMC PWM, so I need to update the PWM period from time to time, without stopping it.
DAVE has a PWM_SVM_SetPWMFrequency but it is clearly stated it only works when PMW is stopped.
Is there any particular reason for this?
How can it be done?

Thanks.

Alberto
0 Likes
1 Reply
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

check the section Updating the Period and Duty Cycle in the CCU4 and CCU8 chapters.
Each CCUx timer slice provides an associated shadow register for the period and the
two compare values. This facilitates a concurrent update by software for these three
parameters, with the objective of modifying during run time the PWM signal period and
duty cycle.


The PWM_SVM might not fit your needs. Check the PWM_CCU4 and PWM_CCU8.

Regards,
Jesus
0 Likes