Mahmoud Al-Wadie

Problem with m9s12ne64 timer

Discussion created by Mahmoud Al-Wadie on Jan 27, 2008
Latest reply on Jan 27, 2008 by Jim Donelson
I can't understand how can i make o/p compare , I wrote a function which make time delay
 
void delay(void){
 TIOS_IOS4 = 1;   // timer 4 output compare
    TSCR2_PR = 7;    // prescaler 0 : 25Mhz
    TIE_C4I = 0;     // interrupt 4 enable
    TSCR1_TSFRZ = 1; // disable timer in freeze mode
    TC4 = 0xfffc;
    TSCR1_TEN = 1;   // enable timer
   while(TFLG1_C4F =0 );
   TSCR1_TEN = 0;  //disable timer
}
 
 
but it didn't and i don't know why , please if any one read this and find the problem reply to me

Outcomes