FuSa 8-Bit Libraries Safety Framework
Loading...
Searching...
No Matches
midware_power_manager.c File Reference

Implements APIs for the Power Manager. More...

#include <stdbool.h>
#include <stdint.h>
#include <define_error_flags.h>
#include <driver_bodctrl.h>
#include <driver_slpctrl.h>
#include <midware_power_manager.h>
#include <xc.h>

Go to the source code of this file.

Functions

errFlag_t MW_GetClearVlmError (void)
 Reads and clears the flag indicating a supply voltage trigger error detected by the Voltage Level Monitor in the Brown-out Detector (BOD).
errFlag_t MW_GetClearVmonOverError (void)
 Reads and clears the flag indicating an overvoltage error detected by the Voltage Monitor.
errFlag_t MW_GetClearVmonUnderError (void)
 Reads and clears the flag indicating an undervoltage error detected by the Voltage Monitor.
errFlag_t MW_GetClearVmonDiagEntryError (void)
 Reads and clears the flag indicating a Diagnostic Mode entry error in the Voltage Monitor.
errFlag_t MW_GetClearVmonDiagExitError (void)
 Reads and clears the flag indicating an Diagnostic Mode exit error in the Voltage Monitor.
errFlag_t MW_GetClearVmonInternalError (void)
 Reads and clears the flag indicating internal error in the Voltage Monitor.
errFlag_t MW_GetClearVmonSleepEntryError (void)
 Reads and clears the flag indicating a sleep mode entry error in the Voltage Monitor.
errFlag_t MW_GetClearVmonDisabledError (void)
 Reads and clears the flag indicating a disabled Voltage Monitor error.
errFlag_t MW_GetClearSleepError (void)
 Reads and clears the flag indicating a Sleep Aborted error in the Sleep Controller.
void MW_EnablePowerInterrupts (void)
 Enables power related interrupts, including VMON, VLM and sleep error related interrupts.
errFlag_t MW_ConfigVlm (vlmThreshold_t threshold, vlmTrigger_t trigger)
 Configures the Voltage Level Monitor (VLM) with the provided voltage threshold and trigger condition.
errFlag_t MW_SetSleepMode (sleepMode_t sleepMode)
 Sets the sleep mode to be used when entering Sleep.
void MW_SetVmonSleep (bool enableInSleep, bool useFullPowerMode)
 Configures Voltage Monitor (VMON) operation during Standby or Power-Down sleep.

Detailed Description

Implements APIs for the Power Manager.

Definition in file midware_power_manager.c.