Reentrancy is not allowed: function 'Lcd_Out' called from two threads __Lib_Lcd.c

Status
Not open for further replies.

Adel Benaich

Newbie level 2
Joined
Jun 25, 2013
Messages
2
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Visit site
Activity points
19
Help :Reentrancy is not allowed: function 'Lcd_Out' called from two threads

Dear gents,
i am having a simple program on PIC16F887 using MikroC:
it displays a certain message on an LCD, then upon an interrupt on PORTB it displays another message.
the first message code is written in the main function routine while the second message code is written in the interrupt function routine.
i get the following error message, can you help me how to solve this problem.


184 364 Reentrancy is not allowed: function 'Lcd_Out' called from two threads __Lib_Lcd.c
184 364 Reentrancy is not allowed: function 'Lcd_Out' called from two threads __Lib_Lcd.c
50 364 Reentrancy is not allowed: function 'Lcd_Chr_CP' called from two threads __Lib_Lcd.c
18 364 Reentrancy is not allowed: function 'Lcd_Cmd' called from two threads __Lib_Lcd.c
0 102 Finished (with errors): 03 Feb 2012, 23:13:42 LEDs.mcppi

Thanks in advance
Adil
 
Last edited:

In mikroC you can't do this, as this is not allowed, and not advised to.

Even i had this error many times, to solve this place your code in main.

Follow this algorithm:

* Declare a Global Variable Flag and initialize it to 0.
* Whenever your interrupt executes set that flag to 1.
* In main check that flag
if(flag == 1)
{
Display your message
flag = 0
}
 
Hi xpress_embedo !

So this is mean , I won't benifit to the interrupt fonction in the programm ? ....one more question are there an other ways with other compilers which th ability to ignore this reetrancy fonction ?

Thnks for all advices
 

I didn't get what you had written above.

I never use mikroC due to some of the issues related with this compiler.
I had some similar thing in MPLABC18 compiler and done this successfully without any problem.

- - - Updated - - -

Have a look at this thread

https://www.mikroe.com/forum/viewtopic.php?f=88&t=27129

 

Status
Not open for further replies.

Similar threads

Cookies are required to use this site. You must accept them to continue using the site. Learn more…