Go Down

Topic: pmc_enable_waitmode() -- how to wake up? (Read 326 times) previous topic - next topic

KassidyKnight

I've been reading through the SAM3x8e datasheet to better understand and implement Wait Mode on my DUE. Does anyone know the correct command for generating a fast startup wakeup event after entering wait mode?

According to the datasheet, to generate fast startup while in wait mode, you must:
1) configure the external lines WKUP0-15 as fast startup wake-up pins
2) detect a low level on one of the wake-up inputs

The code I have right now to ENTER wait mode is:
  pmc_set_writeprotect(0);                                                  //disable write protect of pmc registers
  pmc_set_fast_startup_input(PMC_FSMR_FSTT7);                //enable fast startup, wakeup pin 7
  pmc_enable_waitmode(); 

I have then tried to wake it up using the line:
  PMC->PMC_FSMR |= PMC_FSMR_FSTT7; // Generate fast startup event

This wake up line works, but only once. I cannot re-enter wait mode successfully after executing this line of code.

Go Up