Skip to content

Commit ad91527

Browse files
LDong-Armadbridge
authored andcommitted
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.
1 parent 2944654 commit ad91527

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

TESTS/mbed_hal/critical_section/main.cpp

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,9 @@ using utest::v1::Case;
2828

2929
bool test_are_interrupts_enabled(void)
3030
{
31-
// NRF5x targets don't disable interrupts when in critical section, instead they mask application interrupts this is due to BLE stack
32-
// (BLE to be operational requires some interrupts to be always enabled)
33-
#if defined(TARGET_NRF52)
34-
// check if APP interrupts are masked for NRF52 boards
35-
return (((NVIC->ISER[0] & __NRF_NVIC_APP_IRQS_0) != 0) || ((NVIC->ISER[1] & __NRF_NVIC_APP_IRQS_1) != 0));
36-
#elif defined(TARGET_NRF51)
31+
// NRF51 targets don't disable interrupts when in critical section, instead they mask application interrupts.
32+
// This is due to SoftDevice BLE stack (BLE to be operational requires some interrupts to be always enabled)
33+
#if defined(TARGET_NRF51)
3734
// check if APP interrupts are masked for other NRF51 boards
3835
return ((NVIC->ISER[0] & __NRF_NVIC_APP_IRQS_0) != 0);
3936
#else

0 commit comments

Comments
 (0)