Lab 3: Move Application into an RTOS
Objective
In Lab 3, you will enhance the existing application to run in an RTOS environment.
Overview
The whole application is divided into three tasks.
- Sensor task
- SD card task
- USB task
The tasks will run as separate RTOS threads.
The Sensor task will use:
- A button to switch the application on or off
- Timer System Service using Core Timer to periodically trigger the sampling of temperature sensor data
- Asynchronous I2C Driver using I2C1 Peripheral Library to read the temperature sensor
The SD card task will use:
- Asynchronous SDSPI Driver using SPI2 Peripheral Library to write temperature log onto SD card
- File System Service interfaced with SDSPI Driver to perform operations on the SD card
- RTC Peripheral Library to capture the current log time
The USB task will use:
- Debug System service and Console System service using CDC Peripheral Library to print data on a serial port terminal
Procedure
Lab 3 Index
Part 1 - Configure FreeRTOS, I2C Driver, SDSPI Driver, File System, and Harmony Core
- Step 1 - Rename Project
- Step 2 - With MHC, Configure FreeRTOS
- Step 3 - With MHC, Verify I2C Driver, SDSPI Driver, File System
- Step 4 - With MHC, Configure Harmony Core
- Step 5 - With MHC, Generate Code
Part 2 - Add Application Code and Build the Application