hi,
sorry that I didn't make my statement clear. actually I posted this problem in the forum few days ago with the subject: timer overflow interrupt. Since no one reply to that forum and I find out that it is the simulator issue, I post it again here as new thread.
I just implemented a very simple timer overflow interrupt.
below is the sorce code:
Code:#include <hidef.h> /* common defines and macros */#include <MC9S12NE64.h> /* derivative information */#pragma LINK_INFO DERIVATIVE "1"volatile unsigned int count;void main(void) { /* put your own code here */ TSCR1=0X80;//enable timer TSCR2=0x85; //select prescler bus clock/32 TFLG2=0x80;// clear timer flag EnableInterrupts; for(;;) { } /* wait forever */}#pragma CODE_SEG NON_BANKEDinterrupt void _Timerovf(void) { TFLG2 = 0x80;// clear the interrupt flag count++; //increment counter } #pragma CODE_SEG DEFAULT
you quote:
Anyway when running your application in the simulator. Did you see a messaged "writing to unimplemented register at pc = ..."?
There is no message showing.