arch/avr32/delay.c File Reference

AVR32-specific delay implementation. More...

#include <delay.h>
#include <types.h>
#include <util.h>
#include <arch/sysreg.h>
#include <chip/clk.h>

Include dependency graph for delay.c:

Go to the source code of this file.

Functions

void udelay (unsigned long us)
 Delay for a specified number of microseconds.


Detailed Description

AVR32-specific delay implementation.

This implementation of udelay() uses the architecture-specified COUNT system register. Note that this breaks on some chips when the COUNT/COMPARE interrupt is used.

Author:
Atmel Corporation: http://www.atmel.com
Support and FAQ: http://support.atmel.no/

Definition in file delay.c.


Function Documentation

void udelay ( unsigned long  us  ) 

Delay for a specified number of microseconds.

Since the max CPU frequency at this point is 66 MHz, this function supports delays up to

\[ \frac{2^{31}}{66000000} \approx 32 \textnormal{s} \]

Parameters:
us Number of microseconds to delay.

Definition at line 64 of file delay.c.

References div_ceil, and get_cpu_clock_rate().

Referenced by mdelay().

Here is the call graph for this function:


Generated on Tue Sep 15 10:17:48 2009 for libavr32 by  doxygen 1.5.8