In a manual of this data-acquisition hardware the timer output is state as:

"One timer output channel(32-bit)"

If a timer is 32-bit, what else info is needed to calculate the max and min freq. timer can produce(as a PWM output)? Should we need the processor speed?


I found more info about the timer output:

enter image description here

  • \$\begingroup\$ Input frequency. \$\endgroup\$ – Long Pham Jun 9 '18 at 15:45
  • \$\begingroup\$ Isnt timer output used to produce TTL level PWM output? \$\endgroup\$ – HelpMee Jun 9 '18 at 15:47
  • \$\begingroup\$ And PWM resolution :) \$\endgroup\$ – Long Pham Jun 9 '18 at 15:49
  • \$\begingroup\$ What do you mean by input frequency? Internal clock freq? \$\endgroup\$ – HelpMee Jun 9 '18 at 15:52
  • \$\begingroup\$ Yeah, sort of. As a timer, it need a reference clock. \$\endgroup\$ – Long Pham Jun 9 '18 at 15:55

Generally, timers embedded in microcontrollers tend to have a prescaler before them, so the clock to the timer need not be the system clock frequency. Once you have the max and min frequency available from the prescaler, this will give the timing resolution of the timer.

Unfortunately, the document you linked to appears to be for a development board containing the microcontroller, rather than for the microcontroller itself. The latter document will contain the information you need.

Given the 64MHz clock, you have a timing resolution of 15.625nS.

You are still missing the specifications for the PWM hardware attached to the timer.

The maximum PWM frequency you can achieve depends on that hardware. If it's completely programmable and can run at full speed, then theoretically you could produce a 50% duty cycle at 32MHz. However, you'd probably want better resolution than that, maybe 256 levels, which would give you 64M/256 = 250kHz.

If the PWM hardware allows you 32 bits, then the slowest could be 64M/2^32 = 15mHz. That's probably unlikely though, you rarely get more than 16 bits for PWM registers, giving you 976Hz minimum.

But if there's a prescaler involved before the timer, then the minimum rates could be even lower.

You need to find more documentation.

  • \$\begingroup\$ I found more info on this timer i.stack.imgur.com/J6cVy.png and added it in my question. Now given these how can we calculate the min max freq. the timer can output as PWM? And is High pulse width 15.625ns the time for the rising edge? \$\endgroup\$ – HelpMee Jun 9 '18 at 16:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.