Low Power Application on SAM E54 Using Harmony v3 Peripheral Libraries: Step 4
Configure Power Manager (PM) Peripheral Library
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.
Select the PM peripheral library in the Project Graph window and verify the default configuration as shown below.
Configure SUPC Peripheral Library
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.
Select the SUPC peripheral library in the Project Graph window and verify the default configuration as shown below.
Configure Non-volatile Memory Controller (NVMCTRL) Peripheral Library
The NVMCTRL is added by default to the project graph. Select the NVMCTRL peripheral library and configure it as shown below.
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.
Configure LED and Wake-up Test Pins
Open the Pin Configuration tab by clicking Tools > Pin Configuration.
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
Rename the Default main File
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.