Preetu Abraham

Time Calculation for MC9S08GT60

Discussion created by Preetu Abraham on Sep 29, 2016

Hi,

In one of the projects, the values set for _ICGC1 as 0x54 and _ICGC2 as 0x01

and _TPM1SC as 0x4f and the external oscillator connected frequency is 27 MH.As per settings in the registers, it should be in FBE Mode and the Bus frequency should be (ICGERCLK/R)2  i.e. (27/2)/2 = 6.75 MHz and the time from TPM source should be (6.75/ prescalor divide value) i.e. 6.75/128 = 0.044921875 MHz based on the register settings.

 

Since the counter is set as Up -counter and Modulo value in the registers _TPM1MODH and _TPM1MODL is 0xFFFF, what should the time duration for the interrupt to get generated. Whether the timing calculation based on the register settings are analyzed correctly by me and time for the interrupt to occur should be 5 ms?Pleas explain the time for the interrupt to counter once the counter overflows?Whether 5ms corresponding count is 65536??

Outcomes