Hi dialog,
I am using the wake up interrupt pin with an external button in my project in order to get the dialog from active to hibernation and from hibernation to active.
It works perfectly for now. However my application would require to trigger the wake up interrupt after a long touch on the button, at least 5s,
Is that possible? The debounce time of the wake up interrupt is limited to 63ms.
Thanks for your help.
问候
Matthieu
Device:
Hi matthieuW,
According to DA14680 datasheet, the maximum denounce time is 63ms, so you will not be able to set up 5sec denounce time at the wake up interrupt. Please have a look at Table 228: WKUP_CTRL_REG (0x50000100) of the datasheet. Although, you can do that with a software implemented approach, by polling a GPIO and check with a counter if the button is pressed for 5 sec. Be aware that in case of waking up from hibernation, the device will wake up before the expiration of the 5 sec, so if the button is pressed more than 5 sec the device will stay in active mode, otherwise it will enter the hibernation again. In case of the active mode, you have to check the value of the counter, and only if the button is pressed for 5sec the chip will enter the hibernation mode.
Thanks, PM_Dialog