PWM frequency of 1.5 Hz with DAVE APP

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

cross mob
User9076
Level 1
Level 1
Hello,
how is it possible to get a low PWM frequency of 1.5 Hz? In the settings of the CCU4 and CCU8 it is only possible to type in an integer value. The function "PWM_CCU4_SetFreq" only accepts uint32_t values for the frequency.
Has anybody an idea or should I use directly the LIB functions (XMC_CCU4_SLICE_SetTimerPeriodMatch) as uses inside the function.
Thanks
M.Schneiders
0 Likes
4 Replies
DRubeša
Employee
Employee
First solution authored First like received
Hi M.Schneiders,

have you took a look at following example: CCU4_SLICE_CONFIG_EXAMPLE_XMC47 (http://www.infineon.com/cms/en/product/promopages/aim-mc/dave_downloads.html)? This example demonstrates the usage of timer concatenation with CCU4 unit while it´s not possible to generate low frequency (such as yours) with a high resolution (I don´t know what resolution would suffice to you but in the example highest possible resolution is used). Please take a look at the mentioned example while I believe it could give an idea regarding your question.

Best regards,
Deni
0 Likes
User9076
Level 1
Level 1
Hello Deni,
thanks for the hint to the example. As I don't need a high resolution I can use the build in APP function with a little change so that I can give over the frequency in 0.1 Hz steps.
Thanks anyway for the interesting example.
Regards M.Schneiders
0 Likes
User13081
Level 1
Level 1
Hi M.Schneiders,

May I ask you how you solved it?
I need to generate a variable low frequency PWM Signal
in the Range of 0,5 to 200Hz with duty cycle of ~25% and 0.1Hz Resolution.

Best regards
0 Likes
User13081
Level 1
Level 1
Done:)
I modified the PWM function to work with float.
0 Likes