mirror of https://github.com/ARMmbed/mbed-os.git
				
				
				
			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.pull/10709/head
							parent
							
								
									ffcceb0cb7
								
							
						
					
					
						commit
						977eea4447
					
				| 
						 | 
				
			
			@ -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
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue