Link Search Menu Expand Document

Low Power Application on SAM E51 Curiosity Nano Evaluation Kit with OLED C click board for display using MPLAB Harmony Legato Graphics

Download


Description

In this application demonstration, the SAM E51 MCU is configured to operate in low power standby sleep mode on power-up. The device wakes up from standby mode and enters active mode when the user covers the light sensor (placing a hand over it, for example) on the I/O1 Xplained Pro extension kit.

When the light sensor is covered, the device reads the room temperature using temperature sensor on the I/O1 Xplained Pro extension kit and displays it on the OLED C Click display board. The application periodically prints room temperature on a serial terminal while the light sensor is covered.

The device goes back to standby mode when the user uncovers the light sensor. The temperature read is displayed on the OLED C Click and also on the serial console. LED0 in the SAM E51 Curiosity Nano Evaluation Kit is toggled every time the temperature is displayed on the OLED C Click. When the user presses the switch button SW0, the application switches Sleep mode from Standby to Idle mode.

Modules/Technology Used:

  • Peripheral Modules
    • I2C
    • RTC
    • USART
    • DMAC
    • ADC0
    • PM
    • SUPC
    • EIC
    • EVSYS
    • SPI
    • SysTick
    • Timer
    • Legato graphics
    • LE External controller

Hardware Used:

Software/Tools Used:

This project has been verified to work with the following versions of software tools:

Refer Project Manifest present in harmony-manifest-success.yml under the project folder firmware/src/config/sam_e51_cnano

  • Refer the Release Notes to know the MPLAB X IDE and MCC Plugin version. Alternatively, Click Here.
  • Any Serial Terminal application like Tera Term terminal application.

Because Microchip regularly update tools, occasionally issue(s) could be discovered while using the newer versions of the tools. If the project doesn’t seem to work and version incompatibility is suspected, It is recommended to double-check and use the same versions that the project was tested with. To download original version of MPLAB Harmony v3 packages, refer to document How to Use the MPLAB Harmony v3 Project Manifest Feature

Setup:

  • Mount SAM E51 Curiosity Nano Evaluation Kit on “CNANO56_HOST_CONN”(U3) connector of Curiosity Nano Base board
  • Mount OLED C Click board on mikro bus click 1 connector of Curiosity Nano Base board
  • Connect the I/O1 Xplained Pro extension kit to the Extension Header 1 (EXT1) connector of Curiosity Nano Base board
  • Connect a USB cable to the DEBUG USB port for programming

Programming hex file:

The pre-built hex file can be programmed by following the below steps

Steps to program the hex file

  • Open MPLAB X IDE
  • Close all existing projects in IDE, if any project is opened
  • Go to File -> Import -> Hex/ELF File
  • In the “Import Image File” window, Step 1 - Create Prebuilt Project, click the “Browse” button to select the prebuilt hex file.
  • Select Device has “ATSAME51J20A”
  • Ensure the proper tool is selected under “Hardware Tool”
  • Click on “Next” button
  • In the “Import Image File” window, Step 2 - Select Project Name and Folder, select appropriate project name and folder
  • Click on “Finish” button
  • In MPLAB X IDE, click on “Make and Program Device” Button. The device gets programmed in sometime.
  • Follow the steps in “Running the Demo” section below

Programming/Debugging Application Project:

  • Open the project (same51n_low_power_with_oled_c_click/firmware/sam_e51_cnano.X) in MPLAB X IDE.
  • Ensure “SAM E51 Curiosity Nano” is selected as hardware tool to program/debug the application
  • Build the code and program the device by clicking on the “Make and Program Device” button in MPLAB X IDE tool bar
  • Follow the steps in “Running the Demo” section below.

Running the Demo:

  • Open Tera Term, connect to serial console. If there is any connection issue on tera terminal, unplug the USB cable connected to Micro-B port, and reconnect it back.
  • Change the baud rate to 115200
  • After power up, the application displays the temperature on OLED C Click board
  • Verify the application title message with the current temperature value displayed on Serial Console

  • Cover the light sensor on the I/O Xplained Pro board by placing your hand over it (or another element to put the light sensor in a dark environment) to print the temperature and message on the terminal. You should see the following messages (containing the temperature value in °F) on the terminal every 500 milliseconds for the duration the light sensor is covered

  • Press the switch button SW0, the application switches Sleep mode from Standby mode to Idle mode.

    Cover the light sensor on the I/O Xplained Pro board by placing your hand over it to wakeup and print the temperature and message on the terminal.

Note:

  • When the device reads the room temperature and prints it on the serial terminal, the temperature is also displayed on the OLED C Click board.
  • This application demo does not provide the power consumption values of SAM E51 MCU in standby or idle sleep mode. Interested users could refer “Low Power Application on SAM E54 (Cortex M4) MCUs Using MPLAB Harmony v3 Peripheral Libraries” for power consumption numbers presented for an MCU (SAM E54) of the same family as SAM E51.

Comments:

Revision:

  • v1.6.0 - Regenerated and Tested the application.
  • v1.5.0 - Removed MHC support, regenerated and tested application.
  • v1.4.0 - Added MCC support, regenerated and tested application.
  • v1.3.0 - Regenerated and tested application.
  • v1.2.0 - Released demo application


Copyright © 2020 Microchip Technology.