Program counter after exiting Back up mode?

Moderator: nferre

Posts: 4
Joined: Thu Sep 10, 2015 5:44 pm

Program counter after exiting Back up mode?

Fri Jun 03, 2016 3:00 pm

Hello, I am using a ATSAMS70 and I set back up mode in order to keep RTT between uses and reduce power consumption at its minimum without removing the batteries.

My question is where should the code go after exiting back up mode.
Restarting and going to the line where main function begins or going to a specific interrupt routine?
I am using WKUP pin 4 to wake up the chip.

Before calling "supc_enable_backup_mode(SUPC);", I do:
"pio_disable_interrupt(SWS_PIO, SW1_PIN_MSK);
pio_disable_interrupt(SWS_PIO, SW2_PIN_MSK);
pio_disable_interrupt(SWS_PIO, SW3_PIN_MSK);

//Level detection
pio_configure_interrupt(SWS_PIO, SW4_PIN_MSK, SWS_ATTR_BOTHMODES);
supc_set_wakeup_inputs(SUPC, SUPC_WUIR_WKUPEN4, SUPC_WUIR_WKUPT4_LOW);
supc_set_wakeup_mode(SUPC, 0); "

I would like to confirm if my board behaves correctly.
Thanks in advance!

Return to “SAM9-based”

Who is online

Users browsing this forum: No registered users and 3 guests