Link Search Menu Expand Document

                                                                                                     

Getting Started with Harmony v3 Drivers on SAM D21 MCUs Using FreeRTOS

This tutorial shows you how to use MCC to create an application that gets you started in developing applications on SAM D21 MCUs using the MPLAB Harmony v3 software framework with FreeRTOS.

Harmony v3 drivers support Asynchronous and Synchronous modes of operation.

  • Asynchronous Mode
    • Non-blocking Application Program Interfaces (APIs)
    • Works seamlessly in bare-metal and RTOS environment
    • Interrupt and thread-safe
  • Synchronous Mode
    • Blocking APIs
    • Suitable for use in RTOS environment
    • Interrupt and thread-safe

In this tutorial, you will use Harmony drivers in Synchronous mode of operation.

The application makes use of the SAM D21 Xplained Pro Evaluation Kit and I/O1 Xplained Pro Extension Kit (sold separately).

The application reads the current room temperature from the temperature sensor on the I/O1 Xplained Pro Extension Kit. The temperature reading is displayed on a serial console periodically every second. Further, the application writes the temperature readings to EEPROM. When a character is entered on the console, the last five written temperature values are read from the EEPROM and displayed on the console. Also, an LED (LED0) is toggled every time the temperature is displayed on the serial console.

The application you create will utilize:

  • I²C Synchronous Driver to read the temperature from a temperature sensor and store/retrieve to/from EEPROM.
  • Universal Synchronous Asynchronous Receiver Transmitter (USART) Synchronous Driver to print the temperature values on a COM (serial) port terminal application running on a PC.
  • PORTS Peripheral Library to toggle an LED.
  • FreeRTOS library to create application threads and intercommunicate between application threads.

For more information refer the links below.

               



Copyright © 2020 Microchip Technology.