AnsweredAssumed Answered

Setting of ICG and TPM mode in MC9S08AC128 and MC9S08GT60

Question asked by Preetu Abraham on Jun 12, 2017



I am setting the ICG and TPM Timer registers with an external oscillator of 27MHz


For MC9S08GT60: FBE Bypassed external mode

/* Using an external 27Mhz crystal

_ICGC1.ICGC1Data = 0x54;

_ICGC2.ICGC2Data = 0x01;



/* Set the status and control register for the TPM. */

_TPM1SC.TPM1SCData = 0x4f;  /*prescaler is 128*/

_TPM1MODH.Data = 0xff;

_TPM1MODL.Data = 0xff;

We were getting a timer interrupt every 5 ms.


But with MC9S08AC128  with all the same register bit setting  ,we are not getting 5 ms interrupt instead 1.2s interrupt.


But when I changed the Modulus value to 0x106 ,it gets the interrupt at 5ms .I am not sure why there is a difference since the registers are all same and external frequency .Do you have any clue about it.