JOseph Guest
|
"Interrupts disabled during call to prevent a re-entran |
Posted: Tue Apr 10, 2007 11:00 am |
|
|
hello,
I have this warning message when I compil my script.
"Interrupts disabled during call to prevent a re-entrancy"
The problem apparear during the test(robotics), the interruption don't work when my robot run ( Step motor, many delay_ms(xx) in the script).
//----------------------------------------
#int_rda
void Interruption_Fonction()
{
int buffer;
buffer=getc();
if(buffer==0x05)
{
PUTC(0xFF);
D_Rotation(180);
}
}
//---------------------------------------
void main (void)
{
enable_interrupts(int_rda);
enable_interrupts(global);
SET_TRIS_A(0x00);
OUTPUT_A(0x00);
SET_TRIS_B(0x00);
OUTPUT_B(0x00);
SET_TRIS_D(0x00);
OUTPUT_D(0x00);
SET_TRIS_E(0x00);
OUTPUT_E(0x00);
D_Deplacement(600);
}
The interruption function only at certains moments
For me, the problem is during Delay_ms(XX), the interruption is disabled..... as a instruction execution time, but delay is more longer.
The solution is a Flag bit interruption. A test of the flag bit at every turn of loop .... but i don't know how to....
please help me |
|