• ### Announcements

Hello Everyone, Thanks for being patient while the forums were being fixed and upgraded. Please see details and report issues in this thread. Thanks!

# 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 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 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 on other sites

You can go lower, by reducing the chip frequency. That depends on how you use the clock system and which clock input.

##### Share on other sites
`Thank you very much for your important answers, admin `

med-Simo

##### Share on other sites

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 on other sites

I used the 1294 Tiva as an example. I mentioned this in the post above.

Medsimo likes this