What is the most effecient method to start a freeRTOS task only after an ISR is completed and flag or something set by ISR that triggers freeRTOS task.
Lets take an example scenario , I have STM32F3 nucleo board in which i would like to toggle two different led’s using freeRTOS task by using xTaskCreate . Also i want to Serial read a character say ‘T’ (T-toggel just random) using DMA which will generate interrupt on tranfer complete, the corresponding Interrupt Service Routine should have a method/flag to trigger/execute the tasks created (toggling of LED’s). Once the two tasks are completed should wait for the arrival of character ‘T’ over Serial.
Any IDE is ok for explanation and preferably ST’s standard periperal library (if any good heart would like to provide entire code structure as an eaxmple/explanation )
What is the most effecient method to start a freeRTOS task only after an
ISR is completed and flag or something set by ISR that triggers freeRTOS
task.
If you must create a task, then you can’t do that directly in an ISR,
but you can pend a function that starts them from the RTOS daemon task
(aka the timer task).
If the daemon task is the highest priority task then it will run after
the ISR, execute the function that creates the task you want, which will
create the tasks.
Any IDE is ok for explanation and preferably ST’s standard periperal
library (if any good heart would like to provide entire code structure
as an eaxmple/explanation )
So this sight remains narrowly focused on helping people with FreeRTOS
my preference is not to provide support for third party libraries here -
FreeRTOS runs on many different architectures.
To be precise i don’t want any task to be dynamically created by ISR, instead i’m interested in something like this https://docs.aws.amazon.com/freertos-kernel/latest/ref/reference125.html in which the previously existing task should be in suspended state and once ISR is triggered, the ISR should unblock the existing task ( by using any FreeRTOS API ) and should be executed.