SAM3S8/SD8 Software Package: examples_storage/smc_norflash/main.c File Reference

SAM3S8/SD8 Software Package 1.2
Defines | Functions | Variables

# main.c File Reference

`#include "board.h"`
`#include "memories.h"`
`#include <stdio.h>`
`#include <string.h>`

Go to the source code of this file.

## Defines

#define | NOR_AT49BV6416
#define | min(a, b) (((a) < (b)) ? (a) : (b))
#define | PIN_DATA_BUS_ON_EBI {0x000000ff, PIOC, ID_PIOC, PIO_PERIPH_A, PIO_PULLUP}
#define | PIN_NRD_ON_EBI {1 << 11, PIOC, ID_PIOC, PIO_PERIPH_A, PIO_PULLUP}
#define | PIN_NWE_ON_EBI {1 << 8, PIOC, ID_PIOC, PIO_PERIPH_A, PIO_PULLUP}
#define | PIN_NCS0_ON_EBI {1 << 14, PIOC, ID_PIOC, PIO_PERIPH_A, PIO_PULLUP}
#define | PIN_ADDR_BUS_ON_EBI

## Functions

int | main (void)
| Tests the norflash connected to the board by performing several command on each of its pages.

## Variables

const Pin | pinNorFlash []

## Detailed Description

This file contains all the specific code for the smc norflash example.

Definition in file main.c.

## Define Documentation

#define NOR_AT49BV6416

define NorFlash chip type

Definition at line 111 of file main.c.

#define PIN_ADDR_BUS_ON_EBI

Value:

    {0xffff0000, PIOC, ID_PIOC, PIO_PERIPH_A, PIO_PULLUP},\
                                        {0x039c0003, PIOA, ID_PIOA, PIO_PERIPH_C, PIO_PULLUP}

Address Bus A0-A20

Definition at line 133 of file main.c.

#define PIN_DATA_BUS_ON_EBI {0x000000ff, PIOC, ID_PIOC, PIO_PERIPH_A, PIO_PULLUP}

Pins to configure for the application 8-bits Data bus on EBI

Definition at line 125 of file main.c.

#define PIN_NCS0_ON_EBI {1 << 14, PIOC, ID_PIOC, PIO_PERIPH_A, PIO_PULLUP}

Static Memory Controller Chip Select Lines

Definition at line 131 of file main.c.

#define PIN_NRD_ON_EBI {1 << 11, PIOC, ID_PIOC, PIO_PERIPH_A, PIO_PULLUP}

Read Signal (output)

Definition at line 127 of file main.c.

#define PIN_NWE_ON_EBI {1 << 8, PIOC, ID_PIOC, PIO_PERIPH_A, PIO_PULLUP}

Write Enable Signal (output)

Definition at line 129 of file main.c.

## Function Documentation

int main | ( | void | ) |

Tests the norflash connected to the board by performing several command on each of its pages.

Returns:
  Unused (ANSI-C compatibility).

Definition at line 157 of file main.c.

Here is the call graph for this function:

## Variable Documentation

const Pin pinNorFlash[]

Initial value:

     {PIN_DATA_BUS_ON_EBI,
                            PIN_NRD_ON_EBI,
                            PIN_NWE_ON_EBI,
                            PIN_NCS0_ON_EBI,
                            PIN_ADDR_BUS_ON_EBI
                            }

PIOs configuration for EBI connect to NorFlash.

Definition at line 137 of file main.c.

All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines