雷竞技电竞平台对话框半导体客户支持——关键按钮
https://support.dialog-semiconductor.com/resource-keywords/key-button en Key/Button interrupt stop function after several seconds
https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-42-%E2%80%93-software/keybutton-interrupt-stop-function

Dear Sir,
I have the DA14681 DEV KIT PRO and I try to run demo on it. It's work well, however after i register an interrupt on the K1 pin (port 1 , pin 6) to turn on D2(orange LED, port 1, pin 5) when trigger by below code on demo ble_multi_link / pxp_reporter. it's work normally for around 10~20 seconds, but after that the D12(blue LED) start blinking and stop blinking finally , D2 turn off and the interrupt of K1 will not work anymore. Please suggest what should I do to keep the interrupt working. Thanks.

static void system_init( void *pvParameters )
{ ...
hw_gpio_reserve_and_configure_pin(HW_GPIO_PORT_1, HW_GPIO_PIN_5, HW_GPIO_MODE_OUTPUT,
HW_GPIO_FUNC_GPIO,HW_WKUP_PIN_STATE_LOW);
hw_gpio_reserve_and_configure_pin(HW_GPIO_PORT_1, HW_GPIO_PIN_6, HW_GPIO_MODE_INPUT,
HW_GPIO_FUNC_GPIO,HW_WKUP_PIN_STATE_LOW);

//add interrupt
hw_wkup_init(NULL);
hw_wkup_set_counter_threshold(1);
hw_wkup_register_interrupt(wkup_intr_cb, 1);
hw_wkup_configure_pin(HW_GPIO_PORT_1, HW_GPIO_PIN_6, true, HW_WKUP_PIN_STATE_LOW);
hw_wkup_set_debounce_time(50);
...
}
static int counter=0;
static void wkup_intr_cb(void)
{
/*
* Interrupt handler should always reset interrupt state, otherwise it will be called again.
*/
hw_wkup_reset_interrupt();
printf("Wake up interrupt triggered %d\r\n",counter++);
hw_gpio_set_active(HW_GPIO_PORT_1,HW_GPIO_PIN_5);
}

Keywords: 
Device: 
Tue, 06 Dec 2016 09:13:16 +0000 Ken Chong 5004 at https://support.dialog-semiconductor.com https://support.dialog-semiconductor.com/forums/post/dialog-smartbond-bluetooth-low-energy-42-%E2%80%93-software/keybutton-interrupt-stop-function#comments