Medsimo

TIVA C, PWM mode

7 posts in this topic

Hello all !!

I have a question about my TIVA board:

What is the range of frequencies that we can get for the PWM, taking into account the possibilities of "clock division" and the "number of bits"? I ask you if in case we had to measure a resonator with the PWM as a generator (at 50% duty cycle).

regards

Share this post


Link to post
Share on other sites

Quick calculation:

Max system clock TivaC-1294: 120Mhz
PWM divisors: /2,/4,/8,/16,/32,/64

PWM bits: 16

Min PWM frequency @120Mhz: 
Slowest PWM clock : 120/64 = 1.875Mhz

Max PWM load value = 65535(16-bit)
Minimum PWM frequency = 65536/1875000 = 0.02495 seconds
Inverse : 1/0.023495 = 28.6Hz.

Max PWM frequency @120Mhz: 

Fastest PWM clock : 120Mhz
Min PWM load value = 2 - so that you can add 1 to the load value to get 50% duty.
Maximum PWM frequency = 2/120000000 = 1.67e-8 seconds
Inverse : 1/1.67e-8 = 60MHz.

Medsimo likes this

Share this post


Link to post
Share on other sites
This means that depending on the divider used, the frequency varies, 
has used 16 bits and the variation has gone from 28.6 hz, up to 60Mhz ...

but the 120 Mhz of the maximum and the minimum of the PWM does not change ?

 

Share this post


Link to post
Share on other sites
Thank you very much for your important answers, admin 

 

med-Simo ;) 

Share this post


Link to post
Share on other sites

hello admin ..
I have been looking at the datasheet of TM4C123GH6PM and it states that the maximum clock frequency is 80Mhz. not 120.

And did not put any of the divisors. they are the same ?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now