HINT: Use the <<< and >>> arrows to navigate this section.
This section presents four contrasting design solutions to a hypothetical embedded real time application. The suitability of each solution is judged for embedded computers with varying RAM, ROM and processing capabilities. In addition the simplicity and corresponding maintainability of each design is assessed.
This is not intended to present an exhaustive list of possible designs, but a guide to the ways in which the FreeRTOS.orgtm real time kernel can be used.
NOTE: These pages have not yet been updated since the introduction of FreeRTOS V4.0.0. V4.0.0 introduces the concept of co-routines which would provide a different and novel solution to those presented here. The Tasks and Co-routines documentation provides further information.

The application will execute on an embedded single board computer that must control a plant while maintaining both local and remote user interfaces.
Depicted above, the system consists of:
Here we are interested in the sequencing and timing requirements, rather than the exact functional requirements.
Each control cycle shall perform the following sequence:
The control function of the embedded computer shall transmit a request every 10ms exactly, and the resultant command shall be transmitted within 5ms of this request. The control algorithm is reliant on accurate timing, it is therefore paramount that these timing requirements are met.
The keypad and LCD can be used by the operator to select, view and modify system data. The operator interface shall function while the plant is being controlled.
To ensure no key presses are missed the keypad shall be scanned at least every 15ms. The LCD shall update within 50ms of a key being pressed.
The LED shall be used to indicate the system status. A flashing green LED shall indicate that the system is running as expected. A flashing red LED shall indicate a fault condition.
The correct LED shall flash on and off once ever second. This flash rate shall be maintained to within 50ms.
The PDA RS232 interface shall be capable of viewing and accessing the same data as the local operator interface, and the same timing constraints apply - discounting any data transmission times.
The embedded WEB server shall service HTTP requests within one second.
The timing requirements of the hypothetical system can be split into three categories:
The control function has a very strict timing requirement as it must execute every 10ms.
While the LED outputs have both maximum and minimum time constraints, there is a large timing band within which they can function.
This includes the keypad, LCD, RS232 and TCP/IP Ethernet communications.
The human interface functions have a different type of timing requirement as only a maximum limit is specified. For example, the keypad must be scanned at least every 10ms, but any rate up to 10ms is acceptable.
NEXT >>> Solution #1: Why use an RTOS kernel?
Any and all data, files, source code, html content and documentation included in the FreeRTOS distribution or available on this site are the exclusive property of Richard Barry.
See the files license.txt (included in the distribution) and this copyright notice for more information. FreeRTOSTM and FreeRTOS.orgTM are trade marks of Richard Barry.