Applications › Robotics & motor control

RTOS for robotics and motor control

Control loops need deadlines that are met every cycle, not on average. STK provides hard real-time scheduling with kernel-monitored deadlines, on a kernel small enough to leave the CPU to your control code.

Discuss your project See all features

The challenge

Deadlines, not averages

Servo, current and position loops must finish inside a fixed period. One late cycle can mean a stall, vibration or fault.

Mixed workloads

Fast control loops share the MCU with communication stacks, logging and diagnostics that must never delay them.

Faults must stay contained

A bug in a non-critical task should not corrupt control data or stop the machine.

How STK helps

Hard real-time mode

KERNEL_HRT mode with kernel-monitored deadlines and miss callbacks, so a missed cycle can trigger your safe-state handler.

Deadline-based schedulers

Rate Monotonic, Deadline Monotonic and EDF, with worst-case response time analysis for RM and DM.

Multi-core (AMP)

One STK instance per physical core: for example control on one core and communication on the other, with lock-free performance.

MPU isolation

Privileged and user tasks, up to 6 per-task regions reprogrammed on every context switch, plus a hardware stack guard.

Heap-free memory

BlockMemoryPool and BytePool allocators: no fragmentation and no allocation surprises inside the control loop.

Timing you can verify

SEGGER SystemView traces show scheduling on real hardware. See our benchmarks for jitter and CPU-time figures.

A typical setup

  1. Run each control loop as a periodic hard real-time task under EDF (or RM/DM if you prefer fixed priorities) in KERNEL_HRT mode.

  2. Register a deadline-miss callback that puts actuators into a safe state.

  3. Run communication, logging and user interface in lower-urgency, unprivileged tasks restricted by the MPU.

  4. On dual-core MCUs, run one STK instance per core to separate control from everything else.

  5. Verify timing on the target with SystemView before release.

STK is a scheduler, not a robotics or motor-control framework: bring your own HAL, drivers and control algorithms.

Building something like this?

Porting, real-time tuning, certification support and commercial components are available. See services.

Contact us

Other applications: Industrial automationMixed-criticality systemsSecure IoTBattery-powered & consumer devicesAudio & USBEducation & researchMigration from legacy RTOSAll applications