Board: NRF52840
SDK: 16
Soft Device: s113
So our board is custom and does not contain a crystal. We are treating P0.00 and P0.01 as GPIOs for button inputs. P0.01 works fine but P0.00 does not work and no events are produced despite both being programmed the exact same way.
I understand that those pins are reserved as crystal pins and according to other posts in this forum you should switch all LFCLKSRC to RC when you want to use them as GPIO. This has been done and does not fix the issue. In addition there are no NULL values in the pin configuration. The EE tested the voltage and found that it is oscillating between hi and low when the button is not pressed. Below is how the pins are configured with BSP_BUTTON_0 being the button not working correctly:
static const app_button_cfg_t app_buttons[BUTTONS_NUMBER] = { #ifdef BSP_BUTTON_0 {BSP_BUTTON_0, APP_BUTTON_ACTIVE_LOW, NRF_GPIO_PIN_NOPULL, bsp_button_event_handler}, #endif // BUTTON_0 #ifdef BSP_BUTTON_1 {BSP_BUTTON_1, APP_BUTTON_ACTIVE_LOW, NRF_GPIO_PIN_NOPULL, bsp_button_event_handler}, #endif // BUTTON_1 #ifdef BSP_BUTTON_2 {BSP_BUTTON_2, APP_BUTTON_ACTIVE_LOW, NRF_GPIO_PIN_PULLUP, bsp_button_event_handler}, #endif // BUTTON_2 #ifdef BSP_BUTTON_3 {BSP_BUTTON_3, APP_BUTTON_ACTIVE_LOW, NRF_GPIO_PIN_NOPULL, bsp_button_event_handler}, #endif // BUTTON_3 #ifdef BSP_BUTTON_4 {BSP_BUTTON_4, APP_BUTTON_ACTIVE_LOW, NRF_GPIO_PIN_NOPULL, bsp_button_event_handler}, #endif // BUTTON_4 #ifdef BSP_BUTTON_5 {BSP_BUTTON_5, APP_BUTTON_ACTIVE_LOW, NRF_GPIO_PIN_NOPULL, bsp_button_event_handler}, #endif // BUTTON_5 #ifdef BSP_BUTTON_6 {BSP_BUTTON_6, APP_BUTTON_ACTIVE_LOW, NRF_GPIO_PIN_NOPULL, bsp_button_event_handler}, #endif // BUTTON_6 #ifdef BSP_BUTTON_7 {BSP_BUTTON_7, APP_BUTTON_ACTIVE_LOW, NRF_GPIO_PIN_NOPULL, bsp_button_event_handler}, #endif // BUTTON_7 #ifdef BSP_BUTTON_8 {BSP_BUTTON_8, APP_BUTTON_ACTIVE_LOW, NRF_GPIO_PIN_NOPULL, bsp_button_event_handler}, #endif // BUTTON_8 #ifdef BSP_BUTTON_9 {BSP_BUTTON_9, APP_BUTTON_ACTIVE_LOW, NRF_GPIO_PIN_NOPULL, bsp_button_event_handler}, #endif // BUTTON_9 };
Given this information, any information that could solve this issue with the button not working?