From ad91527023edd964457f001fc690db8369f7794b Mon Sep 17 00:00:00 2001 From: Lingkai Dong Date: Tue, 4 Jun 2019 10:42:43 +0100 Subject: [PATCH] critical_section tests: do not check APP interrupts on NRF52 APP interrupts are masked on SoftDevice BLE stack only, but we have switched to Cordio stack on NRF52 targets. --- TESTS/mbed_hal/critical_section/main.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/TESTS/mbed_hal/critical_section/main.cpp b/TESTS/mbed_hal/critical_section/main.cpp index c3ae160e33..b380972858 100644 --- a/TESTS/mbed_hal/critical_section/main.cpp +++ b/TESTS/mbed_hal/critical_section/main.cpp @@ -28,12 +28,9 @@ using utest::v1::Case; bool test_are_interrupts_enabled(void) { - // NRF5x targets don't disable interrupts when in critical section, instead they mask application interrupts this is due to BLE stack - // (BLE to be operational requires some interrupts to be always enabled) -#if defined(TARGET_NRF52) - // check if APP interrupts are masked for NRF52 boards - return (((NVIC->ISER[0] & __NRF_NVIC_APP_IRQS_0) != 0) || ((NVIC->ISER[1] & __NRF_NVIC_APP_IRQS_1) != 0)); -#elif defined(TARGET_NRF51) + // NRF51 targets don't disable interrupts when in critical section, instead they mask application interrupts. + // This is due to SoftDevice BLE stack (BLE to be operational requires some interrupts to be always enabled) +#if defined(TARGET_NRF51) // check if APP interrupts are masked for other NRF51 boards return ((NVIC->ISER[0] & __NRF_NVIC_APP_IRQS_0) != 0); #else