# 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.

- Compiler: IAR EWAVR32 and GNU GCC for AVR32
- Supported devices: All AVR32 devices
- AppNote:

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

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: