This is an example of how to get started with FreeRTOS™ on the AVR architecture with ATmega4809 Curiosity Nano. FreeRTOS™ is a real-time operative system kernel which allows the MCU to operate with different tasks simultaneously. This is accomplished with mutexes, semaphores and software timers. AN3007 describes in detail how the FreeRTOS™ is being used to control the AVR.
- AN3007 - Getting Started with FreeRTOS on megaAVR® 0-series
- ATmega4809 Device Page
- FreeRTOS™ Homepage
- MPLAB® X IDE v6.25 or later
- XC8 (v3.00) alternatively AVR/GNU C Compiler 5.4.0 can be used
- Data Visualizer
- ATmega_DFP 3.4.282 or later
- Connect the OLED1 Xplained Pro Extension Kit into the EXT1 port on your Curiosity Nano Base.
- Download the zip file or clone the example to get the source code.
- Make sure you have the MPLAB® XC8 compiler installed.
- Connect the ATmega4809 Curiosity Nano with the Curiosity Nano Base to your computer with a micro usb cable.
- Open
atmega4809-cnano-getting-started-with-freertos-mplab.X
in MPLAB®. - Make sure the kit is selected as the tool to be programmed under project settings.
- Press the make and program button to program the device.
- Open your favorite terminal application or Data visualizer and open the serial port associated with the cnano.
We have here shown that it is possible to run FreeRTOS™ on an ATmega4809 and what advantages this might bring to your project. As mentioned in the appnote AN3007 you can see the different tasks running and interact with them using the virtual com port on your ATmega4809 Curiosity Nano or using the on board buttons.