📄 basic-internalflash-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 Internal Flash 1.4</title>
<link rel="stylesheet" type="text/css" href="css/style.css" />
</head>
<body>
<h1>Basic Internal Flash 1.4</h1>
<div id="breadcrumb">
<a href="../index.html">Main</a> >
<a href="examples.html">Examples</a> >
Internal Flash
</div>
<h2>Purpose</h2>
<p>
This basic demonstrates the features of the Embedded Flash Controller (EFC) present on
Atmel AT91 microcontrollers. The EFC enables in-application programming of the internal flash,
as well as protecting memory regions or the whole chip.
</p>
<div class="requirements">
<h2>Hardware Requirements</h2>
<p>
This program can be used with the following evaluation kits:
<ul>
<li>AT91SAM7S-EK</li>
<li>AT91SAM7SE-EK</li>
<li>AT91SAM7X-EK</li>
<li>AT91SAM7XC-EK</li>
<li>AT91SAM7L-EK</li>
<li>AT91SAM7L-STK</li>
<li>AT91SAM9XE-EK</li>
</ul>
</p>
</div>
<h2>Description</h2>
<p>
The program performs the following set of commands:
<ul>
<li>First, it unlocks the whole flash</li>
<li>It writes a pattern in the last page of the flash, and checks it back</li>
<li>It locks the last region of the flash, and verifies that the status is updated accordingly</li>
<li>It unlocks the last region and verifies that it the status is updated accordingly</li>
<li>Lastly, GPNVM #1 is cleared and set, the status being checked for update between the operations (the
original state of the GPNVM is restored after this step)</li>
</ul>
</p>
<h2>Usage</h2>
<ol>
<li>
Build the program and download it inside the evaluation board. 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>
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>
Start the application.
</li>
<li>
The application will display the various tests it is executing and the results (example shown for the
SAM9XE256):
<blockquote>
<code>
-- Basic Internal Flash Project 1.4 --<br />
-I- Unlocking the whole flash<br />
-D- Actual lock range is 0x200000 - 0x240000<br />
-I- Writing last page with walking bit pattern<br />
-I- Checking page contents .....................................................<br />
........................................................................... ok<br />
-I- Locking last page<br />
-D- Actual lock range is 0x23C000 - 0x240000<br />
-I- Checking lock status ... ok<br />
-I- Unlocking last page<br />
-D- Actual lock range is 0x23C000 - 0x240000<br />
-I- Checking lock status ... ok<br />
-I- GPNVM #1 is cleared<br />
-I- Setting GPNVM #1<br />
-I- Clearing GPNVM #1<br />
-I- All tests ok<br />
</code>
</blockquote>
</li>
</ol>
<h6>Atmel Corporation ©2008</h6>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -