Microchip® Advanced Software Framework

scif_uc3c.c File Reference
#include "compiler.h"
#include "scif_uc3c.h"

Data Structures

union  u_avr32_scif_oscctrl32_t
 
union  u_avr32_scif_oscctrl_t
 
union  u_avr32_scif_pll_t
 

Functions

void scif_bod18_clear_irq (void)
 Clears the 1.8V Brown-Out Detector interrupt flag. More...
 
void scif_bod18_disable_irq (void)
 Disables the 1.8V Brown-Out Detector interrupt. More...
 
void scif_bod18_enable_irq (void)
 Enables the 1.8V Brown-Out Detector interrupt. More...
 
unsigned long scif_bod18_get_irq_enable_bit (void)
 Gets the 1.8V Brown-Out Detector interrupt enable status. More...
 
unsigned long scif_bod18_get_irq_status (void)
 Gets the 1.8V Brown-Out Detector interrupt flag. More...
 
unsigned long scif_bod18_get_level (void)
 Gets the triggering threshold of the 1.8V Brown-Out Detector. More...
 
void scif_bod33_clear_irq (void)
 Clears the 3.3V Brown-Out Detector interrupt flag. More...
 
void scif_bod33_disable_irq (void)
 Disables the 3.3V Brown-Out Detector interrupt. More...
 
void scif_bod33_enable_irq (void)
 Enables the 3.3V Brown-Out Detector interrupt. More...
 
unsigned long scif_bod33_get_irq_enable_bit (void)
 Gets the 3.3V Brown-Out Detector interrupt enable status. More...
 
unsigned long scif_bod33_get_irq_status (void)
 Gets the 3.3V Brown-Out Detector interrupt flag. More...
 
unsigned long scif_bod33_get_level (void)
 Gets the triggering threshold of the 3.3V Brown-Out Detector. More...
 
void scif_bod50_clear_irq (void)
 Clears the 5.0V Brown-Out Detector interrupt flag. More...
 
void scif_bod50_disable_irq (void)
 Disables the 5.0V Brown-Out Detector interrupt. More...
 
void scif_bod50_enable_irq (void)
 Enables the 5.0V Brown-Out Detector interrupt. More...
 
unsigned long scif_bod50_get_irq_enable_bit (void)
 Gets the 5.0V Brown-Out Detector interrupt enable status. More...
 
unsigned long scif_bod50_get_irq_status (void)
 Gets the 5.0V Brown-Out Detector interrupt flag. More...
 
unsigned long scif_bod50_get_level (void)
 Gets the triggering threshold of the 5.0V Brown-Out Detector. More...
 
long int scif_configure_osc_crystalmode (scif_osc_t osc, unsigned int fcrystal)
 Configure an oscillator in crystal mode. More...
 
long int scif_configure_osc_extmode (scif_osc_t osc)
 Configure an external clock as input clock. More...
 
long int scif_enable_extosc (scif_osc_t osc)
 Enable external clock. More...
 
long int scif_enable_osc (scif_osc_t osc, unsigned int startup, bool wait_for_ready)
 Enable an oscillator with a given startup time. More...
 
long int scif_gc_enable (unsigned int gclk)
 Enable a generic clock. More...
 
long int scif_gc_setup (unsigned int gclk, scif_gcctrl_oscsel_t clk_src, unsigned int diven, unsigned int divfactor)
 Setup a generic clock. More...
 
bool scif_is_osc_ready (scif_osc_t osc)
 Is an oscillator stable and ready to be used as clock source? More...
 
static long int scif_pclksr_statushigh_wait (unsigned long statusMask)
 Wait for a status high in the Power and Clocks status register. More...
 
long int scif_pll_disable (scif_pll_t pll)
 This function will disable a PLL. More...
 
long int scif_pll_enable (scif_pll_t pll)
 This function will enable a PLL. More...
 
long int scif_pll_setup (scif_pll_t pll, const scif_pll_opt_t *opt)
 PLL0/PLL1 Functions. More...
 
unsigned long scif_read_gplp (unsigned long gplp)
 Read the content of the SCIF GPLP registers. More...
 
long int scif_start_gclk (unsigned int gclk, const scif_gclk_opt_t *opt)
 Generic Clock Functions. More...
 
long int scif_start_osc (scif_osc_t osc, const scif_osc_opt_t *opt, bool wait_for_ready)
 Interrupt Functions. More...
 
long int scif_start_osc32 (const scif_osc32_opt_t *opt, bool wait_for_ready)
 OSC32 Functions. More...
 
void scif_start_rc120M (void)
 120MHz RCosc Functions More...
 
void scif_start_rc8M (void)
 Calibration Functions. More...
 
long int scif_stop_gclk (unsigned int gclk)
 Stop a generic clock. More...
 
long int scif_stop_osc (scif_osc_t osc)
 Stop an oscillator. More...
 
long scif_stop_osc32 ()
 Stop the OSC32 oscillator. More...
 
void scif_stop_rc120M (void)
 Stop the 120MHz internal RCosc (RC120M) clock. More...
 
void scif_stop_rc8M (void)
 Stop the 8MHz internal RCosc (RC8M) clock. More...
 
long int scif_wait_for_pll_locked (scif_pll_t pll)
 This function will wait for PLL locked. More...
 
void scif_write_gplp (int gplp, unsigned long value)
 Write into the SCIF GPLP registers. More...
 

static long int scif_pclksr_statushigh_wait ( unsigned long  statusMask)
static

Wait for a status high in the Power and Clocks status register.

Parameters
statusMaskMask field of the status to poll [INPUT]
Returns
Status.
Return values
0Status is high.
<0SCIF_POLL_TIMEOUT Timeout expired before the status was high.

References PASS, and SCIF_POLL_TIMEOUT.

Referenced by scif_enable_osc(), scif_start_osc(), and scif_start_osc32().