CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

WARNING: Interrupts disabled during call to prevent re-entr

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
franckcl



Joined: 12 Sep 2003
Posts: 32
Location: France (Paris)

View user's profile Send private message

WARNING: Interrupts disabled during call to prevent re-entr
PostPosted: Tue Jan 06, 2004 9:44 am     Reply with quote

Hi,

When I call a function which is called also by the timer #3 I have this :
"Warning 216 :Interrupts disabled during call to prevent re-entrancy"
but the problem is my program does not run.

I have tried to enable interrupt at the end of my function but it's the same problem.

I would like to enable and disable interrupt myself, how to do ?

Thank you
Franck
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Tue Jan 06, 2004 2:38 pm     Reply with quote

Post a small (but complete) program that demonstrates the
problem, and that can be compiled for testing. I suspect
that we can recommend a different way of writing the program,
to avoid the problem.
franckcl



Joined: 12 Sep 2003
Posts: 32
Location: France (Paris)

View user's profile Send private message

PostPosted: Wed Jan 07, 2004 2:29 am     Reply with quote

My program is too long to post it here.

So, is there a pragma to disable this feature ???


Here is a very small example :
//-------------------------------------------------------
#int_TIMER3 // Timer 20ms
TIMER3_isr()
{
// here I read the keyboard
if (Key1isPressed) SetLight(0xFFFF); // Each bit is a light
if (Key2isPressed) SetLight(0x0000); // Each bit is a light
return(0);
}
//-------------------------------------------------------
void SetLight(int16 BitmapLigh)
{
// (...)
}
//-------------------------------------------------------
void main()
{
init(); // call this function to initialize variables, timers, registers....

SetLight(0); // at reset, turn off all lights

while (true)
{
(...)
if (EventTrue) SetLight(0); // turn off, all lights
(...)
}
}
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group