Hello all,
So I am using TivaWare to generate PWM. I want to understand how exactly the “PWMGenPeriodSet” command influences the step of the PWM.
Let me get more specific. In the “TivaWare™ Peripheral Driver Library” (page 433) is says that PWMGenPeriodSet has 3 argument. The 3o argument is:
- ui32Period: specifies the period of PWM generator output, measured in clock ticks.
How does this affect my PWM width step?
By experimenting I saw this:
Had a system clock at around 8MHz and with 320 width step (ui32Period=320). Sent the PWM to a LED. After that I reduced my system clock to 4MHz and left the width step the same. The LED would light up must faster and more sharply.
Why exactly is this happening? How can I calculate what is the max width step of the PWM according to the system clock? (in other words, how accurate can I get with a width of the PWM by using a X MHz system clock)