Beware that this post is related to an SDK in maintenance mode
More Info: Consider nRF Connect SDK for new designs
This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Port the scheduler to another environment

Hello guys,

I would like to know something more about the scheduler whose implementation can be found under SDK_ROOT/components/libraries/scheduler.

Our idea is to apply the same approach to a different environment that is not based on the ARM Cortex-M processor. Is it possible to port the scheduler library to a different working environment? Is there anything specific to Nordic or ARM Cortex-M processor that would stop us from porting the library?

Thanks in advance for your time and efforts!

Sincerely,

Bojan.

Parents Reply Children
  • If the data these two different tasks are processing is of less than the max fifo element size, then you can do this. 

    Note that this way will only work if there is only one element in the app_scheduler fifo. For example if 

    1. If Task1 put one event using app_sched_event_put
    2. Task 2 pulls out the element (0 left in queue) and pushes two new elements into the queue.
    3. Now task1 executes app_sched_execute while there are two elements in the queue but got interrupted after processing one.
    4. Task2 executes app_Sched_execute and finds one element that was inserted by Task2 and Task2 itself will process this instead of Task2.

    I would strongly recommend you to use FreeRTOS queues if your task communication is getting a bit complex.

Related