Hi,
i have nrf52 and sdk13.1.
Is this possible. I get NRF_ERROR_INVALID_STATE
.
Hi,
i have nrf52 and sdk13.1.
Is this possible. I get NRF_ERROR_INVALID_STATE
.
This is an answer to stealth's comment above, and will hopefully help with schef's original question as well.
In the infocenter we can find that the NRF_ERROR_INVALID_STATE
is returned if the driver is not initialized or the pin is already used. In your case the error is returned because the pin is used.
When calling the function
err_code = nrf_drv_gpiote_in_init(BUTTON_0, &configInButton, my_gpio_handler);
the pin will be used, and therefore you should try to uninitialize the pin using the nrf_drv_gpiote_in_uninit() before you can initialize it again as an output pin.
Kind regards
Joakim
Much obliged!
Much obliged!