From 26f6b71a8e47116b3ab3f41be2d2f8c80b36d525 Mon Sep 17 00:00:00 2001 From: Vinayak Chettimada Date: Tue, 15 Nov 2016 17:22:04 +0100 Subject: [PATCH] Bluetooth: Controller: Fix incorrect irq priority check External interrupts are indexed from value 16, wherein 0 to 15 are ARM cortex M exceptions. Fixed code in _irq_is_priority_equal to fetch correct external interrupt line ISR priority. Change-id: I9cfd411480e78dfc9635e72d14df9d667a9d8400 Signed-off-by: Vinayak Chettimada --- subsys/bluetooth/controller/util/work.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/bluetooth/controller/util/work.c b/subsys/bluetooth/controller/util/work.c index c9bfff93670..435f1d9e99b 100644 --- a/subsys/bluetooth/controller/util/work.c +++ b/subsys/bluetooth/controller/util/work.c @@ -28,7 +28,7 @@ static int _irq_is_priority_equal(unsigned int irq) int curr_prio; curr_ctx = _ScbActiveVectorGet(); - if (curr_ctx > 16) { + if (curr_ctx > 15) { /* Interrupts */ curr_prio = _NvicIrqPrioGet(curr_ctx - 16); } else if (curr_ctx > 3) {