Atmel Software Framework

xmega/pll.h File Reference

Chip-specific PLL management functions.

Copyright (c) 2010-2015 Atmel Corporation. All rights reserved.

#include <compiler.h>

Data Structures

struct  pll_config
 Hardware-specific representation of PLL configuration. More...
 

Macros

Chip-specific PLL characteristics
#define NR_PLLS   1
 Number of on-chip PLLs. More...
 
#define PLL_MIN_HZ   10000000UL
 Minimum frequency that the PLL can generate. More...
 
#define PLL_MAX_HZ   200000000UL
 Maximum frequency that the PLL can generate. More...
 
#define PLL_NR_OPTIONS   0
 Number of PLL option bits. More...
 

Enumerations

enum  pll_source {
  PLL_SRC_RC2MHZ = OSC_PLLSRC_RC2M_gc,
  PLL_SRC_RC32MHZ = OSC_PLLSRC_RC32M_gc,
  PLL_SRC_XOSC = OSC_PLLSRC_XOSC_gc
}
 PLL clock source. More...
 

Functions

static uint32_t pll_get_default_rate_priv (enum pll_source src, unsigned int mul, unsigned int div)
 Return clock rate for specified PLL settings. More...
 
Interaction with the PLL hardware
static void pll_enable (const struct pll_config *cfg, unsigned int pll_id)
 Activate the configuration cfg and enable PLL pll_id. More...
 
static void pll_disable (unsigned int pll_id)
 Disable the PLL identified by pll_id. More...
 
static bool pll_is_locked (unsigned int pll_id)
 Determine whether the PLL is locked or not. More...
 
static void pll_enable_source (enum pll_source src)
 Enable the source of the pll. More...
 
static void pll_enable_config_defaults (unsigned int pll_id)
 Enable the pll with the default configuration. More...
 

PLL configuration

#define pll_get_default_rate(pll_id)
 Get the default rate in Hz of pll_id. More...
 
#define pll_config_defaults(cfg, pll_id)
 Initialize PLL configuration using default parameters. More...
 
static void pll_config_init (struct pll_config *cfg, enum pll_source src, unsigned int div, unsigned int mul)
 Initialize PLL configuration from standard parameters. More...
 
static void pll_config_read (struct pll_config *cfg, unsigned int pll_id)
 Read the currently active configuration of pll_id. More...
 
static void pll_config_write (const struct pll_config *cfg, unsigned int pll_id)
 Activate the configuration cfg on pll_id. More...