Wakeup Time from Wait Mode Atmel SAM3U

Go To Last Post
3 posts / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Hi,

 

I'm working on a project that involves the microcontroller being asleep most of the time, so i was looking into the different low power modes to ensure that low enough power could be achieved while maintaining a fast enough wakeup time.

 

In the SAM3u Datasheet it says that wakeup time from the WAIT Mode should be around 10us. However, when i try out this very simple code I get a much higher wakeup time : almost 3ms between the time the button is pressed (waking up the SAM through WKUP6 pin) and the LED being set high.

 

 

pmc_enable_periph_clk(ID_SUPC);

pmc_enable_periph_clk(ID_PMC);

PMC->PMC_FSMR |= PMC_FSMR_FSTT6;

sleepmgr_init();

sleepmgr_lock_mode(SLEEPMGR_WAIT_FAST);

sleepmgr_enter_sleep();

 

pio_toggle_pin(LED2);

while(1);

 

 

I'm using ASF in this example, specifically, the sleepmgr module. What's even weirder is that this 3ms time seems to be confirmed in the sleepmgr header file :

 

 

So what am I missing here ? Clearly 3 ms is way too long to be called a fast wakeup, is there any way to reach the 10us mentioned in the datasheet ?

Last Edited: Mon. Apr 16, 2018 - 02:25 PM
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Top Tips:

  1. How to properly post source code - see: https://www.avrfreaks.net/comment... - also how to properly include images/pictures
  2. "Garbage" characters on a serial terminal are (almost?) invariably due to wrong baud rate - see: https://learn.sparkfun.com/tutorials/serial-communication
  3. Wrong baud rate is usually due to not running at the speed you thought; check by blinking a LED to see if you get the speed you expected
  4. Difference between a crystal, and a crystal oscillatorhttps://www.avrfreaks.net/comment...
  5. When your question is resolved, mark the solution: https://www.avrfreaks.net/comment...
  6. Beginner's "Getting Started" tips: https://www.avrfreaks.net/comment...
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

You're right ! I didn't post in the right forum. Thanks to the mods for moving it.