Page 1 of 1

can not wake up the system

Posted: Wed Apr 06, 2016 6:01 pm
by Ted353
Hello,
i use SAM D21 and i have problem with awakening microcontroller from standby mode on external interrupt. At connected debugger all work fine but without debugger microcontroller not wake. Please advice on what could be the problem.

Thank you.

My configure extint:

Code: Select all

	struct extint_chan_conf config_extint_chan;
	extint_chan_get_config_defaults(&config_extint_chan);
	
	config_extint_chan.gpio_pin           = PIN_PB02A_EIC_EXTINT2;
	config_extint_chan.gpio_pin_mux       = MUX_PB02A_EIC_EXTINT2;
	config_extint_chan.gpio_pin_pull      = EXTINT_PULL_NONE;
	config_extint_chan.detection_criteria = EXTINT_DETECT_BOTH;
	config_extint_chan.wake_if_sleeping   = true;
	extint_chan_set_config(2, &config_extint_chan);
	
	extint_register_callback(EIC_Callback, 2, EXTINT_CALLBACK_TYPE_DETECT);
	extint_chan_enable_callback(2, EXTINT_CALLBACK_TYPE_DETECT);
	
	NVIC_DisableIRQ(EIC_IRQn);
	NVIC_ClearPendingIRQ(EIC_IRQn);
	NVIC_SetPriority(EIC_IRQn, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
	NVIC_EnableIRQ(EIC_IRQn);

Re: can not wake up the system

Posted: Wed Apr 13, 2016 8:30 am
by sarlacii
Greetings

I have found that the ASF is a much safer bet when trying to implement things like standby power saving. Directly doing this you will have to check that you have all the issues covered. Are you sure that you are waking up you clock source correctly?