os-less osalSysLock implementation
Posted: Mon Jul 09, 2018 2:27 pm
Hello.
I don't know if os-less OSAL (ha/osal/os-less) is a part of ChibiOS/HAL, but osalSysLock/Unlock behaviour might be confusing on some targets. It invokes __set_BASEPRI(OSAL_IRQ_MAXIMUM_PRIORITY) (except for CortexM0) and OSAL_IRQ_MAXIMUM_PRIORITY is implicitly set to 1. Without taking priority grouping into account this leads to osalSysLock being unable to mask out interrupts. As RTOS port layer macros are not available, the simple workaround I see is to rely on __enable(disable)_irq().
Thank you for your attention.
I don't know if os-less OSAL (ha/osal/os-less) is a part of ChibiOS/HAL, but osalSysLock/Unlock behaviour might be confusing on some targets. It invokes __set_BASEPRI(OSAL_IRQ_MAXIMUM_PRIORITY) (except for CortexM0) and OSAL_IRQ_MAXIMUM_PRIORITY is implicitly set to 1. Without taking priority grouping into account this leads to osalSysLock being unable to mask out interrupts. As RTOS port layer macros are not available, the simple workaround I see is to rely on __enable(disable)_irq().
Thank you for your attention.