Microchip® Advanced Software Framework

supc.h File Reference

Supply Controller (SUPC) driver for SAM.

Copyright (c) 2011-2018 Microchip Technology Inc. and its subsidiaries.

#include "compiler.h"

Macros

#define SUPC_CR_KEY_PASSWD   SUPC_CR_KEY(0xA5U)
 Key used to write SUPC registers. More...
 
#define SUPC_MR_KEY_PASSWD   SUPC_MR_KEY(0xA5U)
 

Enumerations

enum  slcdc_power_mode {
  SLCDC_POWER_MODE_LCDOFF = SUPC_MR_LCDMODE_LCDOFF,
  SLCDC_POWER_MODE_LCDON_EXTVR = SUPC_MR_LCDMODE_LCDON_EXTVR,
  SLCDC_POWER_MODE_LCDON_INVR = SUPC_MR_LCDMODE_LCDON_INVR
}
 Power Mode. More...
 

Functions

void supc_backup_sram_off (Supc *p_supc)
 
void supc_backup_sram_on (Supc *p_supc)
 
void supc_disable_backup_power_on_reset (Supc *p_supc)
 
void supc_disable_brownout_detector (Supc *p_supc)
 Disable the core brownout detector. More...
 
void supc_disable_brownout_reset (Supc *p_supc)
 Disable the assertion of core reset signal when a brownout detection occurs. More...
 
void supc_disable_monitor_interrupt (Supc *p_supc)
 Disable the assertion of SUPC interrupt signal when a supply monitor detection occurs. More...
 
void supc_disable_monitor_reset (Supc *p_supc)
 Disable the assertion of core reset signal when a supply monitor detection occurs. More...
 
void supc_disable_voltage_regulator (Supc *p_supc)
 
void supc_enable_backup_mode (Supc *p_supc)
 
void supc_enable_backup_power_on_reset (Supc *p_supc)
 
void supc_enable_brownout_detector (Supc *p_supc)
 Enable the core brownout detector. More...
 
void supc_enable_brownout_reset (Supc *p_supc)
 Enable the assertion of core reset signal when a brownout detection occurs. More...
 
void supc_enable_monitor_interrupt (Supc *p_supc)
 Enable the assertion of SUPC interrupt signal when a supply monitor detection occurs. More...
 
void supc_enable_monitor_reset (Supc *p_supc)
 Enable the assertion of the core reset signal when a supply monitor detection occurs. More...
 
void supc_enable_voltage_regulator (Supc *p_supc)
 
enum slcdc_power_mode supc_get_slcd_power_mode (Supc *p_supc)
 
uint32_t supc_get_status (Supc *p_supc)
 Get supply controller status. More...
 
void supc_set_monitor_sampling_period (Supc *p_supc, uint32_t ul_period)
 Set Supply monitor sampling period. More...
 
void supc_set_monitor_threshold (Supc *p_supc, uint32_t ul_threshold)
 Set Supply monitor threshold. More...
 
void supc_set_regulator_trim_factory (Supc *p_supc)
 
void supc_set_regulator_trim_user (Supc *p_supc, uint32_t value)
 
void supc_set_slcd_power_mode (Supc *p_supc, enum slcdc_power_mode mode)
 
void supc_set_slcd_vol (Supc *p_supc, uint32_t vol)
 
void supc_set_wakeup_inputs (Supc *p_supc, uint32_t ul_inputs, uint32_t ul_transition)
 
void supc_set_wakeup_mode (Supc *p_supc, uint32_t ul_mode)
 
void supc_switch_sclk_to_32kxtal (Supc *p_supc, uint32_t ul_bypass)
 Switch slow clock source selection to external 32k (Xtal or Bypass) oscillator. More...
 

#define SUPC_CR_KEY_PASSWD   SUPC_CR_KEY(0xA5U)

Key used to write SUPC registers.

#define SUPC_MR_KEY_PASSWD   SUPC_MR_KEY(0xA5U)

Power Mode.

Enumerator
SLCDC_POWER_MODE_LCDOFF 

The internal supply source and the external supply source are both deselected.

SLCDC_POWER_MODE_LCDON_EXTVR 

The external supply source for LCD is selected.

SLCDC_POWER_MODE_LCDON_INVR 

The internal supply source for LCD is selected.

void supc_backup_sram_off ( Supc *  p_supc)
void supc_backup_sram_on ( Supc *  p_supc)
void supc_disable_backup_power_on_reset ( Supc *  p_supc)
void supc_disable_voltage_regulator ( Supc *  p_supc)
void supc_enable_backup_mode ( Supc *  p_supc)

Referenced by run_gpbr_test().

void supc_enable_backup_power_on_reset ( Supc *  p_supc)
void supc_enable_voltage_regulator ( Supc *  p_supc)
enum slcdc_power_mode supc_get_slcd_power_mode ( Supc *  p_supc)
void supc_set_regulator_trim_factory ( Supc *  p_supc)
void supc_set_regulator_trim_user ( Supc *  p_supc,
uint32_t  value 
)
void supc_set_slcd_power_mode ( Supc *  p_supc,
enum slcdc_power_mode  mode 
)
void supc_set_slcd_vol ( Supc *  p_supc,
uint32_t  vol 
)
void supc_set_wakeup_inputs ( Supc *  p_supc,
uint32_t  ul_inputs,
uint32_t  ul_transition 
)
void supc_set_wakeup_mode ( Supc *  p_supc,
uint32_t  ul_mode 
)

Referenced by run_gpbr_test().