Hi everyone,
I just had a quick question regarding configMAX_SYSCALL_INTERRUPT_PRIORITY on Cortex-M0+. I understand that this configuration option is not respected on Cortex-M0+, and I’m wondering if it is viable to support it or similar intended functionality thereof (and mind, I plead ignorance on the finer details of the Cortex-M0+ architecture).
FreeRTOS’s critical sections on Cortex-M0+ utilize PRIMASK to disable and re-enable all interrupts. This is a problem for ISRs where lack of responsiveness cannot be tolerated. On other ports (e.g., M3, M4, M33), this is not a problem as configMAX_SYSCALL_INTERRUPT_PRIORITY is respected through the BASEPRI register, which is not supported on Cortex-M0+.
Since NVIC reads and writes on Cortex-M0+ are atomic, would it be possible to take a copy of ISER, disable all interrupts that aren’t N (where N is >=1 interrupt, and N must not be disabled during a critical section), enter the critical section, perform work, and restore the state of ISER?
Am I missing something here?
Thank you,
Mike