Microchip® Advanced Software Framework

power_clocks_lib.h File Reference
#include <avr32/io.h>
#include "compiler.h"
#include "pm.h"

Functions

Power Management
unsigned long pcl_read_gplp (unsigned long gplp)
 Read the content of the GPLP registers. More...
 
void pcl_write_gplp (unsigned long gplp, unsigned long value)
 Write into the GPLP registers. More...
 

Clocks Management

#define pcl_freq_param_t   pm_freq_param_t
 Input and output parameters to configure clocks with pcl_configure_clocks(). More...
 
#define PCL_NOT_SUPPORTED   (-10000)
 Define "not supported" for the lib. More...
 
#define pcl_enable_module(module)   pm_enable_module(&AVR32_PM, module)
 Enable the clock of a module. More...
 
#define pcl_disable_module(module)   pm_disable_module(&AVR32_PM, module)
 Disable the clock of a module. More...
 
enum  pcl_osc_t {
  PCL_OSC0 = 0,
  PCL_OSC1 = 1
}
 The different oscillators. More...
 
enum  pcl_dfll_t {
  PCL_DFLL0 = 0,
  PCL_DFLL1 = 1
}
 The different DFLLs. More...
 
enum  pcl_mainclk_t {
  PCL_MC_RCSYS,
  PCL_MC_OSC0,
  PCL_MC_OSC1,
  PCL_MC_OSC0_PLL0,
  PCL_MC_OSC1_PLL0,
  PCL_MC_OSC0_PLL1,
  PCL_MC_OSC1_PLL1,
  PCL_MC_DFLL0,
  PCL_MC_DFLL1,
  PCL_MC_RC120M,
  PCL_MC_RC8M,
  PCL_MC_CRIPOSC
}
 Possible Main Clock Sources. More...
 
long int pcl_configure_clocks (pcl_freq_param_t *param)
 Automatically configure the CPU, PBA, PBB, and HSB clocks. More...
 
long int pcl_configure_clocks_rcsys (pcl_freq_param_t *param)
 Automatically configure the CPU, PBA, PBB, and HSB clocks using the RCSYS osc as main source clock. More...
 
long int pcl_configure_clocks_rc120m (pcl_freq_param_t *param)
 Automatically configure the CPU, PBA, PBB, and HSB clocks using the RC120M osc as main source clock. More...
 
long int pcl_configure_clocks_osc0 (pcl_freq_param_t *param)
 Automatically configure the CPU, PBA, PBB, and HSB clocks using the OSC0 osc as main source clock. More...
 
long int pcl_configure_clocks_dfll0 (pcl_freq_param_t *param)
 Automatically configure the CPU, PBA, PBB, and HSB clocks using the DFLL0 as main source clock. More...
 
long int pcl_switch_to_osc (pcl_osc_t osc, unsigned int fcrystal, unsigned int startup)
 Switch the main clock source to Osc0 configured in crystal mode. More...
 
long int pcl_configure_usb_clock (void)
 Configure the USB Clock. More...