i've written this program to toggle a led on a button click
if the time between two button pushs is less than 3 seconds it doesn't work the handler isn't called , i've to wait a few more seconds between two clicks!!!
why is that, what's the problem thank you!
int main(void)
{
nrf_gpio_cfg_sense_input(BUTTON_1, NRF_GPIO_PIN_NOPULL, NRF_GPIO_PIN_SENSE_LOW);
nrf_gpio_range_cfg_output(BSP_LED_0, BSP_LED_2);
NRF_GPIOTE->INTENSET = GPIOTE_INTENSET_PORT_Msk;
NVIC_EnableIRQ(GPIOTE_IRQn);
while(1)
{
__WFE();
__SEV();
__WFE();
}
}
void GPIOTE_IRQHandler(void)
{
if(NRF_GPIOTE->EVENTS_PORT)
{
NRF_GPIOTE->EVENTS_PORT = 0;
nrf_gpio_pin_toggle(BSP_LED_1);
}
}