interrupts disabled during call to prevent re-entrancy
Posted: Mon Aug 13, 2012 10:12 am
Hello everyone,
CCS compiler give me a warining:
>>> warnning 216: interrupts disabled during call to prevent re-entrancy:[@PSTRINGC7_115200_62_63]
But I don't know the reason. The program can't work properly? Would you pls tell me? please help...
Douglas Kennedy
Joined: 07 Sep 2003 Posts: 755 Location: Florida
Posted: Mon Aug 13, 2012 11:12 am
Chances are you have bloated up an isr. The rule for isr's is never never ever put printf or float in an isr. Now you might break the rule during testing but you must be aware of the time a printf or float calc blocks the isr.
Here your issue is related to string routines.
asmboy
Joined: 20 Nov 2007 Posts: 2128 Location: albany ny
Posted: Mon Aug 13, 2012 1:35 pm
post your code in question???
mr_Orange
Joined: 14 Apr 2012 Posts: 12
Posted: Wed Aug 15, 2012 3:13 am
I do get the same message because I use fprintf() in the HLVDIN interrupt. I think that the compiler is warning you about the possibility that while main is using fprintf() the interrupt routine is called so it tries to start fprint() a second time while the first fprintf() is not finished. I think the interrupt will start up after finishing the first fprintf() in main() so there will be a delay in starting the interrupt routine.
Since in my case HLVDIN detects that the controller is powered down I don't bother since the fprintf() in the interrupt is executed and the program stays in the HLVDIN interrupt routine until the power is gone.
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