#include <avr32/io.h>
#include "pm.h"
#include "gpio.h"
#include "intc.h"
#include "print_funcs.h"
#include "sd_mmc_mci.h"
#include "sd_mmc_mci_mem.h"
#include "cycle_counter.h"
#include "conf_sd_mmc_mci.h"
Macros | |
#define | ALLOCATED_SECTORS 16 |
#define | APPLI_CPU_SPEED 48000000 |
Configuration file for the example. More... | |
#define | APPLI_PBA_SPEED 48000000 |
#define | BENCH_START_SECTOR 0x15000 |
#define | BENCH_TIME_MS 3000 |
#define | EXAMPLE_SD_SLOT SD_SLOT_4BITS |
#define | PBB_HZ pm_freq_param.pba_f |
Functions | |
static void | display_perf_bps (U32 bandwidth) |
Display results in bps. More... | |
static void | init_hmatrix (void) |
Initializes the HSB bus matrix. More... | |
int | main (void) |
Main function. Execution starts here. More... | |
static void | sd_mmc_mci_resources_init (void) |
Initializes SD/MMC resources: GPIO, MCI and SD/MMC. More... | |
static bool | test_sd_mmc_write (U8 pattern_id) |
Variables | |
U8 | buffer_in [SD_MMC_SECTOR_SIZE *ALLOCATED_SECTORS] |
U8 | buffer_saved [SD_MMC_SECTOR_SIZE] |
pm_freq_param_t | pm_freq_param |
#define ALLOCATED_SECTORS 16 |
Referenced by main().
#define APPLI_CPU_SPEED 48000000 |
Configuration file for the example.
PBB clock frequency (Hz)
#define APPLI_PBA_SPEED 48000000 |
#define BENCH_START_SECTOR 0x15000 |
Referenced by main().
#define BENCH_TIME_MS 3000 |
Referenced by main().
#define EXAMPLE_SD_SLOT SD_SLOT_4BITS |
Referenced by main(), sd_mmc_mci_resources_init(), and test_sd_mmc_write().
#define PBB_HZ pm_freq_param.pba_f |
Referenced by sd_mmc_mci_resources_init().
|
static |
Display results in bps.
References CL_BLACK, CL_GREEN, print_dbg(), and print_dbg_ulong().
Referenced by main().
|
static |
Initializes the HSB bus matrix.
Referenced by main().
int main | ( | void | ) |
Main function. Execution starts here.
References ALLOCATED_SECTORS, BENCH_START_SECTOR, BENCH_TIME_MS, pm_freq_param_t::cpu_f, cpu_is_timeout(), cpu_ms_2_cy(), cpu_set_timeout(), CTRL_GOOD, display_perf_bps(), EXAMPLE_SD_SLOT, init_dbg_rs232(), init_hmatrix(), pm_freq_param_t::pba_f, pm_configure_clocks(), PM_FREQ_STATUS_FAIL, print_dbg(), print_dbg_char_hex(), print_dbg_ulong(), sd_mmc_mci_dma_mem_2_ram(), sd_mmc_mci_dma_multiple_mem_2_ram(), sd_mmc_mci_dma_multiple_ram_2_mem(), sd_mmc_mci_dma_ram_2_mem(), sd_mmc_mci_mem_2_ram(), sd_mmc_mci_mem_check(), sd_mmc_mci_multiple_mem_2_ram(), sd_mmc_mci_multiple_ram_2_mem(), sd_mmc_mci_ram_2_mem(), sd_mmc_mci_read_capacity(), sd_mmc_mci_resources_init(), and test_sd_mmc_write().
|
static |
Initializes SD/MMC resources: GPIO, MCI and SD/MMC.
References pm_freq_param_t::cpu_f, EXAMPLE_SD_SLOT, gpio_enable_module(), PBB_HZ, sd_mmc_mci_init(), SD_SLOT_4BITS_CLK_FUNCTION, SD_SLOT_4BITS_CLK_PIN, SD_SLOT_4BITS_CMD_FUNCTION, SD_SLOT_4BITS_CMD_PIN, SD_SLOT_4BITS_DATA0_FUNCTION, SD_SLOT_4BITS_DATA0_PIN, SD_SLOT_4BITS_DATA1_FUNCTION, SD_SLOT_4BITS_DATA1_PIN, SD_SLOT_4BITS_DATA2_FUNCTION, SD_SLOT_4BITS_DATA2_PIN, SD_SLOT_4BITS_DATA3_FUNCTION, SD_SLOT_4BITS_DATA3_PIN, SD_SLOT_8BITS_CLK_FUNCTION, SD_SLOT_8BITS_CLK_PIN, SD_SLOT_8BITS_CMD_FUNCTION, SD_SLOT_8BITS_CMD_PIN, SD_SLOT_8BITS_DATA0_FUNCTION, SD_SLOT_8BITS_DATA0_PIN, SD_SLOT_8BITS_DATA1_FUNCTION, SD_SLOT_8BITS_DATA1_PIN, SD_SLOT_8BITS_DATA2_FUNCTION, SD_SLOT_8BITS_DATA2_PIN, SD_SLOT_8BITS_DATA3_FUNCTION, SD_SLOT_8BITS_DATA3_PIN, SD_SLOT_8BITS_DATA4_FUNCTION, SD_SLOT_8BITS_DATA4_PIN, SD_SLOT_8BITS_DATA5_FUNCTION, SD_SLOT_8BITS_DATA5_PIN, SD_SLOT_8BITS_DATA6_FUNCTION, SD_SLOT_8BITS_DATA6_PIN, SD_SLOT_8BITS_DATA7_FUNCTION, and SD_SLOT_8BITS_DATA7_PIN.
Referenced by main().
References CTRL_GOOD, EXAMPLE_SD_SLOT, print_dbg(), print_dbg_char_hex(), sd_mmc_mci_mem_2_ram(), sd_mmc_mci_ram_2_mem(), and SD_MMC_SECTOR_SIZE.
Referenced by main().
U8 buffer_in[SD_MMC_SECTOR_SIZE *ALLOCATED_SECTORS] |
U8 buffer_saved[SD_MMC_SECTOR_SIZE] |
pm_freq_param_t pm_freq_param |