Marvee Amasi
DIIDevHeads IoT Integration Server
•Created by Marvee Amasi on 5/26/2024 in #code-review
Modifying FreeRTOS Interrupt Priorities After Scheduler Initialization
Hey everyone @Middleware & OS , I'm neck-deep in an RTOS project using FreeRTOS. I need to read and potentially modify interrupt priorities after the FreeRTOS scheduler has been kicked off with
vTaskStartScheduler()
. The issue is, NVIC_GetPriority(DMA1_Channel4_IRQn)
seems to behave differently depending on when I call it.
- Before calling vTaskStartScheduler()
, NVIC_GetPriority(DMA1_Channel4_IRQn)
works as expected and reflects the configured priority (11).
- However, after the scheduler starts, the function consistently returns 11, regardless of any changes I try to make within the vTest_NVIC
task.
I've tried using taskENTER_CRITICAL()
and taskEXIT_CRITICAL()
to ensure thread safety, but it doesn't seem to resolve the issue.
What am I missing here? Why does the behavior differ before and after the scheduler starts?4 replies