Steve Church

Code Warrior V5.1 for 9S08QG8- inaccurate 1mS interrupt - Processor Expert

Discussion created by Steve Church on May 10, 2007
Latest reply on May 11, 2007 by Steve Church
I have set up a 1mS interrupt using the Device Initialisation. I have checked that the trim value is being programmed by the programmer and copied to the trim registers by the program (again done by Device Initialisation). I am seeing an interrupt period of 1.08mS instead of 1mS. The only piece of code I have hand written is three lines in the interrupt routine which reset the interrupt flag and toggles and o/p line.
The Init_TPM bean parameters are
    Clock Source - bus rate clock
    Prescaler 1
    Modulo count = 105c
    (which gives) Period 1mS

    Overflow Int enabled

I must admit to not quite having a handle on the clocking sources yet which is why I've relied on the Device Initialisation function to get me started. Any ideas as to why I'm getting this discrepancy. I've checked the Multilink settings (Advanced Options) for  Trim Programming and the box is ticked.



Message Edited by Alban on 2007-05-10 01:11 PM