![](templates/subSilver/images/CCSLogo.jpg) |
![CCS C Software and Maintenance Offers](templates/subSilver/images/forumAd6.jpg) |
View previous topic :: View next topic |
Author |
Message |
Salenko
Joined: 08 Sep 2008 Posts: 84
|
disabling interrupts and re-entrancy |
Posted: Mon Oct 13, 2008 7:03 am |
|
|
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.
my compiler: PCW 4.057 |
|
![](templates/subSilver/images/spacer.gif) |
Ttelmah Guest
|
|
Posted: Mon Oct 13, 2008 7:21 am |
|
|
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 |
|
![](templates/subSilver/images/spacer.gif) |
Salenko
Joined: 08 Sep 2008 Posts: 84
|
|
Posted: Mon Oct 13, 2008 1:38 pm |
|
|
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](images/smiles/icon_biggrin.gif) |
|
![](templates/subSilver/images/spacer.gif) |
|
|
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
|