Definition
Real-time: is doing something within a specified time constraint
- Hard real time : missing the dead-line consists a system failure
- Soft real time : like video streaming where some buffering is okay
(also called firm real time)
Types of real-time system
-
hardware :
→ Down sides are expensive hard to develop, complex
-
Bare metal (firmware):
→Code that has total control of all aspects of the hardware, this type of implementation excels when there is a small number of relatively simple tasks (or one monolithic task)
RTOS-Based firmware:
- Give the illusion that each task has the processor to itself.
RTOS-Based software:
- Software running on a full OS that has an MMU and a CPU.
- The advantage of ruing a full OS is all of the capabilities that come with it.
Jitter
What is Jitter?:
Is the delay between an event being triggered and being detected.

<aside>
💡
Note that if a system has a maximum amount of jitter the system is considered determistic
</aside>
Interrupts
- Interrupts are signals sent to the MCU or CPU indicating that an event has taken place and directly execute specific code (called an interrupt service routine ISR).
<aside>
💡
In ARM cortex-M, when two interrupts occur one before the other finish executing, the CPU does not restore context to the pre-interrupt state, it continues in the same state and executes the next ISR.
</aside>
- An ISR should be as small as possible (to avoid the risk increasing delay) so generally, an ISR sets a flag in a register or writes a value to an array in RAM.
DMA: Direct Memory Access