The post discusses testing FreeRTOS on different microcontroller architectures: ATmega328P, ATmega4809, SAMD21, Renesas RA4M1, and ESP32-S3. It highlights architectural differences and challenges. Special attention is given to time slicing and the need for modifications in library codes for smooth operation across these models, emphasizing differences in scheduler functionality and usage.
The core of a Real Time Operating System (RTOS) is the task scheduler, allowing multiple tasks to share the processor by yielding when necessary. The post explores freeRTOS on 8-bit AVR microcontrollers in Arduino Uno R3, demonstrating tasks toggling pins and discussing time slicing, yielding, and the impact of removing or modifying vTaskDelay calls for efficient execution.
These boards are very recent and have some interesting features. From left to right they are the Nano ESP32 which is low cost yet powerful, the Uno R4 Minima which is the not really compatible successor to the Uno R3, and the Uno R4 WiFi shown here in the tray. Nano ESP32 This board uses …
One of the features of most microcontrollers is that they allow easy access to connected peripherals like sensors and actuators. This allows fast, accurate, and inexpensive operation. However some recent Arduino boards use microcontrollers that obfuscate the underlying hardware interfaces. A look into the Arduino Library for these parts show that they are calling vendor …
Traditional Arduino boards, like the Uno R3 or Nano, are typically programmed using the Arduino Library functions. These conveniently present most of the microcontroller’s functionality to the hobbyist user. Books like my Far Inside The Arduino and the microcontroller’s documentation show how to access additional functionality not addressed by the Arduino Library. As more advanced …
My earlier blog posts about FreeRTOS on the ATmega4809 (Arduino Nano Every) were for an older version of the FreeRTOS distribution, 10.3.0-9. The instructions for making the patches to the code don’t quite work for the more recent distributions like 10.5, so to use you will need to either install an older version or work …
My latest book has now become available on Amazon. Still Far Inside The Arduino continues the theme of Far Inside The Arduino and the Nano Every Supplement by using programming techniques and drivers more advanced than what Arduino promotes. Topics include: Distinctions among the various general purpose Arduino boards: ATmega328P based like the Arduino Uno …
My final dice game example for the new book uses FreeRTOS. There are three independent (non communicating) tasks, to keep things simple, rather than breaking down the game itself into multiple communicating tasks. There is the game task, a flashing light (“blinky”) task, and a background task used to measure performance, like I did with …
The FreeRTOS contributor that has the Arduino port hasn’t updated for the ATmega4809 in the Arduino Nano Every. I’ve managed to get it working. The mods do not apply to the Arduino Uno Wifi which also uses the ATmega4809. I’m not putting this in the current book I’m working on, so am posting what needs …