FreeRTOS — A Real Real-Time TV Transmissions
Fundamental Understanding about FreeRTOS Apps — IoT — Episode #05
Hi, in this post I hope I can transmit these pieces of information:
- Real-Time System: what is it really?
- How to install FreeRTOS support libraries — SDK-ESP32;
- How to create your first hello world app;
But first, one question: A F-1 Grand-Prix is always transmitted in real-time?
Mostly certainly not, and I will explain why:
Let us begin with the old days' processors.
In the late 1950s, International Business Machines (IBM) on their 7030 mainframe computers create this Minimal instruction set computers (MISC) that could execute instructions in one cycle with no need for pipelines.
A similar idea introduced only a few years ago was to execute multiple instructions in parallel on separate arithmetic logic units (ALUs). Instead of operating on only one instruction at a time, the CPU will look for several similar instructions that do not depend on each other and execute them in parallel. This approach is called superscalar processor design.
Shifting our focus to the present day and we have desktop computers running over a multitasking OS.
Windows is one example and it is multitasking!
To ensure the best user experience these modern computers should respond to each input within a preferred time limit — but a response falling outside of this limit will not render the computer inoperative.
As an example, key presses must be visibly registered within a certain time the key is pressed. Registering a keypress outside of this time could result in the system seeming unresponsive, but not unusable.
A user may run a word processor, a spreadsheet, an email client, and a WEB browser all at the same time and would expect each application to respond adequately to input at all the time. Input processing on a desktop computer can be classified as soft real-time.
But how about embedded systems?
It has a completely different objective: it is a pre-deterministic system!
Hard real-time functions must complete within a given time limit — failure to do so will result in absolute failure of the system. The airbag triggering mechanism in a car is an example of a hard real-time function. The airbag must deploy within a given time limit of an impact. A response falling outside of this time limit can result in the driver sustaining injuries that would otherwise have been avoided

So, an embedded system is conceptually similar to multitasking in a desktop system to the point that it describes multiple threads of execution using a single processor. However, the objectives of real-time embedded systems are likely to be quite different from that of desktops — especially when the embedded system is expected to provide hard real-time behavior. Hard real-time functions must complete within a given time limit — failure to do so will result in absolute failure of the system.
So here is the answer to this first question, A F-1 Grand-Prix is always transmitted in real-time?
Yes, it is. If the ABC, ESPN, and ESPN 2 guarantee the delay within a given time limit, say, one millisecond and maintain that requirement for all the transmission, then it is transmitting F-1 Grand-Prix in real-time. But otherwise, if the delay varies during transmission, then they failed to provide hard real-time behavior and will result in absolute failure of the system, making system instable — well not actually — but you get the idea;b

Now, How to get started on FreeRTOS for ESP-32?
If you don’t know how to get started, look no further… just open this very page: Steps to install Arduino ESP32 support on Windows. This is where I get started and I can assure you it is awesome!
I will not replicate it here. RTOS SDK is based on FreeRTOS and is open-source on GitHub. Go there and prepare your station. If you get stuck please let me know in the comment section below…
Preparing the Hardware, WiFi LoRa 32(v2):

Here is how my directory is configured:

To see the OLED working, please follow this page: https://heltec.org/project/wifi-kit-32/
Here is a simple OLED code test:


