Getting Started with RTOSes
RTOS on an MCU
The range of situations where an RTOS offers benefits keeps expanding—even into the MCU space. Stuart reviews the basics of the technology and shares the details of his project to run a simple RTOS application on an MCU.
Topics Discussed
What are the basics of running an RTOS on an MCU?What is real-time?How does preemptive scheduling work?Looking at a USB task exampleHow an RTOS prioritizes tasksHow to use FreeRTOS
Tech Used
FreeRTOSTexas Instruments' TM4C1233D5 MCUTexas Instruments' TI-RTOS
First, let’s examine the question: What is an RTOS (real-time operating system)? A computer operating system (OS) such as Windows or Linux or Android provides a basic infrastructure on a PC, laptop or smartphone. It has a standardized API (application programming interface) for applications and hardware drivers. It will have a user interface, usually a GUI on modern operating systems. It provides a standard set of functions that allow applications to read and write storage (hard drive or flash memory), to capture mouse or keyboard actions and to display text or graphics on the display. The OS manages memory, storage access, focusing on different windows in the display and all the other routine things that you use every day on your PC.
A real-time operating system is optimized for real-time systems, typically a microcontroller (MCU). In most cases, an RTOS is used for a single purpose, such as a medical instrument or an avionics product, or the electronic ignition module in your car. An RTOS used in such an application does not need all the capabilities of a full OS. The user doesn’t install programs; all the programs it will use are embedded in the device when it is manufactured. The user interface, if there is one, is usually customized for the product. The electronic ignition module in your car might not communicate directly to the driver at all. Another device might just have a simple LCD display. A dishwasher might just have som