Hi - I built up a device a few years back that had a very low current sleep mode. I measured it at 2.5ua. It uses an ATMEGA168P. I recently made some changes to the code to track down a different problem with the device, and recompiled that code and installed it. I did not measure sleep current at the time. I have now reverted to old code, but compiled today, and my sleep current is now 120ua.
I believe I went from AVR studio 5 to 6 during that time.
Is there possibly some setting in AVR studio that could be blocking my AVR from going into sleep mode? I can't find anything in the hardware that should be causing this. The only change I made to the hardware is I installed a slightly higher capacitance 32K crystal. I expected a microamp or so change from that at most. Not 117.5ua!!!
I call sleep mode like this:
SMCR = (1<<SM1) | (1<<SM0) | (1<<SE);
sleep_cpu();
At the top of my file I have this:
#include
Any ideas? This is driving me nuts!