... | ... | @@ -4,10 +4,26 @@ |
|
|
|
|
|
# Overview
|
|
|
|
|
|
This module allows for three tasks to be scheduled:
|
|
|
* The control task, periodic, implemented as an interrupt;
|
|
|
* The application task, implemented as a thread;
|
|
|
* The communication task, implemented as a thread.
|
|
|
This module allows for two kinds of tasks to be scheduled:
|
|
|
|
|
|
* An uninterruptible periodic task;
|
|
|
* Various asynchronous tasks.
|
|
|
|
|
|
## Uninterruptible periodic task
|
|
|
|
|
|
This task is intended at containing all priority control code.
|
|
|
|
|
|
It is implemented as an interrupt triggered by a timer and will run with absolute priority over any other tasks.
|
|
|
|
|
|
## Asynchronous tasks
|
|
|
|
|
|
These tasks are run in background when no other task is running.
|
|
|
|
|
|
They are implemented as threads, each one requiring a stack, thus consuming memory.
|
|
|
|
|
|
The number of tasks available to the user and their stack size can be set in `prj.conf` using respectively `CONFIG_OWNTECH_SCHEDULING_MAX_ASYNCHRONOUS_TASKS` and `CONFIG_OWNTECH_SCHEDULING_ASYNCHRONOUS_TASKS_STACK_SIZE`. Te more tasks available, the more stacks will be configured, consumuing memory. If you know precisely how many tasks of this kind your code use, it is thus a good thing to adapt the maximum number of tasks to this value in order to reduce memory usage. The default number of available tasks is 3, and stack size is 512.
|
|
|
|
|
|
If you do not plan to use such tasks, you can set `CONFIG_OWNTECH_SCHEDULING_ENABLE_ASYNCHRONOUS_TASKS` to `n`, fully disabling the functionality and freeing associated memory.
|
|
|
|
|
|
# Module enable and dependencies
|
|
|
|
... | ... | @@ -15,4 +31,4 @@ This module is loaded by default. The user explicitly has to set `CONFIG_OWNTECH |
|
|
|
|
|
When enabled, this module requires the following module to be enabled:
|
|
|
|
|
|
* [OWNTECH_TIMER_DRIVER](Modules/Timer driver) |
|
|
\ No newline at end of file |
|
|
* [OWNTECH_TIMER_DRIVER](Modules/Timer%20driver) |
|
|
\ No newline at end of file |