Time Calculation for MC9S08GT60

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Time Calculation for MC9S08GT60

507 次查看
preetuabraham
Contributor III

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??

标签 (1)
0 项奖励
回复
0 回复数