ATSAM3X8EA / AT91SAM and PowerModes/VDDBU

Discussion around product based on ARM Cortex M3 core.
This forum will be discontinued soon.

Moderators: nferre, ncollot

Pyroplan
Posts: 1
Joined: Fri Jan 30, 2015 9:37 am

ATSAM3X8EA / AT91SAM and PowerModes/VDDBU

Fri Jan 30, 2015 9:47 am

Hey Guys,

i have a problem to use the RTC in the ATSAM3x.
With external PowerSupply the RTC works well.
But it should also work then i disconnect the power (Backup Battery is installed).

Is there a register which must be set? 
In the moment the Atmel is drawning ~300µA which is quite high  :(

The Datasheet says, that I must set the SUPC_MR Register at least two slow clock periods before VDDIO voltage is removed. 
But it should detect automaticlly the disconnect power and go to backup mode und wake up then Power is on again. 

Can u pls help me?  :?
b-s-a
Posts: 5
Joined: Thu Apr 22, 2010 1:56 pm

Re: ATSAM3X8EA / AT91SAM and PowerModes/VDDBU

Wed May 13, 2015 12:11 pm

Today I have resolved same problem on AT91SAM3S1C:
1. Check for resistor between TMS/SWDIO line and GND. Before I add it (10K) power consumption in backup mode was about 300-400 uA.
2. Move all PIOs (except XIN* and some application specific ones) to output state with data 0.
3. Setup wakeup events
4. Disable BOD
5. Go to sleep: while(1) { SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk; __WFE(); }

Code: Select all

    PIOA->PIO_PER = ~0U;
    PIOA->PIO_OER = ~PIO_OER_P7; //XIN32
    PIOA->PIO_ODR = PIO_OER_P7; //XIN32
    PIOA->PIO_PPDDR = ~0U;
    PIOA->PIO_PUDR = ~0U;
    PIOA->PIO_CODR = ~0U;

    PIOB->PIO_PER = ~0U;
    PIOB->PIO_OER = ~PIO_OER_P9; //XIN
    PIOB->PIO_ODR = PIO_ODR_P9; //XIN
    PIOB->PIO_CODR = ~0U;
    PIOB->PIO_PPDDR = ~0U;
    PIOB->PIO_PUDR = ~0U;

    PIOC->PIO_PER = ~0U;
    PIOC->PIO_OER = ~0U;
    PIOC->PIO_CODR = ~0U;
    PIOC->PIO_PPDDR = ~0U;
    PIOC->PIO_PUDR = ~0U;

    SUPC->SUPC_WUMR = 0;
    SUPC->SUPC_SMMR = 0;
    SUPC->SUPC_WUIR = SUPC_WUIR_WKUPT0_HIGH_TO_LOW | SUPC_WUIR_WKUPEN0_ENABLE;

    SUPC->SUPC_MR = SUPC_MR_BODDIS_DISABLE | SUPC_MR_ONREG_ONREG_USED | SUPC_MR_KEY(0xa5);

//    SUPC->SUPC_CR = SUPC_CR_VROFF_STOP_VREG | SUPC_CR_KEY(0xa5); //alternate way to sleep
    while (1) {
        SCB->SCR |= SCB_SCR_SLEEPDEEP_Msk;
        __WFE();
    }
Check power consumption without debugger connected.
masud
Posts: 1
Joined: Sat Jul 04, 2015 3:54 pm

Re: ATSAM3X8EA / AT91SAM and PowerModes/VDDBU

Sat Jul 04, 2015 8:50 pm

hello b-s-a
could u please help me understanding the code u written, what "->" it mean, i am sorry for my negligence but i coudnot understand this symbol, and i even coudnot find on google. and it would be batter for me if u provide some soft material.
Thanks
jharley
Posts: 238
Joined: Thu Dec 06, 2012 6:40 am

Re: ATSAM3X8EA / AT91SAM and PowerModes/VDDBU

Mon Jul 06, 2015 10:01 pm

Get yourself a book on C language or search the web for C language tutorials or find a C language reference like ....

http://www.gnu.org/software/gnu-c-manua ... Structures

Regards
elphnei
Posts: 3
Joined: Fri Jul 17, 2015 12:36 pm

Re: ATSAM3X8EA / AT91SAM and PowerModes/VDDBU

Fri Jul 29, 2016 3:12 pm

Hi.

Did you ever get the RTC to keep date and time using a backup battery?

I have the same problem using a SAM3U4E. Data and time are not being retained when there is a backup power supply connected.

Thanks.

Return to “SAM3 Cortex-M3 MCU”

Who is online

Users browsing this forum: No registered users and 3 guests