I have generated the following test code to use with the simulator debugger. I am utilizing a s08gt16 processor.
I am unable to get the interrupt to be generated. Can one of you help me with where I am going wrong? The frequency of the interrupt at this point is not important as that can be changed with the prescaler.
thanks in advance,
Bud
// SET DIVIDER TO DIVIDE BY 32
TPM1SC_PS0 = 1;
TPM1SC_PS1 = 0;
TPM1SC_PS2 = 1;
// CLOCKS SET TO BUS RATE CLOCK
TPM1SC_CLKSA = 1;
TPM1SC_CLKSB = 0;
//TPM1MOD = 112;
TPM1MOD = 0;
//CENTER ALIGNED CLOCKS
//TIMER OVERFLOW INTERRUPT ENABLED
TPM1SC_TOIE = 1;
TPM1SC_CPWMS = 1;
//TPM1SC = 0x60;
for(;
{
__RESET_WATCHDOG(); /* feeds the dog */
} /* loop forever */
/* please make sure that you never leave this function */
}
interrupt 8 void ProcessMyInterrupt(void){
// TPM1SC;
TPM1SC_TOF = 0;
}