From 94a08e9aeadbf11e278f63ea2e0df52d694bbd88 Mon Sep 17 00:00:00 2001 From: Maciej Bocianski Date: Fri, 13 Sep 2019 10:22:14 +0200 Subject: [PATCH] fix systick irq handler setup Remove checking that vectors were copied to RAM as not all targets have NVIC_RAM_VECTOR_ADDRESS defined as public. Instead always call NVIC_SetVector unconditionally as old implementation does. --- rtos/source/TARGET_CORTEX/mbed_rtx_idle.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/rtos/source/TARGET_CORTEX/mbed_rtx_idle.cpp b/rtos/source/TARGET_CORTEX/mbed_rtx_idle.cpp index 36e5d7c036..e8bfb7128e 100644 --- a/rtos/source/TARGET_CORTEX/mbed_rtx_idle.cpp +++ b/rtos/source/TARGET_CORTEX/mbed_rtx_idle.cpp @@ -61,11 +61,9 @@ extern "C" { IRQn_Type irq = OsTimer::get_irq_number(); NVIC_SetPriority(irq, 0xFF); -#ifdef NVIC_RAM_VECTOR_ADDRESS NVIC_SetVector(irq, (uint32_t)handler); -#else MBED_ASSERT(handler == (IRQHandler_t)NVIC_GetVector(irq)); -#endif + if (irq >= 0) { NVIC_EnableIRQ(irq); }