Hi all,
For a project I need to use a private library which uses the app_scheduler to queue events triggered from a second MCU. I am using FreeRTOS on the nRF and I am unsure how to make the app_scheduler work together with FreeRTOS. The supplier of the library compiled it with the FreeRTOS version of app_timer. So it should be compatible.
After reading the app_scheduler documentation I figured I need to initialise it first. I do this before calling the vTaskStartScheduler() function. But I read I also need to call app_sched_execute() in my main loop to check for items in the event queue and process them.
Now vTaskStartScheduler() does not return, so I don't have such a literal main loop. I am wondering how to make sure tasks in the app_scheduler queue still get executed.
What is the best way to achieve this? I'm currently thinking about creating a task/thread which wil just call app_sched_execute() whenever it gets CPU time but it seems a bit ugly. Is there a cleaner way to use both FreeRTOS and the app_scheduler at the same time?
P.S I also found a post asking the same question but it was never answered: devzone.nordicsemi.com/.../freertos-and-app_scheduler