1.17.14 1.24.15 Low Power Modes (Power)
PIC32 devices offer various methods and modes that allow the user to balance power consumption with device performance. Power plib provides interface to get into such low power modes. Some of the devices which supports deep sleep mode, it also provides additional functions to be used in deep sleep mode.
Using The Library
To enter into any of the power saving mode, user can call the API POWER_LowPowerModeEnter. in case the device supports deep sleep mode and user wants to use that, then the same can be first configured in MHC power plib configuration and then corresponding APIs can be sued as needed.
Library Interface
Low Power Modes peripheral library provides the following interfaces:
Functions
Name | Description |
---|---|
POWER_LowPowerModeEnter | Puts the device in selected low power mode |
POWER_Initialize | Initializes Deep Sleep controller of Power module |
POWER_WakeupSourceGet | Returns the source of wakeup from deep sleep |
POWER_ReleaseGPIO | Release GPIO pins |
POWER_WakeupSourceClear | Clears the wakeup source |
POWER_DSGPR_Write | Saves critical data in deep sleep state |
POWER_DSGPR_Read | Reads saved data |
Data types and constants
Name | Type | Description |
---|---|---|
POWER_LOW_POWER_MODE | Enum | Identifies low power mode options |
POWER_WAKEUP_SOURCE | Enum | Identifies wake up sources from deep sleep mode |
POWER_DSGPR | Enum | Identifies deep sleep GPRs |