I'm new to asking questions here so don't butcher me please!
NOTE: I am using MPIDE
I am trying to get my Uno32 to enter sleep mode to save power for a WSN like application. I have trawled the reference manual and found the relevant sections (i.e. using the OSCCONSET , WDTCONCLR and WDTCONSET regs) This would involve setting the Watch Dog period, clearing the watch dog and using "_ asm _ _ volatile _("wait")".
I have got strange results here in that the whole board seems to reset fully each time, so my app does not effectively sleep for the wdt period ..more like Twdt (wdt period) + Tsetup
So I went a step further and wanted to change the boot regs i.e. "DEVCFG" regs to those I saw on the examples online to see if there was something I was missing.
so this involved "#pragma config" statements , according to the examples I saw online, but I cannot get any of these to compile ! see the following code:
#include "plib.h"
#include "p32xxxx.h"
#pragma config FPLLMUL = MUL_20
void setup()
{
Serial.begin(9600);
}
void loop()
{
}
This will yield the following compiler error:
sketch_mar07a.cpp:7:19: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://www.chipkit.org/forums> for instructions
And I have bothered the chipkit crowd etc. but I was just wondering if there is anyone out there using MPIDE and a Uno32 and have been able to change the DEVCFG regs?
All help appreciated , Thanks for your time !