View previous topic :: View next topic |
Author |
Message |
bells_electronics
Joined: 05 Dec 2009 Posts: 40
|
Warning related Question |
Posted: Fri Apr 08, 2011 12:47 pm |
|
|
hey guys
when i use float variables in interrupt i get this warning
Quote: |
>>>Warning 216"Bells.c" Line 410(0,1): Interrupts disabled during call to prevent re-entrancy: (@FLT)
Memory usage: ROM=15% RAM=6% - 9%
0 Errors, 1 Warnings
|
is it OK
???? what does it means ?? |
|
|
PCM programmer
Joined: 06 Sep 2003 Posts: 21708
|
|
|
Ttelmah
Joined: 11 Mar 2010 Posts: 19506
|
|
Posted: Fri Apr 08, 2011 2:37 pm |
|
|
Add the points about _time_. Float arithmetic is slow, you really don't want this sort of time delay in an interrupt. see if you can consider using scaled integer arithmetic instead (still need to duplicate the arithmetic library to avoid the error, but a much better chance of things not going wrong....).
In the manual 'Common questions and answers;, 'How much time to math operations take', and then scream gently, when thinking about handling things in interrupts.....
Best Wishes |
|
|
temtronic
Joined: 01 Jul 2010 Posts: 9225 Location: Greensville,Ontario
|
|
Posted: Sat Apr 09, 2011 5:47 am |
|
|
Poor little PICs, seems everyone wants them to 'do the near impossible','yesterday','faster than a speeding bullit'...
They really weren't originally designed for this life !
But, they do math faster than me with pencil and paper when 3 phones are ringing off the hook ! It's all a matter of perspective.
Interrrupts ? Get in, set a flag(or 2), get out, end of ISR code...... |
|
|
|