This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Button event is not being generated with example project

Hello, I am working with both QFABA0 devices as well as a QFAAC0. Because of the outdated silicon I am constrained to SDK V4.x and SD V5.x

My current test setup is

I am using custom circuit boards that have worked previously. The software modification is that I have set NRF6310_BUTTON_0 to 30, the location of my button.

This code works:

int main(void)
{
    leds_init();
		nrf_gpio_cfg_input(30, NRF_GPIO_PIN_NOPULL);
	for(;;)
	{
		if (nrf_gpio_pin_read(30))
			nrf_gpio_pin_clear(ADVERTISING_LED_PIN_NO);
		else
			nrf_gpio_pin_set(ADVERTISING_LED_PIN_NO);
	}

therefore, I am convinced the hardware works correctly (LED displays inverse of pin state)

When using the example regularly, button_event_handler is never called. In fact, GPIOTE_IRQHandler is never called either. Something tells me this is related to softdevice interrupt redirection. Could it possibly be my keil toolchain?

Parents
  • This isn't very obvious, but is this in an application which does not use the softdevice? If so, you'll have to manually start the LFCLK, and also make sure to initialize the app_timer module, since app_button depends on it.

    For an example of how to start the LFCLK manually, you can refer to the rtc_example. If this does not solve your problem, can you please supply your full project, so that I can test it here?

Reply
  • This isn't very obvious, but is this in an application which does not use the softdevice? If so, you'll have to manually start the LFCLK, and also make sure to initialize the app_timer module, since app_button depends on it.

    For an example of how to start the LFCLK manually, you can refer to the rtc_example. If this does not solve your problem, can you please supply your full project, so that I can test it here?

Children
No Data
Related