This content has been marked as final.
Show 5 replies
-
1. Re: [PWM] - Changing the Clock Frequency during code execution
DaKn_263916 Jun 12, 2013 11:32 AM (in response to userc_43432)Yes, look at the API's int he datasheet, there is one for the period. There are
side effects related to when actual update occurs, read those comments as well.
Regards, Dana.
-
2. Re: [PWM] - Changing the Clock Frequency during code execution
userc_43432 Jun 12, 2013 11:57 AM (in response to userc_43432)This kind of API adjusts only the Period Value of the PWM. What I need to set is the Clock Frequency of the PWM, not the Output Clock Frequency. I have tried to find a way to configure the PWM config. Registers to set another Clock Source, but I could not find anything. -
3. Re: [PWM] - Changing the Clock Frequency during code execution
JoMe_264151 Jun 12, 2013 2:08 PM (in response to userc_43432)1 of 1 people found this helpfulYou may always use a counter as a pre-scaler on a neighboured block. The output of the prescaler can be used as clock input to the PWM. Lowest Count will be divide by two, so you get 12MHz as input to your PWM. Higest count you get with a 16bit prescaler.
Bob
-
4. Re: [PWM] - Changing the Clock Frequency during code execution
userc_43432 Jun 12, 2013 2:53 PM (in response to userc_43432)Thanks a lot for information Bob! I'll try it. -
5. Re: [PWM] - Changing the Clock Frequency during code execution
DaKn_263916 Jun 12, 2013 4:34 PM (in response to userc_43432)You can use a timer or a counter, clock it at 48 Mhz (as long as clock not derived
from interal global buss route), and use a period divsior of 0 to n-1. At 0 input
clk is output / 1, and just shifted.
Regards, Dana.