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

... Programmer ! help me too

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



Joined: 07 May 2007
Posts: 69

View user's profile Send private message

... Programmer ! help me too
PostPosted: Wed Mar 18, 2009 6:08 am     Reply with quote

You tell
Quote:
If you feel that you must put a delay inside an isr, and you don't
want to see that warning message, then tell the compiler to create
a 2nd instance of the delay library by adding a 2nd #use delay()
statement as shown in bold below. That way, the isr and the
code in main() (and beyond) will each have their own separate
delay routines.

I do that.But not work.Are you have another way ?
I must put many delay inside isr and alot of function that calling from inside the isr and outside .Now I have 14 warning.All warning are "warning 216 .. interrupts disable during call to prevent re-entrancy :[...]". When I cancel isr.All warning are gone.I am not sure this warning effect to destroy my ADC port too.[subject - Can open ADC port full time ? ]

Regards


Last edited by sorasit46 on Wed Mar 18, 2009 6:26 pm; edited 1 time in total
asmallri



Joined: 12 Aug 2004
Posts: 1635
Location: Perth, Australia

View user's profile Send private message Send e-mail Visit poster's website

PostPosted: Wed Mar 18, 2009 9:15 am     Reply with quote

If you have lots of function and delays in the ISR then you are almost certainly not using ISRs correctly. Use ISRs for time critical functions and, if necessary, set flags that the mainline code can use to determine what action needs to e performed in the main code loop.

On the VERY rare occasion you needs delays in an ISR (I can't think of any other than chip select I/O interfacing which requires a series of one or more NOPs) then use a timer dedicated to the ISR.
_________________
Regards, Andrew

http://www.brushelectronics.com/software
Home of Ethernet, SD card and Encrypted Serial Bootloaders for PICs!!
PCM programmer



Joined: 06 Sep 2003
Posts: 21708

View user's profile Send private message

PostPosted: Wed Mar 18, 2009 11:15 am     Reply with quote

And don't post to me by name. I don't work for CCS.
sorasit46



Joined: 07 May 2007
Posts: 69

View user's profile Send private message

PostPosted: Wed Mar 18, 2009 6:31 pm     Reply with quote

PCM programmer wrote:
And don't post to me by name. I don't work for CCS.


Ohh! so sorry.
I post your name. Because you used to solve re-entrancy problem.However thank you for your knowledge and kindness.

Regards
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