From 21643524f9afcb29476a4dd24937f52a122e304d Mon Sep 17 00:00:00 2001 From: Steve Palmer Date: Sat, 8 Jun 2024 12:56:49 +0100 Subject: [PATCH] cpu/nrf5x: fix erroneous mask with INTENSET reg fixes #20736 --- cpu/nrf5x_common/periph/gpio.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cpu/nrf5x_common/periph/gpio.c b/cpu/nrf5x_common/periph/gpio.c index 8b0a77a8fa47..0f762a88029b 100644 --- a/cpu/nrf5x_common/periph/gpio.c +++ b/cpu/nrf5x_common/periph/gpio.c @@ -203,7 +203,7 @@ int gpio_init_int(gpio_t pin, gpio_mode_t mode, gpio_flank_t flank, #endif (flank << GPIOTE_CONFIG_POLARITY_Pos)); /* enable external interrupt */ - NRF_GPIOTE->INTENSET |= (GPIOTE_INTENSET_IN0_Msk << _pin_index); + NRF_GPIOTE->INTENSET = (GPIOTE_INTENSET_IN0_Msk << _pin_index); return 0; } @@ -213,7 +213,7 @@ void gpio_irq_enable(gpio_t pin) for (unsigned int i = 0; i < _gpiote_next_index; i++) { if (_exti_pins[i] == pin) { NRF_GPIOTE->CONFIG[i] |= GPIOTE_CONFIG_MODE_Event; - NRF_GPIOTE->INTENSET |= (GPIOTE_INTENSET_IN0_Msk << i); + NRF_GPIOTE->INTENSET = (GPIOTE_INTENSET_IN0_Msk << i); break; } }