Chip:MK64FN1M0VMD12
The source clock of FTM is kCLOCK_BusClk which is 60Mhz,but in the function
ftm_clock_prescale_t FTM_CalculateCounterClkDiv(FTM_Type *base, uint32_t counterPeriod_Hz, uint32_t srcClock_Hz)
It has two assertation:
assert((srcClock_Hz / 2U) > counterPeriod_Hz);
assert((srcClock_Hz / 128U / 0xFFFFU) <= counterPeriod_Hz);
Does it support 60MHz timer?Or what timer can I use with frequency as high as possible?
Thanks
Solved! Go to Solution.
Hi @Vinos
Please look into chapters from your reference manual:
40.2 FTM signal descriptions Table 40-1 FTM signal descriptions
The external clock input signal is used as the FTM counter clock if selected by CLKS[1:0] bits in the SC register. This clock signal must not exceed 1/4 of system clock frequency.
40.4.1.1 Counter clock source
Due to FTM hardware implementation limitations, the frequency of the fixed frequency clock must not exceed 1/2 of the system clock frequency.
The K64 has a system clock of 120MHz so you should be able to use the fixed frequency clock to get the 60MHz you want. However this values could cause some issues depending on your implementation since it says must not exceed 1/2 of the system clock frequency, and 60MHz is exactly the half.
Best Regards, Miguel.
Hi @Vinos
Please look into chapters from your reference manual:
40.2 FTM signal descriptions Table 40-1 FTM signal descriptions
The external clock input signal is used as the FTM counter clock if selected by CLKS[1:0] bits in the SC register. This clock signal must not exceed 1/4 of system clock frequency.
40.4.1.1 Counter clock source
Due to FTM hardware implementation limitations, the frequency of the fixed frequency clock must not exceed 1/2 of the system clock frequency.
The K64 has a system clock of 120MHz so you should be able to use the fixed frequency clock to get the 60MHz you want. However this values could cause some issues depending on your implementation since it says must not exceed 1/2 of the system clock frequency, and 60MHz is exactly the half.
Best Regards, Miguel.