Hello,
i made a battery powered project that measures pulses on digital input and sends pulse count via uart every 60 min. The MCU should be in power down mode and wake up only when PIT(part of RTC peripheal) sends a pulse. At this point the PCB is working as it should, the only problem is that i can not get the MCU power consumption below 115 uA when in power down mode.
At first i thought that the problem is my hardware design, but then i removed ALL the components from the PCB and only left the Atmega3209 on and power consumption still wont go below 115 uA, while according to datasheet it should be 15 uA MAX. I am running the core at 416.667 KHZ(internal 20MHz oscilaltor/48) and PIT gives me pulse every 1s.
Only thing connected on the MCU on my test PCB is 2x VDD, 1x AVDD, pull up on reset pin and UPDI interface(which i disconnect when measuring current).
#include <atmel_start.h> #include <util/delay.h> #include <funkcije.h> #include <avr/sleep.h> #include <avr/interrupt.h> //F_CPU = 416.667 kHZ uint32_t counter = 20; uint32_t timer = 0; ISR(RTC_PIT_vect) { cli(); timer++; if(timer>120){//2minute send out interval for faster testing usart_send_int(counter); counter=0; } RTC.PITINTFLAGS = RTC_PI_bm; sei(); } int main(void) { atmel_start_init(); _delay_ms(1000); sei(); while (1) { sleep_enable(); sei(); sleep_cpu(); sleep_disable(); } }
P.S. Everything works as it should, only goal left is to get power consumption below 40 uA.