Hi dialog,
I am a engineer who develop the da14681 for a personal smart device.Now i am facing a questions with the hibernation sleep mode: I uses a external interrupt to wake it up by GPIO,however,my da14681 can't leave the hibernation after it go to that mode.When I uses the deep sleep mode,my da14681 can easily enter and exit that mode.So,Are there any mistakes in my setting with hibernation mode ?By the way,my SDK version is 1.0.6.968.Thanks a lot.
Keywords:
Device:
嗨cjwdialog,
Can you post the code you are using to configure wake up event via GPIO and the code used to put the DA14681 into hibernation mode.
In addition i would strongly recommend upgrading to the latest SDK (version 1.0.14) as we have many fixes and improvements over the version you are currently using.
Best regards
IM_Dialog
Hi IM_Dialog,
This my code put the DA14681 into hibernation mode:"pm_set_sleep_mode(pm_mode_hibernation);",It's simple,isn't it?
This my code uses to configure wake up event via GPIO:
void hibernation_wkup_init(void)
{
hw_wkup_init(NULL);
hw_wkup_reset_counter();
hw_wkup_set_debounce_time(0);
hw_wkup_set_counter_threshold(1);
hw_wkup_set_pin_trigger(GPIO_PORT_K1, GPIO_PIN_K1, HW_WKUP_PIN_STATE_LOW);
hw_wkup_set_pin_state(GPIO_PORT_K1, GPIO_PIN_K1, true);
hw_wkup_register_interrupt(hibernation_wkup_handler, configLIBRARY_MAX_SYSCALL_INTERRUPT_PRIORITY);
}
void hibernation_wkup_handler(void)
{
hw_wkup_reset_interrupt ();
hw_cpm_reset_system();
}
Thank you!
嗨cjwdialog,
Could you please clarify where you put the code for the hibernation mode? The most possible reason is that the device wakes up from the hibernation and then enters immediately the hibernation, so it is not able to wake up. It’s important where you put the hibernation mode, so please provide us the code snippet.
Thanks, PM_Dialog