darkextratoasty
New member
Can any of the timers within the Teensy 4.1 be incremented using an external clock signal, rather than the internal oscillator clock?
My goal is to have a timer running off an external 10MHz square wave signal. I could then have a pulse on a different pin, for example a 1PPS signal from a GPS receiver, trigger an interrupt that grabs the current value of the externally driven timer as a timestamp for when that pulse arrived. The idea here is to have a system for timestamping a pulse with a resolution of 100nS (10MHz clock), but I would like to be able to run the timer off an external signal so that I can use a much more accurate clock than the teensy's onboard oscillator.
Also, I apologize if this has been answered before, I wasn't able to find anything, but that could easily be due to my ignorance of keywords to use in my searching.
My goal is to have a timer running off an external 10MHz square wave signal. I could then have a pulse on a different pin, for example a 1PPS signal from a GPS receiver, trigger an interrupt that grabs the current value of the externally driven timer as a timestamp for when that pulse arrived. The idea here is to have a system for timestamping a pulse with a resolution of 100nS (10MHz clock), but I would like to be able to run the timer off an external signal so that I can use a much more accurate clock than the teensy's onboard oscillator.
- Is it possible at all to run any of the timers in the Teensy 4.1 off an external clock?
- If so, is it reasonable to expect an ISR that reads the value of a timer and stores it into a variable to run within a handful of nanoseconds before the next external clock cycle increments the timer again.
- Does my approach make sense fundamentally, or is there a better way to do this?
- If so, would it still make sense with say, ten different trigger pulses?
Also, I apologize if this has been answered before, I wasn't able to find anything, but that could easily be due to my ignorance of keywords to use in my searching.