> -----Original Message----- > From: AVR-Chat@yahoogroups.com [mailto:AVR-Chat@yahoogroups.com] On > Behalf Of Clark Martin > Sent: Thursday, October 13, 2011 12:41 PM > To: AVR-Chat@yahoogroups.com > Subject: Re: [AVR-Chat] OCDEN Fuse (minor rant) > > > On Oct 13, 2011, at 8:56 AM, Phillip Vogel wrote: > > > > > I've been scratching my head for a while, trying to figure out why a > Mega644PA was drawing something over 1.6mA while in > SLEEP_MODE_PWR_DOWN. I had all the fuses set, all the peripherals > disabled, all the ports set to draw the least current. The chip looked > like it was going to sleep - it obediently sat and waited for a pin- > change interrupt, and then continued execution when I pressed the > appropriate button. But this was something like 1000 times the expected > current. > > > > I tried shorting the crystal to ground, just to see what would > happen, and the current went down a bit. This indicated to me that, > even though it was supposed to be stopped, the clock was actually > running. WTF? > > > > Then, I reconnected the JTAGICE MKII (for the hundredth time today), > and this time I exited debug mode before disconnecting it. That fixed > the problem and the chip now sleeps at sub-2uA consumption. So, it > appears that activation the JTAG debugger also activates the OCDEN > fuse, and unless you exit debug mode methodically, OCDEN remains > programmed (and the clock continues to run in all sleep modes). > > > > Now that I'm aware of this, I can live with it. But, WHERE IN THE > DOCUMENTATION AM I WARNED ABOUT THIS? I really don't recall seeing it > anywhere. > > I ran across this the other day while checking fuse settings... > > In doc 8272 (AT Mega 644 data sheet), page 299 it says: > > "Never ship a product with the OCDEN Fuse programmed regardless of the > setting of Lock bits and JTAGEN Fuse. A programmed OCDEN Fuse enables > some parts of the clock system to be running in all sleep modes. This > may increase the power consumption." > > Clark Martin > Redwood City, CA, USA > Macintosh / Internet Consulting > > "I'm a designated driver on the Information Super Highway" Right. I had read that as well, but the point is that I DID disable OCDEN, and the JTAG debugger re-enabled it and left it that way. Turning off OCDEN has to be the last thing you do before disconnecting the JTAGICE.
Message
RE: [AVR-Chat] OCDEN Fuse (minor rant)
2011-10-13 by Phillip Vogel
Attachments
- No local attachments were found for this message.