[rtems commit] bsps/arm: Clear pending exceptions for ARMv7-M

Sebastian Huber sebh at rtems.org
Tue Jul 26 08:04:06 UTC 2016


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

Author:    Alexander Krutwig <alexander.krutwig at embedded-brains.de>
Date:      Mon Jul 25 14:51:06 2016 +0200

bsps/arm: Clear pending exceptions for ARMv7-M

---

 c/src/lib/libbsp/arm/shared/armv7m/irq/armv7m-irq.c | 2 ++
 1 file changed, 2 insertions(+)

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 53ab513..6e80c16 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
@@ -50,6 +50,8 @@ rtems_status_code bsp_interrupt_facility_initialize(void)
     );
   }
 
+  _ARMV7M_SCB->icsr = ARMV7M_SCB_ICSR_PENDSVCLR | ARMV7M_SCB_ICSR_PENDSTCLR;
+
   for (i = BSP_INTERRUPT_VECTOR_MIN; i <= BSP_INTERRUPT_VECTOR_MAX; ++i) {
     vector_table [ARMV7M_VECTOR_IRQ(i)] = _ARMV7M_NVIC_Interrupt_dispatch;
     _ARMV7M_NVIC_Clear_enable(i);




More information about the vc mailing list