diff --git a/include/zephyr/arch/arm/error.h b/include/zephyr/arch/arm/error.h index 54463bacc80..faed09036d7 100644 --- a/include/zephyr/arch/arm/error.h +++ b/include/zephyr/arch/arm/error.h @@ -35,6 +35,7 @@ extern "C" { */ #define ARCH_EXCEPT(reason_p) \ do {\ + while(1) {}; \ arch_irq_unlock(0); \ __asm__ volatile( \ "mov r0, %[_reason]\n" \ diff --git a/modules/hal_nordic/nrf_802154/include/nrf_802154_assert_zephyr.h b/modules/hal_nordic/nrf_802154/include/nrf_802154_assert_zephyr.h index ecd09de609a..53abc99eeef 100644 --- a/modules/hal_nordic/nrf_802154/include/nrf_802154_assert_zephyr.h +++ b/modules/hal_nordic/nrf_802154/include/nrf_802154_assert_zephyr.h @@ -18,8 +18,8 @@ extern void nrf_802154_assert_handler(void); #define NRF_802154_ASSERT(condition) \ - do { \ - if (!(condition)) { \ + do { \ + if (!(condition)) { while(1) {}; \ nrf_802154_assert_handler(); \ } \ } while (0)