Author |
Message |
Topic: ADC, floating point and interrupts |
xieliwei
Replies: 11
Views: 17273
|
Forum: General CCS C Discussion Posted: Sun Nov 13, 2011 11:41 am Subject: ADC, floating point and interrupts |
Add a diagnostic at the start, to find what the restart cause is.
Also post the fuses used.
The comment about sno, still applies though. Just have a second counter like curradc, set it to 3 on boot, ... |
Topic: ADC, floating point and interrupts |
xieliwei
Replies: 11
Views: 17273
|
Forum: General CCS C Discussion Posted: Sun Nov 13, 2011 11:23 am Subject: ADC, floating point and interrupts |
Hmm, hang on...
Making the stack size change does fix the problem with the actual code! That's why experience is important! Thank you Ttelmah and others!
Now I wonder what's causing the ... |
Topic: ADC, floating point and interrupts |
xieliwei
Replies: 11
Views: 17273
|
Forum: General CCS C Discussion Posted: Sun Nov 13, 2011 10:44 am Subject: ADC, floating point and interrupts |
Try increasing the default stack size.
By default on the PIC24, the value selected is too low, especially if you start using things like floating point printf....
Best Wishes
After adding:
#bu ... |
Topic: ADC, floating point and interrupts |
xieliwei
Replies: 11
Views: 17273
|
Forum: General CCS C Discussion Posted: Sun Nov 13, 2011 10:27 am Subject: ADC, floating point and interrupts |
Thank you for your replies!
Sorry that I didn't provide the full code earlier, was in a hurry to attend to something.
Here is the full skeletal code (with suggested changes) that replicates the ... |
Topic: ADC, floating point and interrupts |
xieliwei
Replies: 11
Views: 17273
|
Forum: General CCS C Discussion Posted: Sun Nov 13, 2011 1:36 am Subject: ADC, floating point and interrupts |
I'm facing a problem trying to get a piece of code working. After some testing, it appears that my floating point operations and printing gets interrupted by the ADC interrupt.
Here's a condensed v ... |
|