From 56efe5ddcacc0a2707ba5dc891d2591044e3494f Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 29 Nov 2015 09:56:02 +0000 Subject: Fixed bug #675. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@8549 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/nil/ports/ARMCMx/nilcore_v7m.h | 10 ++++++++++ os/rt/ports/ARMCMx/chcore_v7m.h | 10 ++++++++++ .../debug/STM32F7xx-IRQ_STORM (OpenOCD, Flash and Run).launch | 2 +- 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/os/nil/ports/ARMCMx/nilcore_v7m.h b/os/nil/ports/ARMCMx/nilcore_v7m.h index 41c038fcc..3ee6f15a8 100644 --- a/os/nil/ports/ARMCMx/nilcore_v7m.h +++ b/os/nil/ports/ARMCMx/nilcore_v7m.h @@ -455,7 +455,17 @@ static inline bool port_is_isr_context(void) { static inline void port_lock(void) { #if CORTEX_SIMPLIFIED_PRIORITY == FALSE +#if defined(__CM7_REV) +#if __CM7_REV == 0 + __disable_irq(); +#endif +#endif __set_BASEPRI(CORTEX_BASEPRI_KERNEL); +#if defined(__CM7_REV) +#if __CM7_REV == 0 + __enable_irq(); +#endif +#endif #else /* CORTEX_SIMPLIFIED_PRIORITY */ __disable_irq(); #endif /* CORTEX_SIMPLIFIED_PRIORITY */ diff --git a/os/rt/ports/ARMCMx/chcore_v7m.h b/os/rt/ports/ARMCMx/chcore_v7m.h index ab6cf28b9..ed78d1bce 100644 --- a/os/rt/ports/ARMCMx/chcore_v7m.h +++ b/os/rt/ports/ARMCMx/chcore_v7m.h @@ -456,7 +456,17 @@ static inline bool port_is_isr_context(void) { static inline void port_lock(void) { #if CORTEX_SIMPLIFIED_PRIORITY == FALSE +#if defined(__CM7_REV) +#if __CM7_REV == 0 + __disable_irq(); +#endif +#endif __set_BASEPRI(CORTEX_BASEPRI_KERNEL); +#if defined(__CM7_REV) +#if __CM7_REV == 0 + __enable_irq(); +#endif +#endif #else /* CORTEX_SIMPLIFIED_PRIORITY */ __disable_irq(); #endif /* CORTEX_SIMPLIFIED_PRIORITY */ diff --git a/testhal/STM32/STM32F7xx/IRQ_STORM/debug/STM32F7xx-IRQ_STORM (OpenOCD, Flash and Run).launch b/testhal/STM32/STM32F7xx/IRQ_STORM/debug/STM32F7xx-IRQ_STORM (OpenOCD, Flash and Run).launch index 5e40bfc5d..ef5b2a150 100644 --- a/testhal/STM32/STM32F7xx/IRQ_STORM/debug/STM32F7xx-IRQ_STORM (OpenOCD, Flash and Run).launch +++ b/testhal/STM32/STM32F7xx/IRQ_STORM/debug/STM32F7xx-IRQ_STORM (OpenOCD, Flash and Run).launch @@ -33,7 +33,7 @@ - + -- cgit v1.2.3