What's the fastest clock that can be used with FTM?

Status
Not open for further replies.
According to K66's manual (referring to Teensy 3.6), an external clock can be used for FTM modules. What's the fastest clock that can be used there through a pin?

Well, I'd love to have 1 GHz clock on that, but I guess that's insane. What's the limit?
 
Not seen a spec, so this is a guess - 30 MHz tops. Best idea is to try it. Manual says it should be no more than one quarter of the peripheral clock, so my guess assumes a peripheral clock of 120 MHz (cpu at 240 MHz overclock).

I believe all input signals are phase aligned/synch'd with the peripheral clock - which therefore defines the limit. Also (for same reason) expect the FTM behaviour to have a degree of jitter w.r.t. your external clock.
 
Thanks for the response. This tells me then that if I need the fastest clock possible, I'm better off using the system clock.
 
I would think so, if you don't have a specific reason for using an external clock.

You can improve the accuracy of the timing too of the standard board - if you want to go to the trouble. It uses a 16 MHz crystal and there is a OSC0_CR register which can alter the digital capacitors that trim the frequency. Not sure of the drift values for Teensy 3.6, but for Teensy 3.1 the nearest drift value you could set the register to was 3ppm below or 10 ppm above (16 MHz). If you have a look at my post https://forum.pjrc.com/threads/45693-A-second-T31-Precision-Frequency-Standard, you can see a method of dithering between these two capacitor settings in the Interrupt Service Routine of an FTM timer (applies to Teensy 3.6 as well) so that the overall timing of the board is much better than 3ppm. I did an experiment to adjust the dithering manually (via the serial monitor) against a known standard (GPS) and got a drift of 1 part in 10e8, but this will not be temperature stable... still its better than 3ppm.
 
The datasheet says the maximum for F_BUS is only 60 MHz (and only 50 MHz on Teensy 3.2). The hardware appears to have quite a lot of room for overclocking, but something to keep in mind if you care about saying within Freescale's published specs.
 
@TelephoneBill Actually since it's not possible to use a faster external clock, my plan is to use a 10 MHz clock and do number-of-cycles comparison. Hopefully that will give me good time approximation.

@PaulStoffregen Actually I never found that piece of information. Where is it? I only found something in the K66 datasheet, and the only information I found was in section 45.3, saying that EXTCLK is limited to 1/4 the system clock (found that later on after the question was answered). Is there another datasheet?

I'm planning to overclock to 240 MHz. This seems to be supported with no problems. I hope I won't need special means of cooling if I do that.
 
@TelephoneBill Actually I have to thank you because that was the first post that made me learn about PWM a long time ago :) I got the base of the code I'm using now from there. Cheers!
 
Status
Not open for further replies.
Back
Top