Question re: the use of an external clock for PWM

Status
Not open for further replies.

Constantin

Well-known member
Hi everyone,

I have a question that came up as a result of looking through the reference for the MK20 chip. Specifically, I looked over the pin assignments of the MK20DX256 (Teensy 3.1) to see if any had changed vs. the MK20DX128 (Teensy 3.0), allowing me to switch some of the pins I have currently assigned. By chance, I read with great interest that the timer circuit can be set up to use an external clock, one whose inputs would happen to be on pins 32 and 33, i.e. the pins for the MCU clock.

If my interpretation is correct, would this theoretically allow me to run the PWM pins on a 16MHz basis?

I gather it would take some work to wade through all the registers to get it set up (vs. using the elegant and easy to use analog write frequency commands) but I am willing to consider it since my research suggests that the maximum non-overclocked PWM speed is 12MHz and the maximum over clocked PWM speed is 15MHz. Using the MCU clock frequency would allow 25% more readings out of the power monitor chip with zero impact on SINAD, ENOB, etc. without resorting to over clocking the Teensy MCU.

If someone has attempted/survived implementing an external clock source for the FTM0 timers, I'd appreciate some pointers and advice. In the meantime, many thanks to all for making this forum as useful and informative as it is.
 
Status
Not open for further replies.
Back
Top