Skip to content

Commit 4beb472

Browse files
committed
Fix upstream issue #171: Better choice of pin interrupt priority
Nordic SoftDevice needs to have control over lowest priority interrupts for reliable, timing sensitive operation. If user code tries to use such a low priority level, SoftDevice refuses to start. One way to overcome this limitation is to start the SoftDevice before attaching pin change interrupts, though in such a case, SD will cap the effective priority of the user interrupt anyway and it is a common mistake API users do. This change simply changes the priority to 2, which is legal (for fast interrupt handlers anyway) under SoftDevice, no matter if attached before of after SD start.
1 parent 6c32bd8 commit 4beb472

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cores/nRF5/WInterrupts.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ static void __initialize()
4242

4343
NVIC_DisableIRQ(GPIOTE_IRQn);
4444
NVIC_ClearPendingIRQ(GPIOTE_IRQn);
45-
NVIC_SetPriority(GPIOTE_IRQn, 1);
45+
NVIC_SetPriority(GPIOTE_IRQn, 2);
4646
NVIC_EnableIRQ(GPIOTE_IRQn);
4747
}
4848

0 commit comments

Comments
 (0)