[rtems commit] bsps/arm: Add BSP_ARMV7M_IRQ_PRIORITY_DEFAULT

Sebastian Huber sebh at rtems.org
Sat Apr 7 17:01:46 UTC 2012


Module:    rtems
Branch:    master
Commit:    5ea637ed2eaccb6545eefefa345eb3dfcfb5276f
Changeset: http://git.rtems.org/rtems/commit/?id=5ea637ed2eaccb6545eefefa345eb3dfcfb5276f

Author:    Sebastian Huber <sebastian.huber at embedded-brains.de>
Date:      Mon Mar 26 18:40:31 2012 +0200

bsps/arm: Add BSP_ARMV7M_IRQ_PRIORITY_DEFAULT

---

 c/src/lib/libbsp/arm/lm3s69xx/include/bsp.h        |    4 +++-
 c/src/lib/libbsp/arm/lpc24xx/include/bsp.h         |    2 ++
 .../lib/libbsp/arm/shared/armv7m/irq/armv7m-irq.c  |    2 +-
 3 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/c/src/lib/libbsp/arm/lm3s69xx/include/bsp.h b/c/src/lib/libbsp/arm/lm3s69xx/include/bsp.h
index 2304544..125504d 100644
--- a/c/src/lib/libbsp/arm/lm3s69xx/include/bsp.h
+++ b/c/src/lib/libbsp/arm/lm3s69xx/include/bsp.h
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011 Sebastian Huber.  All rights reserved.
+ * Copyright (c) 2011-2012 Sebastian Huber.  All rights reserved.
  *
  *  embedded brains GmbH
  *  Obere Lagerstr. 30
@@ -27,6 +27,8 @@ extern "C" {
 
 #define BSP_FEATURE_IRQ_EXTENSION
 
+#define BSP_ARMV7M_IRQ_PRIORITY_DEFAULT (5 << 5)
+
 #ifndef ASM
 
 #endif /* ASM */
diff --git a/c/src/lib/libbsp/arm/lpc24xx/include/bsp.h b/c/src/lib/libbsp/arm/lpc24xx/include/bsp.h
index 62ab748..203a095 100644
--- a/c/src/lib/libbsp/arm/lpc24xx/include/bsp.h
+++ b/c/src/lib/libbsp/arm/lpc24xx/include/bsp.h
@@ -43,6 +43,8 @@ extern "C" {
 
 #define LPC24XX_MPU_REGION_COUNT 8
 
+#define BSP_ARMV7M_IRQ_PRIORITY_DEFAULT (29 << 3)
+
 #define BSP_ARMV7M_SYSTICK_FREQUENCY LPC24XX_CCLK
 
 #ifndef ASM
diff --git a/c/src/lib/libbsp/arm/shared/armv7m/irq/armv7m-irq.c b/c/src/lib/libbsp/arm/shared/armv7m/irq/armv7m-irq.c
index 901034c..d91c93a 100644
--- a/c/src/lib/libbsp/arm/shared/armv7m/irq/armv7m-irq.c
+++ b/c/src/lib/libbsp/arm/shared/armv7m/irq/armv7m-irq.c
@@ -52,7 +52,7 @@ rtems_status_code bsp_interrupt_facility_initialize(void)
     vector_table [ARMV7M_VECTOR_IRQ(i)] = _ARMV7M_NVIC_Interrupt_dispatch;
     _ARMV7M_NVIC_Clear_enable(i);
     _ARMV7M_NVIC_Clear_pending(i);
-    _ARMV7M_NVIC_Set_priority(i, ARMV7M_EXCEPTION_PRIORITY_LOWEST);
+    _ARMV7M_NVIC_Set_priority(i, BSP_ARMV7M_IRQ_PRIORITY_DEFAULT);
   }
 
   _ARMV7M_SCB->vtor = vector_table;




More information about the vc mailing list