Go Down

Topic: Power Down consumption on custom board (Read 7 times) previous topic - next topic

Coding Badly

From the datasheet...

9.11.3 PRR - Power Reduction Register

Bit 0 - PRADC: Power Reduction ADC
Writing a logic one to this bit shuts down the ADC. The ADC must be disabled before shut down.
The analog comparator cannot use the ADC input MUX when the ADC is shut down.

48X24X48X

Quote
From the datasheet...

9.11.3 PRR - Power Reduction Register

Bit 0 - PRADC: Power Reduction ADC
Writing a logic one to this bit shuts down the ADC. The ADC must be disabled before shut down.
The analog comparator cannot use the ADC input MUX when the ADC is shut down.


But, if we don't enable the ADC at the 1st place, we don't have to do the above setting right?
Look at 9.10.1 of the datasheet.

Coding Badly

The ADC is enabled by the core.  I believe init in wiring.c does the deed.

48X24X48X

Found it, it is in the wiring file in the core folder. The ADC is enabled by default.
For timers, I think for power down mode, the clock source is not available for it to work.

estratos

OK, trying to disable individual functions before stopping each function clock:

Code: [Select]

#include <avr/power.h>
#include <avr/sleep.h>

void setup()
{               
  byte i;
 
  // Ensure no floating pins
  for(i=0; i<20 ; i++)
  {
    pinMode(i, OUTPUT);
    digitalWrite(i, LOW);
  }
 
  // Power-down board
  set_sleep_mode(SLEEP_MODE_PWR_DOWN);
 
  sleep_enable();
  // Disable functions
  power_adc_disable();
  power_spi_disable();
  power_twi_disable();
  power_usart0_disable();
  power_timer0_disable();
  power_timer1_disable();
  power_timer2_disable();
 
  PRR = 0xFF;
 
  // Enter sleep mode
  sleep_mode();
}

void loop()
{
}


Consumption is still around 105 uA  =(

Thanks guys!

Go Up