AnsweredAssumed Answered

Generate PWM with 20Hz with K27

Question asked by christophosterloh on Nov 28, 2018
Latest reply on Nov 28, 2018 by Robin_Shen



i'm struggeling to generate a pwm with 20Hz and a duty cycle of 50%. Running the clock with 120Mhz, i get a bus clock speed of 60Mhz. Even with the maximum prescaler of 128 I'm far away from 20Hz (cause the compare value would be > 16bit).

When I'm to use the fixed frequeny clock (MCGFFCLK) by setting C1[IREFS] to 1 and set the Clock Source Selection [CLKS] to 2, I do not get any output (when triggering the pin with a scope).


Do you have any hints for me what I've forgotten or could you tell me a different/better way to solve this?


Thanks and best regards!