📄 basic-serialflash-project.html
字号:
<!DOCTYPE PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<head>
<title>Atmel Corporation - Basic Serialflash 1.4</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<h1>Basic Serial Flash Project 1.4</h1>
<div id="breadcrumb">
<a href="../index.html">Main</a> >
<a href="examples.html">Examples</a> >
Serialflash
</div>
<h2>Purpose</h2>
<p>
This program tests the dataflash present on the evaluation kit by erasing and
writing each one of its pages.
</p>
<h2>Hardware Requirements</h2>
<p class="requirements">
This package can be used with any of the Atmel evaluation kit.
</p>
<p>
An external AT26 serial dataflash must be connected to the SPI bus of the microcontroller
for this example to work properly. A convenient solution is to use an external PCB with the
SD card form factor: that way, it can be directly plugged into the SD card port of the evaluation
kit (since SPI pins are multiplexed with MCI pins).
</p>
<p>
The photo below show a possible implementation of that solution, as done by Atmel
(<a href="res/AT91EK_MEMBOARD_SPI.pdf">download the schematic</a>):<br /><br />
<img src="img/memboard.jpg" />
</p>
<h2>Description</h2>
<p>
Upon startup, the program will connect to the serial firmware dataflash through
the SPI and start sending commands to it.
It will perform the following:
<ul>
<li>Read the JEDEC identifier of the device to autodetect it</li>
<li>Erase the chip</li>
<li>Check that each page is blank</li>
<li>Write a "Walking one" pattern on each page:</li>
<blockquote>
<code>
Byte 0 = 00000001<br />
Byte 1 = 00000010<br />
Byte 2 = 00000100<br />
........
</code>
</blockquote>
<li>Verify that the pattern has been correctly applied on each page</li>
</ul>
</p>
<h2>Usage</h2>
<ol>
<li>
Build the application.
</li>
<li>
On the computer, open the DBGU port with a terminal application (e.g. HyperTerminal
on Microsoft Windows).
</li>
<ul>
<li>Settings: 115200 bauds, 8 bits, 1 stop bit, no parity, no flow control.</li>
</ul>
<li>
Download the program inside the evaluation board and run it. Please refer
to the <a href="http://www.atmel.com/dyn/resources/prod_documents/doc6132.pdf">SAM-BA User Guide</a>,
the <a href="http://www.atmel.com/dyn/resources/prod_documents/doc6310.pdf">GNU-Based Software Development</a>
application note or to the <a href="http://www.iar.se/website1/1.0.1.0/78/1/index.php?">IAR EWARM User Guide</a>,
depending on your chosen solution.
</li>
<li>
Upon startup, the application will output the following lines on the DBGU:
<blockquote>
<code>
-- Basic Serial Firmware Dataflash Project 1.4 --<br />
-I- SPI and At26 initialized
</code>
</blockquote>
</li>
<li>
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:
<blockquote>
<code>
-I- AT26DF321 Serial Flash detected
</code>
</blockquote>
</li>
<li>
If a chip has been recognized, then the tests described in the application
description will be run.
</li>
</ol>
<h6>Atmel Corporation ©2008</h6>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -