HI,ALL
my Project can not exit the GPIO INTERRUPT HANDLER.
following is my project.
include "nrf_gpio.h"
include "nrf52.h"
include "boards.h"
define BUTTON_1 13
define LED_1 17
void delay_my(void);
int main(void)
{
nrf_gpio_pin_pull_t config = NRF_GPIO_PIN_PULLUP;
nrf_gpio_pin_sense_t sense = GPIO_PIN_CNF_SENSE_Low;
NRF_GPIOTE->CONFIG[0] = 1<<0 //event
|(BUTTON_1 << 8)
|(2<<16);
nrf_gpio_cfg_output(17);
NRF_GPIOTE->INTENSET = 0x01;
NVIC_SetPriority(GPIOTE_IRQn, 1);
NVIC_ClearPendingIRQ(GPIOTE_IRQn);
NVIC_EnableIRQ(GPIOTE_IRQn);
while(1);
return 0;
}
void GPIOTE_IRQHandler(void)
{
if (NRF_GPIOTE->EVENTS_IN[0] == 1 )
{
NRF_GPIOTE->EVENTS_PORT = 0;
NRF_GPIOTE->TASKS_CLR[0] = 0;
NRF_GPIOTE->EVENTS_IN[0] = 0;
nrf_gpio_pin_toggle(LED_1);
}
}