Hello,
I have an issue with Generating accurate timer interrupt with FTM_5_CH_0_CH_1
as when starting the GPT timer for example with GPT_StartTimer(timer channel , time_needed)
where time needed is equal to 12 ms which corrosponds to 15000 tick for 1250000 hz
but i am getting the ISR each 6 ms instead of 12 ms
here is the configuration done on Tresos
GPT Configuration:
I have added new entry in GPTChannelConfiguration for FTM5
and GPT channel tick frequency is 1250000
GPT channel CLk src ref - > FTM_5 clock
GPT FTM Prescaler = 32
GPT FTM channel clk src=system_clock
MCU configuration :
MCU peripheral clock config for FTM5 is on SPLL
FTM5 clk in MCU clock reference point is 40 MHZ
for the SPLL:
SPLL freq is 160 Mhz
SPLL div 2 freq is 20 Mhz
SPLL div 1 freq is 40 Mhz
so what is wrong and leading to getting this issue ?