Skip to content

nordic: use portable IRQ pending API in drivers/socs - #117388

Open
nashif wants to merge 7 commits into
zephyrproject-rtos:mainfrom
nashif:topic/irq-pending/nordic
Open

nordic: use portable IRQ pending API in drivers/socs#117388
nashif wants to merge 7 commits into
zephyrproject-rtos:mainfrom
nashif:topic/irq-pending/nordic

Conversation

@nashif

@nashif nashif commented Aug 26, 2026

Copy link
Copy Markdown
Member
  • arch: posix: implement the IRQ pending-state operations
  • drivers: timer: nrf_rtc: use portable IRQ pending API
  • drivers: serial: nrfx_uart: use portable IRQ pending API
  • drivers: usb: nrf: use portable IRQ pending API
  • drivers: entropy: nrf5: use portable IRQ pending API
  • Bluetooth: controller: nrf5: use portable IRQ pending API
  • boards: qemu: cortex_m0: use portable IRQ pending API

nashif added 7 commits August 25, 2026 18:39
Wire arch_irq_set_pending(), arch_irq_clear_pending() and
arch_irq_is_pending() to the posix_sw_*_pending_IRQ() interface that
every POSIX-arch board (native_sim, the bsim boards) implements, and
select ARCH_HAS_IRQ_PENDING_OPS. The set and clear entry points already
existed; the pending-state query is new and is backed by the native
simulator's interrupt controller status on both board families.

This lets drivers shared between real hardware and the simulated
boards -- the Nordic timer, entropy, USB and Bluetooth controller
code in particular -- use the portable k_irq_*_pending() API instead
of CMSIS NVIC calls that the simulation boards have to emulate.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Replace direct NVIC_SetPendingIRQ()/NVIC_ClearPendingIRQ() calls with
k_irq_set_pending()/k_irq_clear_pending(). The portable API is backed by
the NVIC on the Nordic hardware targets and by the POSIX-arch board
interface on the simulated bsim targets, so the CMSIS emulation layer
is no longer involved.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Replace direct NVIC_SetPendingIRQ()/NVIC_ClearPendingIRQ() calls with
k_irq_set_pending()/k_irq_clear_pending(). The portable API is backed by
the NVIC on the Nordic hardware targets and by the POSIX-arch board
interface on the simulated bsim targets, so the CMSIS emulation layer
is no longer involved.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Replace direct NVIC_SetPendingIRQ()/NVIC_ClearPendingIRQ() calls with
k_irq_set_pending()/k_irq_clear_pending(). The portable API is backed by
the NVIC on the Nordic hardware targets and by the POSIX-arch board
interface on the simulated bsim targets, so the CMSIS emulation layer
is no longer involved.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Replace direct NVIC_SetPendingIRQ()/NVIC_ClearPendingIRQ() calls with
k_irq_set_pending()/k_irq_clear_pending(). The portable API is backed by
the NVIC on the Nordic hardware targets and by the POSIX-arch board
interface on the simulated bsim targets, so the CMSIS emulation layer
is no longer involved.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Replace direct NVIC_SetPendingIRQ()/NVIC_ClearPendingIRQ() calls with
k_irq_set_pending()/k_irq_clear_pending(). The portable API is backed by
the NVIC on the Nordic hardware targets and by the POSIX-arch board
interface on the simulated bsim targets, so the CMSIS emulation layer
is no longer involved.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Replace direct NVIC_SetPendingIRQ()/NVIC_ClearPendingIRQ() calls with
k_irq_set_pending()/k_irq_clear_pending(). The portable API is backed by
the NVIC on the Nordic hardware targets and by the POSIX-arch board
interface on the simulated bsim targets, so the CMSIS emulation layer
is no longer involved.

Assisted-by: Claude:claude-opus-5
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants