This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

timer0 interrupt does not work with printf statement

I got several warnings when I compile the
following code using TIMER0 interrupt
when it overflows.

void main(void)
{ //----------------------------------------// interrupt
TMOD = (TMOD & 0xF0) | 0x01;
ET0 = 1;
TR0 = 1;
EA = 1;
//Timer to overflow every 65536 clocks
//and prinf "testing"
while(1)
{ //do nothing
}
}
////-----------//
void timer0_ISR(void) interrupt 1
{
printf ("testing");
}

////////////////////////

I got a warning message during linking:

*** warning 15: MULTIPLE CALL TO SEGMENT
SEGMENT: ?PR?PRINTF?PRINTF
CALLER1: ?PR?TIMER0_ISR?MY_FILE
CALLER2: ?C_C51STARUP