mirror of https://github.com/rusefi/ChibiOS.git
Fixed bug #1056.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@13160 27425a3e-05d8-49a3-a47f-9c15f0e5edd8
This commit is contained in:
parent
00e51f2976
commit
a71a2c1733
|
@ -112,6 +112,11 @@
|
|||
#else
|
||||
#define OSAL_IRQ_MAXIMUM_PRIORITY 1
|
||||
#endif
|
||||
|
||||
/**
|
||||
* @brief Converts from numeric priority to BASEPRI register value.
|
||||
*/
|
||||
#define OSAL_BASEPRI(priority) ((priority) << (8U - CORTEX_PRIORITY_BITS))
|
||||
/** @} */
|
||||
|
||||
/*===========================================================================*/
|
||||
|
@ -556,7 +561,7 @@ static inline void osalSysLock(void) {
|
|||
#if CORTEX_MODEL == 0
|
||||
__disable_irq();
|
||||
#else
|
||||
__set_BASEPRI(OSAL_IRQ_MAXIMUM_PRIORITY);
|
||||
__set_BASEPRI(OSAL_BASEPRI(OSAL_IRQ_MAXIMUM_PRIORITY));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -586,7 +591,7 @@ static inline void osalSysLockFromISR(void) {
|
|||
#if CORTEX_MODEL == 0
|
||||
__disable_irq();
|
||||
#else
|
||||
__set_BASEPRI(OSAL_IRQ_MAXIMUM_PRIORITY);
|
||||
__set_BASEPRI(OSAL_BASEPRI(OSAL_IRQ_MAXIMUM_PRIORITY));
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -626,7 +631,7 @@ static inline syssts_t osalSysGetStatusAndLockX(void) {
|
|||
__disable_irq();
|
||||
#else
|
||||
sts = (syssts_t)__get_BASEPRI();
|
||||
__set_BASEPRI(OSAL_IRQ_MAXIMUM_PRIORITY);
|
||||
__set_BASEPRI(OSAL_BASEPRI(OSAL_IRQ_MAXIMUM_PRIORITY));
|
||||
#endif
|
||||
return sts;
|
||||
}
|
||||
|
@ -647,9 +652,7 @@ static inline void osalSysRestoreStatusX(syssts_t sts) {
|
|||
__enable_irq();
|
||||
}
|
||||
#else
|
||||
if (sts == (syssts_t)0) {
|
||||
__set_BASEPRI(0);
|
||||
}
|
||||
__set_BASEPRI(sts);
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
|
@ -133,6 +133,8 @@
|
|||
- HAL: Added a new interface for range-finder devices (used by EX).
|
||||
- HAL: Added mcuconf.h updater tool for STM32F407 (backported to 19.1.1).
|
||||
- NIL: Integrated NIL 4.0.
|
||||
- FIX: Fixed OS-less Cortex-M OSAL problem with critical zones (bug #1056)
|
||||
(backported to 19.1.4)(backported to 18.2.3).
|
||||
- FIX: Fixed missing RTCv1 definitions in STM32F37x registry (bug #1054)
|
||||
(backported to 19.1.4).
|
||||
- FIX: Fixed assertion triggered in STM32 OTGv1 driver (bug #1053)
|
||||
|
|
Loading…
Reference in New Issue