This application demonstrates basic use of the FreeRTOS real-time operating system on SAM D devices. More specifically, it demonstrates use of tasks, queues and mutexes (semaphores). In addition the tickless feature, which allows longer sleep periods by shutting down the OS tick when it is not needed, can be toggled on or off to compare power consumption.
The application is designed to run on a SAM D Xplained Pro board with a OLED1 Xplained Pro wing board connected to EXT port.
After start-up, the application will display a pseudo-random graph that is continuously updated on the OLED, along with a menu bar at the bottom. The menu bar shows the selection of screens that the user has. By pressing the corresponding buttons on the OLED1 Xplained Pro wing board, the user can select between:
Further, the LEDs on the OLED1 Xplained Pro wing board are lit up for the duration of the various tasks' loops, simply to give a visual representation of the task switching:
Note that several LEDs can be lit up at one time if one task is waiting for another task to release a resource. In this application, the resources would be the mutexes for the display and terminal text buffer.
To write text to the terminal window, one must connect to the EDBG Virtual COM Port with a terminal emulator at a baud rate of 9.6 kbaud. The demo will echo back the received characters.
For more details on the application:
For details on FreeRTOS and its API, go to the official FreeRTOS website.
This software has been tested with the GNU GCC. Other compilers may or may not work.
For further information, visit Microchip.