From b951ec346b7e31db4827093e9b3ba2c1f2416c93 Mon Sep 17 00:00:00 2001 From: Bjarki Arge Andreasen Date: Fri, 10 Oct 2025 11:56:55 +0200 Subject: [PATCH 1/2] manifest: update manifest update Signed-off-by: Bjarki Arge Andreasen --- west.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/west.yml b/west.yml index 4a7a14a44c..c22777bc37 100644 --- a/west.yml +++ b/west.yml @@ -14,7 +14,7 @@ manifest: projects: - name: nrf repo-path: sdk-nrf - revision: f0af8f2008d39bcb46516554d00611ac7fd87d5d + revision: pull/24966/head import: name-allowlist: - cmsis_6 From 7572386219624b298a4a0bbb209c98531f882983 Mon Sep 17 00:00:00 2001 From: Bjarki Arge Andreasen Date: Fri, 10 Oct 2025 11:57:54 +0200 Subject: [PATCH 2/2] samples: drivers: subsys: Don't use SW ISR table The software ISR table is not required if multithreading is not used, and no argument is passed to the irq handlers. Update all drivers, samples and subsystems to not use the SW ISR table and exclude it from the build. This saves approximately 2K ROM for all builds. Signed-off-by: Bjarki Arge Andreasen --- applications/installer/prj.conf | 1 + ..._nrf54l05_cpuapp_s115_softdevice_defconfig | 3 ++ ...5_cpuapp_s115_softdevice_mcuboot_defconfig | 3 ++ ..._nrf54l10_cpuapp_s115_softdevice_defconfig | 3 ++ ...0_cpuapp_s115_softdevice_mcuboot_defconfig | 3 ++ ..._nrf54l15_cpuapp_s115_softdevice_defconfig | 3 ++ ...5_cpuapp_s115_softdevice_mcuboot_defconfig | 3 ++ drivers/console/console_bm_uarte.c | 13 +++++--- lib/bm_buttons/bm_buttons.c | 22 ++++++++++--- samples/Kconfig | 4 +++ samples/bluetooth/ble_nus/src/main.c | 32 +++++++++++++++---- samples/peripherals/lpuarte/src/main.c | 31 ++++++++++++++---- samples/peripherals/pwm/src/main.c | 11 +++++-- samples/peripherals/uarte/src/main.c | 12 +++++-- .../logging/backends/log_backend_bm_uarte.c | 13 +++++--- .../mcumgr/transport/src/bm_uart_mcumgr.c | 12 +++++-- subsys/softdevice_handler/nrf_sdh.c | 6 ++-- 17 files changed, 139 insertions(+), 36 deletions(-) diff --git a/applications/installer/prj.conf b/applications/installer/prj.conf index 0a94c5aa81..79e7b01849 100644 --- a/applications/installer/prj.conf +++ b/applications/installer/prj.conf @@ -5,6 +5,7 @@ CONFIG_IMG_MANAGER=y CONFIG_CRC=y CONFIG_REBOOT=y CONFIG_MULTITHREADING=n +CONFIG_GEN_SW_ISR_TABLE=n CONFIG_USE_DT_CODE_PARTITION=y CONFIG_MAIN_STACK_SIZE=8192 diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice_defconfig b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice_defconfig index c2087ec652..9378fe91b5 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice_defconfig +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice_defconfig @@ -36,6 +36,9 @@ CONFIG_PARTITION_MANAGER_ENABLED=n CONFIG_MULTITHREADING=n CONFIG_ZERO_LATENCY_IRQS=y +# Disable generation of the redundant SW ISR table +CONFIG_GEN_SW_ISR_TABLE=n + # Allow FLASH writes CONFIG_MPU_ALLOW_FLASH_WRITE=y diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice_mcuboot_defconfig b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice_mcuboot_defconfig index c2087ec652..9378fe91b5 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice_mcuboot_defconfig +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l05_cpuapp_s115_softdevice_mcuboot_defconfig @@ -36,6 +36,9 @@ CONFIG_PARTITION_MANAGER_ENABLED=n CONFIG_MULTITHREADING=n CONFIG_ZERO_LATENCY_IRQS=y +# Disable generation of the redundant SW ISR table +CONFIG_GEN_SW_ISR_TABLE=n + # Allow FLASH writes CONFIG_MPU_ALLOW_FLASH_WRITE=y diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice_defconfig b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice_defconfig index c2087ec652..9378fe91b5 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice_defconfig +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice_defconfig @@ -36,6 +36,9 @@ CONFIG_PARTITION_MANAGER_ENABLED=n CONFIG_MULTITHREADING=n CONFIG_ZERO_LATENCY_IRQS=y +# Disable generation of the redundant SW ISR table +CONFIG_GEN_SW_ISR_TABLE=n + # Allow FLASH writes CONFIG_MPU_ALLOW_FLASH_WRITE=y diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice_mcuboot_defconfig b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice_mcuboot_defconfig index c2087ec652..9378fe91b5 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice_mcuboot_defconfig +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l10_cpuapp_s115_softdevice_mcuboot_defconfig @@ -36,6 +36,9 @@ CONFIG_PARTITION_MANAGER_ENABLED=n CONFIG_MULTITHREADING=n CONFIG_ZERO_LATENCY_IRQS=y +# Disable generation of the redundant SW ISR table +CONFIG_GEN_SW_ISR_TABLE=n + # Allow FLASH writes CONFIG_MPU_ALLOW_FLASH_WRITE=y diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice_defconfig b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice_defconfig index c2087ec652..9378fe91b5 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice_defconfig +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice_defconfig @@ -36,6 +36,9 @@ CONFIG_PARTITION_MANAGER_ENABLED=n CONFIG_MULTITHREADING=n CONFIG_ZERO_LATENCY_IRQS=y +# Disable generation of the redundant SW ISR table +CONFIG_GEN_SW_ISR_TABLE=n + # Allow FLASH writes CONFIG_MPU_ALLOW_FLASH_WRITE=y diff --git a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice_mcuboot_defconfig b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice_mcuboot_defconfig index c2087ec652..9378fe91b5 100644 --- a/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice_mcuboot_defconfig +++ b/boards/nordic/bm_nrf54l15dk/bm_nrf54l15dk_nrf54l15_cpuapp_s115_softdevice_mcuboot_defconfig @@ -36,6 +36,9 @@ CONFIG_PARTITION_MANAGER_ENABLED=n CONFIG_MULTITHREADING=n CONFIG_ZERO_LATENCY_IRQS=y +# Disable generation of the redundant SW ISR table +CONFIG_GEN_SW_ISR_TABLE=n + # Allow FLASH writes CONFIG_MPU_ALLOW_FLASH_WRITE=y diff --git a/drivers/console/console_bm_uarte.c b/drivers/console/console_bm_uarte.c index 470d25cd1c..57c3600723 100644 --- a/drivers/console/console_bm_uarte.c +++ b/drivers/console/console_bm_uarte.c @@ -13,6 +13,12 @@ static const nrfx_uarte_t uarte_inst = NRFX_UARTE_INSTANCE(BOARD_CONSOLE_UARTE_INST); +ISR_DIRECT_DECLARE(console_bm_uarte_direct_isr) +{ + NRFX_UARTE_INST_HANDLER_GET(BOARD_CONSOLE_UARTE_INST)(); + return 0; +} + static int uarte_init(void) { int err; @@ -33,10 +39,9 @@ static int uarte_init(void) uarte_config.interrupt_priority = CONFIG_BM_UARTE_CONSOLE_UARTE_IRQ_PRIO; /** We need to connect the IRQ ourselves. */ - IRQ_CONNECT(NRFX_IRQ_NUMBER_GET( - NRF_UARTE_INST_GET(BOARD_CONSOLE_UARTE_INST)), - CONFIG_BM_UARTE_CONSOLE_UARTE_IRQ_PRIO, - NRFX_UARTE_INST_HANDLER_GET(BOARD_CONSOLE_UARTE_INST), 0, 0); + IRQ_DIRECT_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_UARTE_INST_GET(BOARD_CONSOLE_UARTE_INST)), + CONFIG_BM_UARTE_CONSOLE_UARTE_IRQ_PRIO, + console_bm_uarte_direct_isr, 0); irq_enable(NRFX_IRQ_NUMBER_GET(NRF_UARTE_INST_GET(BOARD_CONSOLE_UARTE_INST))); diff --git a/lib/bm_buttons/bm_buttons.c b/lib/bm_buttons/bm_buttons.c index 36a386ad75..99396504d1 100644 --- a/lib/bm_buttons/bm_buttons.c +++ b/lib/bm_buttons/bm_buttons.c @@ -78,6 +78,18 @@ static void gpiote_uninit(void) nrfx_gpiote_uninit(&gpiote30_instance); } +ISR_DIRECT_DECLARE(gpiote_20_direct_isr) +{ + NRFX_GPIOTE_INST_HANDLER_GET(20)(); + return 0; +} + +ISR_DIRECT_DECLARE(gpiote_30_direct_isr) +{ + NRFX_GPIOTE_INST_HANDLER_GET(30)(); + return 0; +} + static int gpiote_init(void) { int err; @@ -89,8 +101,9 @@ static int gpiote_init(void) return -EIO; } - IRQ_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_GPIOTE_INST_GET(20)) + NRF_GPIOTE_IRQ_GROUP, - IRQ_PRIO, NRFX_GPIOTE_INST_HANDLER_GET(20), 0, 0); + IRQ_DIRECT_CONNECT( + NRFX_IRQ_NUMBER_GET(NRF_GPIOTE_INST_GET(20)) + NRF_GPIOTE_IRQ_GROUP, + IRQ_PRIO, gpiote_20_direct_isr, 0); } if (!nrfx_gpiote_init_check(&gpiote30_instance)) { @@ -100,8 +113,9 @@ static int gpiote_init(void) return -EIO; } - IRQ_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_GPIOTE_INST_GET(30)) + NRF_GPIOTE_IRQ_GROUP, - IRQ_PRIO, NRFX_GPIOTE_INST_HANDLER_GET(30), 0, 0); + IRQ_DIRECT_CONNECT( + NRFX_IRQ_NUMBER_GET(NRF_GPIOTE_INST_GET(30)) + NRF_GPIOTE_IRQ_GROUP, + IRQ_PRIO, gpiote_30_direct_isr, 0); } return 0; diff --git a/samples/Kconfig b/samples/Kconfig index b7a0000714..0e0a3a1417 100644 --- a/samples/Kconfig +++ b/samples/Kconfig @@ -10,6 +10,10 @@ config MULTITHREADING default n if !UNITY +# Software ISR table is not needed if multithreading is not used +config GEN_SW_ISR_TABLE + default n if !MULTITHREADING + # Prevent moving SoftDevice RAM region # Need this when building without sysbuild config PARTITION_MANAGER_ENABLED diff --git a/samples/bluetooth/ble_nus/src/main.c b/samples/bluetooth/ble_nus/src/main.c index 70aa00f9c0..7aedd25a4b 100644 --- a/samples/bluetooth/ble_nus/src/main.c +++ b/samples/bluetooth/ble_nus/src/main.c @@ -348,6 +348,26 @@ static void ble_nus_evt_handler(const struct ble_nus_evt *evt) } } +ISR_DIRECT_DECLARE(uarte_direct_isr) +{ + NRFX_UARTE_INST_HANDLER_GET(NUS_UARTE_INST)(); + return 0; +} + +#if defined(CONFIG_NUS_LPUARTE) +ISR_DIRECT_DECLARE(gpiote_20_direct_isr) +{ + NRFX_GPIOTE_INST_HANDLER_GET(20)(); + return 0; +} + +ISR_DIRECT_DECLARE(gpiote_30_direct_isr) +{ + NRFX_GPIOTE_INST_HANDLER_GET(30)(); + return 0; +} +#endif + /** * @brief Initalize UARTE driver. */ @@ -386,17 +406,17 @@ static int uarte_init(void) /** We need to connect the IRQ ourselves. */ - IRQ_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_UARTE_INST_GET(NUS_UARTE_INST)), - CONFIG_NUS_UART_IRQ_PRIO, NRFX_UARTE_INST_HANDLER_GET(NUS_UARTE_INST), 0, 0); + IRQ_DIRECT_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_UARTE_INST_GET(NUS_UARTE_INST)), + CONFIG_NUS_UART_IRQ_PRIO, uarte_direct_isr, 0); irq_enable(NRFX_IRQ_NUMBER_GET(NRF_UARTE_INST_GET(NUS_UARTE_INST))); #if defined(CONFIG_NUS_LPUARTE) - IRQ_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_GPIOTE_INST_GET(20)) + NRF_GPIOTE_IRQ_GROUP, - CONFIG_GPIOTE_IRQ_PRIO, NRFX_GPIOTE_INST_HANDLER_GET(20), 0, 0); + IRQ_DIRECT_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_GPIOTE_INST_GET(20)) + NRF_GPIOTE_IRQ_GROUP, + CONFIG_GPIOTE_IRQ_PRIO, gpiote_20_direct_isr, 0); - IRQ_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_GPIOTE_INST_GET(30)) + NRF_GPIOTE_IRQ_GROUP, - CONFIG_GPIOTE_IRQ_PRIO, NRFX_GPIOTE_INST_HANDLER_GET(30), 0, 0); + IRQ_DIRECT_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_GPIOTE_INST_GET(30)) + NRF_GPIOTE_IRQ_GROUP, + CONFIG_GPIOTE_IRQ_PRIO, gpiote_30_direct_isr, 0); err = bm_lpuarte_init(&lpu, &lpu_cfg, uarte_evt_handler); if (err != NRFX_SUCCESS) { diff --git a/samples/peripherals/lpuarte/src/main.c b/samples/peripherals/lpuarte/src/main.c index fbb484fcb2..1c8b037132 100644 --- a/samples/peripherals/lpuarte/src/main.c +++ b/samples/peripherals/lpuarte/src/main.c @@ -52,6 +52,24 @@ static void lpuarte_event_handler(nrfx_uarte_event_t const *event, void *ctx) } } +ISR_DIRECT_DECLARE(gpiote_20_direct_isr) +{ + NRFX_GPIOTE_INST_HANDLER_GET(20)(); + return 0; +} + +ISR_DIRECT_DECLARE(gpiote_30_direct_isr) +{ + NRFX_GPIOTE_INST_HANDLER_GET(30)(); + return 0; +} + +ISR_DIRECT_DECLARE(lpuarte_direct_isr) +{ + NRFX_UARTE_INST_HANDLER_GET(BOARD_APP_LPUARTE_INST)(); + return 0; +} + /* Initialize UARTE driver. */ static uint32_t uarte_init(void) { @@ -71,15 +89,14 @@ static uint32_t uarte_init(void) lpu_cfg.uarte_cfg.interrupt_priority = CONFIG_LPUARTE_IRQ_PRIO; - IRQ_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_GPIOTE_INST_GET(20)) + NRF_GPIOTE_IRQ_GROUP, - CONFIG_LPUARTE_GPIOTE_IRQ_PRIO, NRFX_GPIOTE_INST_HANDLER_GET(20), 0, 0); + IRQ_DIRECT_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_GPIOTE_INST_GET(20)) + NRF_GPIOTE_IRQ_GROUP, + CONFIG_LPUARTE_GPIOTE_IRQ_PRIO, gpiote_20_direct_isr, 0); - IRQ_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_GPIOTE_INST_GET(30)) + NRF_GPIOTE_IRQ_GROUP, - CONFIG_LPUARTE_GPIOTE_IRQ_PRIO, NRFX_GPIOTE_INST_HANDLER_GET(30), 0, 0); + IRQ_DIRECT_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_GPIOTE_INST_GET(30)) + NRF_GPIOTE_IRQ_GROUP, + CONFIG_LPUARTE_GPIOTE_IRQ_PRIO, gpiote_30_direct_isr, 0); - IRQ_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_UARTE_INST_GET(BOARD_APP_LPUARTE_INST)), - CONFIG_LPUARTE_IRQ_PRIO, - NRFX_UARTE_INST_HANDLER_GET(BOARD_APP_LPUARTE_INST), 0, 0); + IRQ_DIRECT_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_UARTE_INST_GET(BOARD_APP_LPUARTE_INST)), + CONFIG_LPUARTE_IRQ_PRIO, lpuarte_direct_isr, 0); irq_enable(NRFX_IRQ_NUMBER_GET(NRF_UARTE_INST_GET(BOARD_APP_LPUARTE_INST))); diff --git a/samples/peripherals/pwm/src/main.c b/samples/peripherals/pwm/src/main.c index 21ec235810..2e4c7609c7 100644 --- a/samples/peripherals/pwm/src/main.c +++ b/samples/peripherals/pwm/src/main.c @@ -27,6 +27,12 @@ static void pwm_handler(nrfx_pwm_evt_type_t event_type, void *ctx) curr_loop++; } +ISR_DIRECT_DECLARE(pwm_direct_isr) +{ + NRFX_PWM_INST_HANDLER_GET(20)(); + return 0; +} + int main(void) { nrfx_err_t err; @@ -49,8 +55,9 @@ int main(void) LOG_INF("PWM sample started"); - IRQ_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_PWM_INST_GET(PWM_INST_IDX)), - CONFIG_PWM_IRQ_PRIO, NRFX_PWM_INST_HANDLER_GET(20), 0, 0); + IRQ_DIRECT_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_PWM_INST_GET(PWM_INST_IDX)), + CONFIG_PWM_IRQ_PRIO, + pwm_direct_isr, 0); err = nrfx_pwm_init(&pwm_instance, &config, pwm_handler, &pwm_instance); if (err != NRFX_SUCCESS) { diff --git a/samples/peripherals/uarte/src/main.c b/samples/peripherals/uarte/src/main.c index 31d31d628c..c0a5b8cd78 100644 --- a/samples/peripherals/uarte/src/main.c +++ b/samples/peripherals/uarte/src/main.c @@ -85,6 +85,12 @@ static void uarte_event_handler(nrfx_uarte_event_t const *event, void *ctx) } } +ISR_DIRECT_DECLARE(uarte_direct_isr) +{ + NRFX_UARTE_INST_HANDLER_GET(BOARD_APP_UARTE_INST)(); + return 0; +} + /* Initialize UARTE driver. */ static int uarte_init(void) { @@ -106,9 +112,9 @@ static int uarte_init(void) uarte_config.interrupt_priority = CONFIG_UARTE_IRQ_PRIO; /* We need to connect the IRQ ourselves. */ - IRQ_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_UARTE_INST_GET(BOARD_APP_UARTE_INST)), - CONFIG_UARTE_IRQ_PRIO, - NRFX_UARTE_INST_HANDLER_GET(BOARD_APP_UARTE_INST), 0, 0); + IRQ_DIRECT_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_UARTE_INST_GET(BOARD_APP_UARTE_INST)), + CONFIG_UARTE_IRQ_PRIO, + uarte_direct_isr, 0); irq_enable(NRFX_IRQ_NUMBER_GET(NRF_UARTE_INST_GET(BOARD_APP_UARTE_INST))); diff --git a/subsys/logging/backends/log_backend_bm_uarte.c b/subsys/logging/backends/log_backend_bm_uarte.c index 0871b80d71..cd76cd2fbb 100644 --- a/subsys/logging/backends/log_backend_bm_uarte.c +++ b/subsys/logging/backends/log_backend_bm_uarte.c @@ -20,6 +20,12 @@ static char uarte_tx_buf[CONFIG_LOG_BACKEND_BM_UARTE_BUFFER_SIZE]; static int log_out(uint8_t *data, size_t length, void *ctx); LOG_OUTPUT_DEFINE(bm_lbu_output, log_out, lbu_buffer, CONFIG_LOG_BACKEND_BM_UARTE_BUFFER_SIZE); +ISR_DIRECT_DECLARE(log_backend_bm_uarte_direct_isr) +{ + NRFX_UARTE_INST_HANDLER_GET(BOARD_CONSOLE_UARTE_INST)(); + return 0; +} + static int uarte_init(void) { int err; @@ -42,10 +48,9 @@ static int uarte_init(void) uarte_config.tx_cache.length = sizeof(uarte_tx_buf); /** We need to connect the IRQ ourselves. */ - IRQ_CONNECT(NRFX_IRQ_NUMBER_GET( - NRF_UARTE_INST_GET(BOARD_CONSOLE_UARTE_INST)), - CONFIG_LOG_BACKEND_BM_UARTE_IRQ_PRIO, - NRFX_UARTE_INST_HANDLER_GET(BOARD_CONSOLE_UARTE_INST), 0, 0); + IRQ_DIRECT_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_UARTE_INST_GET(BOARD_CONSOLE_UARTE_INST)), + CONFIG_LOG_BACKEND_BM_UARTE_IRQ_PRIO, + log_backend_bm_uarte_direct_isr, 0); irq_enable(NRFX_IRQ_NUMBER_GET(NRF_UARTE_INST_GET(BOARD_CONSOLE_UARTE_INST))); diff --git a/subsys/mgmt/mcumgr/transport/src/bm_uart_mcumgr.c b/subsys/mgmt/mcumgr/transport/src/bm_uart_mcumgr.c index 2d8a5e5550..db2a914280 100644 --- a/subsys/mgmt/mcumgr/transport/src/bm_uart_mcumgr.c +++ b/subsys/mgmt/mcumgr/transport/src/bm_uart_mcumgr.c @@ -196,6 +196,12 @@ void uart_mcumgr_register(uart_mcumgr_recv_fn *cb) uart_mcumgr_recv_cb = cb; } +ISR_DIRECT_DECLARE(bm_uart_mcumgr_direct_isr) +{ + NRFX_UARTE_INST_HANDLER_GET(BOARD_APP_UARTE_INST)(); + return 0; +} + /** * @brief Initialize UARTE driver. */ @@ -219,9 +225,9 @@ static int bm_uarte_init(void) uarte_config.interrupt_priority = CONFIG_MCUMGR_TRANSPORT_BM_UART_UARTE_IRQ_PRIO; /** We need to connect the IRQ ourselves. */ - IRQ_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_UARTE_INST_GET(BOARD_APP_UARTE_INST)), - CONFIG_MCUMGR_TRANSPORT_BM_UART_UARTE_IRQ_PRIO, - NRFX_UARTE_INST_HANDLER_GET(BOARD_APP_UARTE_INST), 0, 0); + IRQ_DIRECT_CONNECT(NRFX_IRQ_NUMBER_GET(NRF_UARTE_INST_GET(BOARD_APP_UARTE_INST)), + CONFIG_MCUMGR_TRANSPORT_BM_UART_UARTE_IRQ_PRIO, + bm_uart_mcumgr_direct_isr, 0); irq_enable(NRFX_IRQ_NUMBER_GET(NRF_UARTE_INST_GET(BOARD_APP_UARTE_INST))); diff --git a/subsys/softdevice_handler/nrf_sdh.c b/subsys/softdevice_handler/nrf_sdh.c index 7060b79a8d..1ac4586559 100644 --- a/subsys/softdevice_handler/nrf_sdh.c +++ b/subsys/softdevice_handler/nrf_sdh.c @@ -280,15 +280,15 @@ void SD_EVT_IRQHandler(void) #endif /* NRF_SDH_DISPATCH_MODEL */ -static void isr_handler(const void *arg) +ISR_DIRECT_DECLARE(sd_direct_isr) { - ARG_UNUSED(arg); SD_EVT_IRQHandler(); + return 0; } static int sd_irq_init(void) { - IRQ_CONNECT(SD_EVT_IRQn, 4, isr_handler, NULL, 0); + IRQ_DIRECT_CONNECT(SD_EVT_IRQn, 4, sd_direct_isr, 0); irq_enable(SD_EVT_IRQn); return 0;