modm API documentation
|
#include <modm/processing/rtos/scheduler.hpp>
Static Public Member Functions | |
static void | schedule () |
Starts the real time kernel. More... | |
static TickType_t | getTicks () |
The count of ticks since Scheduler::schedule() was called. | |
FreeRTOS Scheduler
Interrupt Priorities
The STM32 implements only four priority bits. The lower four bits of the eight bit priority register are unused. A lower value means a higher priority. Therefore 0 (=0) is the highest priority and 15 (=15 << 4 => 0xf0) is the lowest priority.
The Kernel has the lowest possible priority 15 to make sure that it is not interrupting any other interrupt. During the execution of an API function the priority is raised to 11.
Any interrupt that calls an API function must have a priority between 15 and 11, otherwise the system might crash.
Interrupts that do not use any FreeRTOS API functions can use any interrupt priority. If the priority is higher (lower value) than 11 the execution won't be delayed by anything the kernel is doing.
|
inlinestatic |
Starts the real time kernel.
Starts the SysTick Timer (1ms period) and attaches to its interrupt.
The idle thread is created automatically when schedule() is called.