Low Power Application on SAM E54 Using Harmony v3 Peripheral Libraries: Step 4

Step 4.1: Configure Power Manager (PM) Peripheral Library

1

Under the Available Components tab, expand Peripherals > PM.
Double click or drag and drop PM to add the PM peripheral library to the project graph.

add_pm.png

2

Select the PM peripheral library in the Project Graph window and verify the default configuration as shown below.

pm_configuration_options.png

This completes the configuration of the PM peripheral library. In Standby mode, the CPU as well as the peripherals (except those which are configured to run in Standby mode) are stopped. The Standby Sleep mode provides very low power consumption with little overhead on wake-up time. CPU enters Standby mode by executing the Wait for Interrupt (WFI) instruction and exits from the Standby mode when an interrupt is generated.

Step 4.2: Configure SUPC Peripheral Library

1

Under the Available Components tab, expand Peripherals > SUPC.
Double click or drag and drop SUPC to add the Supply Controller (SUPC) peripheral library to the project graph.

add_supc.png

2

Select the SUPC peripheral library in the Project Graph window and verify the default configuration as shown below.

supc_configuration_options.png

This completes the configuration of the SUPC peripheral library. The SUPC manages the voltage reference and power supply of the device. It also controls the voltage regulators for the core domain. Voltage regulators need to be configured for low power applications, which helps in reducing power consumption.

Step 4.3: Configure Non-volatile Memory Controller (NVMCTRL) Peripheral Library

1

The NVMCTRL is added by default to the project graph. Select the NVMCTRL peripheral library and configure it as shown below.

  • Set the Power Reduction Mode During Sleep to FULLAUTO. This bit configures the NVMCTRL to wake-up the Flash memory when the CPU wakes up from Standby mode, which allows it to reduce device wake-up time.
  • Disable the NVM Line Cache for AHB0 and AHB1 to reduce the device's wake-up time. When the cache is enabled, the device will look for an instruction to fetch upon interrupt in the cache at first. If the instruction is found, the device wakes up quicker, but if not, a cache miss occurs and wake-up time is longer. This option is good to enable when the instruction to fetch upon an interrupt is always stored in the cache memory, which is not the case here, as we have different interrupt sources.
nvmctrl_configuration_options.png

This completes the configuration of the NVMCTRL peripheral library. The NVMCTRL is set to optimize the performances for waking the device up while keeping the power consumption as low as possible.

Step 4.4: Configure LED and Wake-up Test Pins

1

Open the Pin Configuration tab by clicking Tools > Pin Configuration.

open_pin_configuration.png

2

Once the MHC Pin Settings window is opened, scroll-down to pin number PC18, and then configure the pin as shown below:

  • Set the Pin Number #72 as GPIO:
    • Pin ID = PC18
    • Custom Name = LED0
    • Function = GPIO
    • Direction = Out
    • Latch = High
led_pin_config.png

In the above step, the user LED is configured as per the following USER_LED design schematic on the SAM E54 Xplained Ultra Evaluation Kit.

user_led_schematic.png

Step 4.5: Rename the default main file

1

Under the Project Graph tab, click on System, and configure as below to give a name of your liking to the default template main file generated by the MHC.

main_file_name_setup.png

The name of the default main.c is changed to main_e54.c to indicate that the referred main.c is for the Low Power application on SAM E54.



Next Step >

© 2020 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.