?? psfile.html
字號:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<!-- Copyright 2001, 2002 Cambridge Silicon Radio Limited -->
<html>
<head>
<title>CSR DFU Tools - Persistent Store Files</title>
</head>
<body bgcolor="white">
<h1 align=center>CSR DFU Tools - Persistent Store Files</h1>
Files with a <code>.psr</code> extension are used to specify updates to persistent store. The same file format is used for unprotected persistent store, protected stack persistent store, and protected application persistent store.
<h2>Basic Format</h2>
A persistent store file consists of a series of lines specifying actions to perform on persistent store keys. Valid lines start with an ampersand (<code>&</code>), followed by a key number, a symbol specifying the required action, and zero or more 16-bit words of data. Anything not matching this pattern is treated as a comment, and thus is ignored.
<p>
The possible actions are:
<table border=1 align=center>
<tr>
<th>Symbol</th>
<th>Action</th>
</tr>
<tr>
<td align=center><code>=</code></td>
<td>Always set the key</td>
</tr>
<tr>
<td align=center><code>+</code></td>
<td>Set the key if it is not already set</td>
</tr>
<tr>
<td align=center><code>-</code></td>
<td>Clear the key (any value is ignored)</td>
</tr>
</table>
<p>
The keys can be cleared to their factory settings by specifying that pseudo-key <code>&F000</code> should be cleared.
<p>
Note:
<ul>
<li>Line endings are carriage-return (CR = <code>13</code>) followed by line-feed (LF = <code>10</code>).
<li>All numbers are specified in hexadecimal. Upper or lower-case hexadecimal digits may be used.
<li>Values are specified as sequences of four-digit numbers, although spaces can be used as separators.
<li>The ordering of lines in the file is not important; clearing of keys to factory settings, if required, is always performed first.
<li>Keys must not be multiply specified in a single file.
<li>The tools do not check the validity of keys, or their suitability for different types of persistent store file. If inappropriate keys are downloaded via DFU then they are silently ignored.
<li>Protected stack and application persistent store can include any unprotected keys.
</ul>
The following example illustrates some of these rules:
<table border=1 align=center bgcolor="#eeeeee">
<tr>
<td>
<pre>Example persistent store file (C) 2001, 2002 CSR
These lines are treated as comments because they do not
start with ampersands (&).
&F000- // Clear to factory settings
Note that special comment characters are required here
because data can follow any action symbol and "C" is a
valid hexadecimal digit.
&F002 = 0000 0000 0000 0002
Settings are suitable for BlueCore2-External only
&028A = 1234 5678
&28B=12345678
White space is generally optional, so these lines set
PSKEY_USR0 and PSKEY_USR1 to the two word value
[0x1234, 0x5678].
&028C = 1 2 3 4
&028D = 1234
However, these lines do set entirely different values:
PSKEY_USR2 is set to [0x0001, 0x0002, 0x0003, 0x0004]
and PSKEY_USR3 is set to [0x1234].
&028E= Set zero length value for PSKEY_USR4
&028F- However, this clears PSKEY_USR5
Despite the apparent similarity, there is an
important distinction between these actions; clearing
a key makes the default or factory set value visible.
&0290 + ABCD
Set PSKEY_USR6 to [0xABCD] unless it already has a
value.</pre>
</td>
</tr>
</table>
<code>PSTool</code> has support for <i>query files</i> that can produce persistent store files automatically. See the <code>PSTool</code> documentation for details.
<h2>Signing Persistent Store</h2>
A persistent store file can be signed using <a href="dfusign.html" title="dfusign"><code>dfusign</code></a> prior to construction of a DFU file. The signature is stored in pseudo key <code>&F001</code>.
<p>
The signed file can be edited without affecting the signature, providing that no changes are made to the key data. This essentially means that updates to the formatting and comments are safe.
<h2>Target BlueCore Variants</h2>
Persistent store settings may be appropriate for a restricted set of BlueCore variants. This information can be encoded within the persistent store file using pseudo key <code>&F002</code>. This specifies a 64 bit bitfield constructed by OR-ing together one or more of the following values:
<table border=1 align=center>
<tr>
<th>Value</th>
<th>Description</th>
</tr>
<tr>
<td><code>0000 0000 0000 0001</code></td>
<td>BlueCore01</td>
</tr>
<tr>
<td><code>0000 0000 0000 0002</code></td>
<td>BlueCore2-External</td>
</tr>
<tr>
<td><code>0000 0000 0000 0004</code></td>
<td>BlueCore2-ROM/Audio/FLASH</td>
</tr>
<tr>
<td><code>0000 0000 0000 0008</code></td>
<td>BlueCore3-Multimedia/FLASH</td>
</tr>
<tr>
<td><code>0000 0000 0000 0010</code></td>
<td>BlueCore3-ROM (should never be useful)</td>
</tr>
<tr>
<td><code>0000 0000 0000 0020</code></td>
<td>BlueCore3-FLASH</td>
</tr>
<tr>
<td><code>0000 0000 0000 0040</code></td>
<td>BlueCore4-External</td>
</tr>
</table>
<p>
As an example, the following indicates that the file is suitable for both BlueCore01 and BlueCore2-External:
<table border=1 align=center bgcolor="#eeeeee">
<tr>
<td>
<code>&F002 = 0000 0000 0000 0003</code>
</td>
</tr>
</table>
<p>
The <a href="dfubuild.html" title="dfubuild">dfubuild</a> tool takes triples of persistent store files (unprotected, stack software's, and application software's) for its <code>-p3</code> option. All of the files in a triple that specify a value for the <code>&F002</code> pesudo-key must specify the same value.
<p>
If none of the files in a triple specify which BlueCore variants are supported then they are assumed to be suitable for BlueCore01 only.
<p>
The <a href="dfubuild.html" title="dfubuild">dfubuild</a> software does not need to know the significance of the values, so it will not need to change as new chip variants are released. However, that means this documentation will become incomplete as new chip variants are released. Contact CSR for information on other chip variants.
<p align=right><font size="-1">© 2001, 2002, 2003 <a href="http://www.csr.com" title="CSR" target="_blank">CSR</a></font></p>
</body>
</html>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -