Description
Graph
basic-serialflash-project
Purpose
The Basic Serialflash project will help new users get familiar with SPI interface on Atmel's AT91 family of microcontrollers. This project gives you an AT26 serial firmware dataflash programming code so that
can help develop your own SPI devices applications with maximum efficiency.
You
can find following information depends on your needs:
- A Spi low level driver performs SPI device Initializes, data transfer and receive. It can be used by upper SPI driver such as AT26 dataflash.
- A Dataflash driver is based on top of the corresponding Spi driver. It allow user to do operations with dataflash in a unified way.
Requirements
This package
can be used with all Atmel evaluation kits that have SPI interface and on-board or external Dataflash connected. The package runs at SRAM or SDRAM, so SDRAM
device is needed if you want to run this package in SDRAM.
Description
The demonstration program tests the dataflash present on the evaluation kit by erasing and writing each one of its pages.
Usage
- Build the program and download it inside the evaluation board. Please refer to the SAM-BA User Guide, the GNU-Based Software Development application note or to the IAR EWARM User Guide, depending on your chosen solution.
- On the computer, open and configure a terminal application (e.g. HyperTerminal on Microsoft Windows) with these settings:
- 115200 bauds
- 8 bits of data
- No parity
- 1 stop bit
- No flow control
- Start the application.
- Upon startup, the application will output the following lines on the DBGU:
-- Basic Serial Firmware Dataflash Project xxx --
-- AT91xxxxxx-xx
-- Compiled: xxx xx xxxx xx:xx:xx --
-I- SPI and At26 initialized
|
- The program will connect to the serial firmware dataflash through the SPI and start sending commands to it. It will perform the following:
- Read the JEDEC identifier of the device to autodetect it The next line should indicate if the serial dataflash has been correctly identified. For example, this is what appears when an AT26DF321 chip is recognized:
-I- AT26DF321 Serial Flash detected
|
- Erase the chip
- Check that each page is blank
- Write a "Walking one" pattern on each page:
Byte 0 = 00000001
Byte 1 = 00000010
Byte 2 = 00000100
........
|
- Verify that the pattern has been correctly applied on each page
Source
The documentation for this Directory was generated from the following files:
main.c