PWMSP001 Count down mode?

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

cross mob
Dan_Larson
Employee
Employee
I am trying to have the active portion of a duty cycle at the beginning vs the End. To do this I need to change the default count up to count down. Is there an easy way to change the count direction in the app or through a simple register change? What I have found so far is to use the CCU4_CC4_CMC_UDS register but then need to connect an external signal through the matrix. Any help would be great.maybe even the next revision of the app allow direction input.
0 Likes
4 Replies
Dan_Larson
Employee
Employee
The other method that would work is if the Active output could be before the Status register is set like the CCU8 Apps allow
0 Likes
Georg_Huba
Employee
Employee
In the Configuration UI of the PWM App there is a tab called "Signal Configurations" with the option to define the passive level of the PWM signal as “Active Low” or “Active High” In this case it has to be set to “Active High”
0 Likes
clel_4817356
Employee
Employee
First reply posted Welcome!
Hello,
I now have the same problem with the XMC4500 Relax Kit. I need to set the CCU4 into down-count mode as described in the application note http://www.infineon.com/dgdl/Infineon-CCU4-XMC1000_XMC4000-AP32287-AN-v01_01-EN.pdf?fileId=5546d4624....
Just inverting the passive level is no solution for me thus it leads to short circuit when I stop the PWM.
I tried connecting a IO-Pin to event 1 but it doesn't work. When I change the "External counting direction" PWM just doesn't start instead of counting downwards.
What is the right way to change the count-mode? Of course I'd prefer the SW way setting the bit directly...
Best regards,
Clem 🙂
2471.attach2472.attach
0 Likes
lock attach
Attachments are accessible only for community members.
jferreira
Employee
Employee
10 sign-ins 5 sign-ins First like received
Hi,

Find attached project showing a possible way to achieve this.
The idea is to use the pdout signal of one OGU as event input signal for the CCU count direction.
You can in software change the direction of counting by set/resetting the status flag of the ERU connected to the OGU.

Regards,
Jesus
0 Likes