using PLL to enhanse the GPT frequency in Teensy4.1


New member
For my first steps in Teensy programming, I'd like to know what is the maximum frequency of the General Purpose Timer using the 24MHz Xtal?
Can I configure PLL register in order to reanch a timer frequency of few hundreds MHz?
If yes, Where can I find an example code to do this or an indication of the registers to configurate.
Yes, you can switch the GPT to 150MHz. Here the relevant code from the TeensyTimerTool
if (USE_GPT_PIT_150MHz)                             // timer clock setting from config.h
   CCM_CSCMR1 &= ~CCM_CSCMR1_PERCLK_CLK_SEL;        // use F_BUS as timer clock
else                                                //
   CCM_CSCMR1 |= CCM_CSCMR1_PERCLK_CLK_SEL;         // use 24MHz as timer clock
Please note that this also changes the PIT (IntervalTimer) to 150MHz.

You might also consider using the TMR (QUAD) timers instead. They run at 150MHz by default.