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

disabling interrupts and re-entrancy

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



Joined: 08 Sep 2008
Posts: 84

View user's profile Send private message

disabling interrupts and re-entrancy
PostPosted: Mon Oct 13, 2008 7:03 am     Reply with quote

hi all,

I always get this warning message after compiling my code (stepper motor command and frequency display with PIC16f876), would anybody explain it to me ?
interrupts disabled during call to prevent re-reantrancy:(@DIV3232)

and the warning points to the 321th line which is after the main(){}.
in another side I have also the warning message in my Simulator (ISIS)
[PIC16ADC] PC=0x0413, ADC conversion clock period (5e-07) is possibly invalid for device clock frequency
, however I donĀ“t use ADC in my code and I did not forget to disable them , do you think that there is a link between the two warnings ?


thanks in advance and pleeeeease excuse me if my topic is not in the appropriate place. Embarassed


my compiler: PCW 4.057
Ttelmah
Guest







PostPosted: Mon Oct 13, 2008 7:21 am     Reply with quote

You are using something involving a 32bit division inside the interrupt routine, and also outside.
The processor does not have a 'data' stack, so calls must never occur inside themselves. To avoid the interrupt causing this, the compiler automatically disables interruts around the external code causing this, when the same code is used both inside,and ouside an interrupt.
Seriously, are you sure you need to perform division in the interrupt?. This takes a lot of time, and should be avoided if at all possible.
This warning will always point after the 'main', since it applies to the program as a whole.
The other warning is from the simulator. It is purely that Isis, does not _know_ you are not using the ADC, hence warns you that the selected clock rate 'may be invalid'.
No connection between these at all.

Best Wishes
Salenko



Joined: 08 Sep 2008
Posts: 84

View user's profile Send private message

PostPosted: Mon Oct 13, 2008 1:38 pm     Reply with quote

hi Ttelmah,

I resolved the problem with your help, in fact I had a division in the routine of the CCP1 !

thank you very much great man !!!! Very Happy
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