Arduino Due in sleep mode

Hi,

Is there somewhere a description how to put the Arduino Due in a sleep mode?
I found some descriptions but they were not valid for the Due (at least to my opinion, they refer to #include <avr/sleep.h>).

Thanks in advance,
Henk

sorry but, bump

Hello elnhege,

The sleep mode in the SAM3X8E (Arduino's Due MCU) as one of the three Low Power modes, it's based on the deep-sleep mode of its core(Cortex-M3). Its implementation is done in the PMC (Power Management Controller) register via Wait for Interrupt (WFI) or Wait for Event (WFE) instructions. There is also a deep sleep function using the SCR register. You can find information about this sleep mode in the doc11057.pdf, sections 5.5.1 and 12.8.

If you want to explore more the sleep mode functions in the Arduino Due library, you can check the pmc.c file (lines 972-982).

C:\Users\YourName\Downloads\arduino-1.5.2-windows\arduino-1.5.2\hardware\arduino\sam\system\libsam\source

Regards!

@Palliser, thanks for the usefull information. I will investigate it to see how I can use it.

Does anybody know news about this topic ?
I think it's very important because the current draw of Arduino Due is about 50mA in IDLE...

Hi all!
I'm a real newbbby in arduino, and I find a lot of problems to realize a soil moisture monitoring system with Arduino Due board and 10 SM100 or EC5 soil moisture capacitative sensors.
First of all the system is to much power expensive, and I can't find a sketch in web to realize a sleep mode dynamic..

ANYONE could help me with this sleep mode problem????!!!

thanks for intererst in my problem! ^____^

Inserting

void __WFE(void);

should do the job. The controller then wakes up on interrupts and events.

regards

floce

Are there any reference codes available to turn off IOs on Arduino Due?

You can use "void pmc_enable_sleepmode(uint8_t uc_type)" library call to enter into sleep mode. It prepares the PMC_FSMR register for sleep mode, then if "uc_type" is zero, the it executes "__WFI()" otherwise it executes "__WFE()".

I tested it with parameter zero ("__WFI()"): it worked as expected, the MCU went into sleep, then serial interrupts, the timer interrupt and any other activated interrupts waked up the MCU.

Hello Everyone,

Does anybody has a code how to make Arduino Due sleep.

I have tried with pmc_enable_sleepmode(uint8_t uc_type) but it still does not goes to sleep mode.

If someone already did it, could you please upload the code here, I need it ASAP for my project.

Thanks in Advance,

Gor12

A homogeneous Arduino API should be create to control sleep modes of AVR and ARM-based boards.

Hello Osqui,

I have designed the Frankenstein DUE PCB http://wood-walker.org/wiki/doku.php/en/frankenstein-due for my Wood-Walker creature project.

I fully operate it with the Arduino IDE acting as an Arduino DUE. I am in a development phase but documented some of the energy saving things here:
http://wood-walker.org/wiki/doku.php/en/power_management_controller_pmc

I would be happy to give you some support -- but would be happy also to get support with this from others - I am quite on the beginning of all of this :wink:

Hi everyone,

I am new in arduino world. I has started this adventure with Nrf24L01 transmitters and receivers examples available.
Now, my idea is to make a sleep mode in the transmitter during 30 seconds and then wake up and sent the data to the receiver, making it constantly. I think that the idea is basic but I don't know how to code this.

Someone could help me?

I am using arduino DUE

PD: Sorry for my level of English.

I have some question about it. This program continuously runs even it should stop because interrupts are disabled and pmc_enable_sleepmode execute a wfi instruction that should wait until an interrupt.

while (1) {
noInterrupts(); // it calls __disable_irq()
cpu_irq_disable(); it calls __disable_irq() and __DMB()
pmc_enable_sleepmode(0);

digitalWrite(13, digitalRead(13) ^ 1); // blinks the led
for (i = 1; i < 4000000; i++); // wait a little
}

Bumping this thread up to see if anyone has had any progress on this? Steamboat, I went to the link you have above, but found the link to be dead.