Atmel Software Framework

sdramc.c File Reference
#include "compiler.h"
#include "preprocessor.h"
#include "gpio.h"
#include "sdramc.h"

Macros

#define sdramc_ns_delay(ns, hsb_mhz_up)   sdramc_ck_delay(((ns) * (hsb_mhz_up) + 999) / 1000)
 Waits during at least the specified delay before returning. More...
 
#define sdramc_us_delay(us, hsb_mhz_up)   sdramc_ck_delay((us) * (hsb_mhz_up))
 Waits during at least the specified delay before returning. More...
 

Functions

void sdram_enter_self_refresh (void)
 Set the SDRAM in self refresh mode. The SELF REFRESH command can be used to retain data in the SDRAM, even if the rest of the system is powered down. When in the self refresh mode, the SDRAM retains data without external clocking. More...
 
void sdram_exit_self_refresh (void)
 Exit from the SDRAM self refresh mode, inhibits self refresh mode. More...
 
static void sdramc_ck_delay (unsigned long ck)
 Waits during at least the specified delay before returning. More...
 
static void sdramc_enable_muxed_pins (void)
 Puts the multiplexed MCU pins used for the SDRAM under control of the SDRAMC. More...
 
void sdramc_init (unsigned long hsb_hz)
 Initializes the AVR32 SDRAM Controller and the connected SDRAM(s). More...
 

#define sdramc_ns_delay (   ns,
  hsb_mhz_up 
)    sdramc_ck_delay(((ns) * (hsb_mhz_up) + 999) / 1000)

Waits during at least the specified delay before returning.

Parameters
nsNumber of nanoseconds to wait.
hsb_mhz_upRounded-up HSB frequency in MHz.

Referenced by sdramc_init().

#define sdramc_us_delay (   us,
  hsb_mhz_up 
)    sdramc_ck_delay((us) * (hsb_mhz_up))

Waits during at least the specified delay before returning.

Parameters
usNumber of microseconds to wait.
hsb_mhz_upRounded-up HSB frequency in MHz.

Referenced by sdramc_init().

static void sdramc_ck_delay ( unsigned long  ck)
static

Waits during at least the specified delay before returning.

Parameters
ckNumber of HSB clock cycles to wait.

References Get_system_register.

static void sdramc_enable_muxed_pins ( void  )
static

Puts the multiplexed MCU pins used for the SDRAM under control of the SDRAMC.

Referenced by sdramc_init().