📋 Challenge
The previous solution based on a commercial RTOS suffered from:
- Unpredictable latency spikes up to 15µs
- Complex licensing for multi-product deployment
- Excessive RAM usage (45KB for kernel alone)
- Poor integration with custom EtherCAT stack
✓ Solution
NitroOS provided the determinism and efficiency needed:
- Hand-optimized assembly scheduler for M7
- Priority ceiling protocol for mutex handling
- Zero-copy message passing between tasks
- Tight integration with DMA for ADC/PWM
+------------------+ +------------------+ +------------------+
| EtherCAT Task | | Control Loop | | Safety Task |
| Priority: 3 | | Priority: 7 | | Priority: 6 |
| Period: 1ms | | Period: 20us | | Period: 100us |
+--------+---------+ +--------+---------+ +--------+---------+
| | |
v v v
+------------------------------------------------------------------------+
| NitroOS Kernel (2.8KB) |
| - Preemptive scheduler - Hardware timers - Priority inheritance |
+------------------------------------------------------------------------+
| | |
+--------v--------+ +--------v--------+ +--------v--------+
| EtherCAT HW | | PWM + ADC | | Watchdog |
| (DMA-driven) | | (DMA-driven) | | + Fault GPIO |
+-----------------+ +-----------------+ +-----------------+
"We evaluated three RTOS solutions. NitroOS was the only one that met our sub-microsecond jitter requirement while fitting in our RAM budget. The assembly-optimized kernel made the difference."
- Lead Firmware Engineer, Industrial Equipment Manufacturer (Germany)