PSTool - User Guide
PSTool - User Guide
PSTool - User Guide
User Guide
December 2005
CSR
Churchill House
Cambridge Business Park
Cowley Road
Cambridge CB4 0WZ
United Kingdom
Contents
1 Introduction .................................................................................................................................................... 3
1.1 PSTool..................................................................................................................................................... 3
2 Opening the PSTool Application .................................................................................................................. 4
2.1 Transport Options.................................................................................................................................... 4
2.1.1 SPI BCCMD ................................................................................................................................. 5
2.1.2 Connecting PSTool Using Other Transport Interfaces ................................................................. 5
3 Description of PSTool Main Window............................................................................................................ 8
3.1 General.................................................................................................................................................... 8
4 Description of PSTool Functionality ............................................................................................................ 9
4.1 File Menu................................................................................................................................................. 9
4.1.1 Merge........................................................................................................................................... 9
4.1.2 Run Query.................................................................................................................................. 10
4.1.3 Dump ......................................................................................................................................... 11
4.1.4 Exit ............................................................................................................................................. 11
4.2 Entry Menu ............................................................................................................................................ 12
4.3 Stores Menu .......................................................................................................................................... 13
4.4 View Menu............................................................................................................................................. 14
4.5 Factory Menu......................................................................................................................................... 14
4.6 Help Menu ............................................................................................................................................. 14
4.7 Filter Field.............................................................................................................................................. 14
4.8 Button Functions.................................................................................................................................... 14
5 Troubleshooting........................................................................................................................................... 15
6 Technical Support........................................................................................................................................ 16
Terms and Definitions ........................................................................................................................................ 17
Document History ............................................................................................................................................... 18
1 Introduction
This document describes the PSTool utility provided with BlueLab and BlueSuite.
1.1 PSTool
PSTool is an editing tool that allows you to read and modify the Persistent Store of BlueCore chips. The
Persistent Store consists of key-value pairs that modify the operation of the firmware.
BlueCore is a very flexible device with many setup options. PS Keys must be set correctly for BlueCore to work in
a particular design. Some of the keys must be calibrated for each individual chip.
Important Note: Do not modify Persistent Store values unless you have a clear understanding of what they do and
the affect that changing the value will have. Careless changes to the Persistent Store can prevent
the firmware from executing correctly or can stop BlueCore from communicating with the PC. In
some cases, it may not be possible to restore the BlueCore device to the state in which it was
supplied.
C:\BlueLab_version\tools\bin\PSTool.exe
2. Double-click PSTool.exe.
Start\Programs\BlueLab x\Tools\PSTool.
! SPI BCCMD
! BCSP
! H4
! H5
! USB
Note: To connect using SPI, an SPI cable connection between the PC printer port and the SPI connection on the
development board is required.
3. Tick the Halt Chip on SPI access check box if this is the required behaviour.
Note: This option is only required when the device is running v15 firmware.
4. Click OK.
Note: SPI BCCMD is the recommended transport protocol when editing the Persistent Store from BlueLab,
since it does not depend on any particular Host Interface.
The alternative transport interfaces available and their configuration is briefly described in the rest of this section.
BCSP
1.3. UART_BAUDRATE - select the preferred Baud rate (bits/s) from the drop-down list and click Set
(this value is required later when connecting using the BSCP option). Unless your PC has a fast
UART, speeds above 115Kbaud may not work.
2. Click Reset.
Note: Ensure there is cable connection from a COM port on the PC to the BlueCore development board.
3. Click Reconnect.
BCSP uses BlueCore Serial Port protocol over the UART interface.
H4
1.3. UART_BAUDRATE - select the preferred Baud (bits/s) rate from the drop-down list and click Set
(this value is required later when connecting using the BSCP option). Unless your PC has a fast
UART, speeds above 115Kbaud may prove unreliable.
2. Click Reset.
3. Ensure there is cable connection from a COM port on the PC to the BlueCore development board.
4. Click Reconnect.
H4 is a Host Control Interface (HCI) five-wire UART transport protocol. It is the simplest of the Bluetooth standard
host transports and has the advantage of simplicity and speed but this is generally outweighed by the
disadvantage of poor error detection.
H5
1.3. UART_BAUDRATE - select the preferred Baud (bits/s) rate from the drop down list and click Set
(this value is required later when connecting using the BSCP option).
2. Click Reset.
3. Ensure there is cable connection from a COM port on the PC to the BlueCore development board.
4. Click Reconnect.
H5 is an HCI three-wire UART transport protocol which provides error detection and correction.
USB
2. Click Reset.
3. Ensure there is a USB cable connection between the PC and the BlueCore development board.
4. Click Reconnect.
Note: When a USB cable is connected to a Casira unit, the RS232 port does not work.
3.1 General
The PSTool main window provides the main user interaction with the PS key values.
The menus in the menu bar provide access to the full range of PSTool functionality, as described in chapter 4.
The Data Display Area displays the value of the currently selected PS Key in a user-friendly format. Here
developers can read the existing value for a selected PS Key and amend it if required.
Note: PS Key values displayed in this area are presented in a user-friendly format. Where appropriate, drop-down
lists of alternative settings for the PS Key are provided to simplify setting alternative values otherwise values
can be changed using the keyboard.
To save changes made to the value of a PS Key click Set before selecting another PS Key.
The buttons displayed on the main PSTool window are provided for convenience. They perform the same
function as frequently used functions that are otherwise accessed from menus in the menu bar.
! Merge
! Run Query
! Dump
! Exit
4.1.1 Merge
This facility sets PS Keys to those contained in a previously saved .psr file (.psr files are created by the
dump and query processes process described in the following sections).
The window closes and the PSKey values in the .psr file are downloaded to the BlueCore chip.
.psq files
.psq files can be written using a plain text editor such as Notepad. The syntax for a .psq files is in the form:
?1234= // read and dump the value of PS key “1234”.
?1234~ 5678 9adc // read and dump value of PS key “1234” if it differs from the data specified.
4. Enter a name for the query results file and click Save.
The file will be saved as a .psr file in the selected location and the window will close.
5. The file can then be opened from its saved location. The file will contain the values dumped as a result
of the query.
4.1.3 Dump
This facility allows a copy of the PS Key as set on the BlueCore module to be saved as a .psr file. This can be
used to reset these values using the Merge facility described in section 4.1.1.
2. Browse to the location in which you wish to save the .psr file.
3. Enter a name for the file.
4. Click Save.
4.1.4 Exit
This option closes the PSTool application.
! Read Entry: reads the value of the PS key selected in the Persistent Key Store list and displays the
value in the status area. This menu item performs the same function as the Read button.
Note: A read is automatically performed when a key is selected from the Persistent Store list.
! Set Entry: writes the value displayed in the status area to the selected PS Key. This menu item
performs the same function as the Set button.
! Delete Entry: removes the selected PS Key. If required, the stack creates the key using a default value
the next time the stack reboots. Otherwise the key displays Not Present when selected in the list. This
menu item performs the same function as the Delete button.
! Describe: displays a brief description of the currently selected PS Key in a separate window.
For example:
This menu item performs the same function as the Describe button.
! Edit raw: allows the user to edit the raw words of the selected PS Key value rather than the user-
friendly presentation in the data display area of the main PSTool window.
! Canned Operations: allows the user to select from a list of predefined operations. These write
individual keys or combination of keys to the required values for the selected option.
For example, selecting @bcsp writes values to two keys PSKEY_HOST_INTERFACE (to UART link
running BCSP) and PSKEY_UART_CONFIG_BCSP (the UART configuration key for BCSP) and sets
them to the required values to allow BCSP transport communication with the host.
Note: During development the layer storing the PS Key value can be largely ignored. The distribution between stores
only becomes significant during production (some keys are set during module production, some later – it is at
this point that the layer used to store the PS Key value becomes more significant)
! All (TIFR)
! Implementation Only (I)
! ROM Only (R)
! RAM Only (T)
! Factory Only (F)
! Not RAM (IFR)
Flash Chip ROM Chip with EEPROM ROM Chip without EEPROM
Keys that are set during product manufacture are generally set in the Factory and Implementation area, while
keys that are set during runtime as a result of user interaction with the product are generally stored in Transient.
Note: If an attempt is made to write the same value for a PSKey in the layer immediately above the layer in which the
value is currently stored, the write commandis aborted.
If Flash is not identified on the chip and there is no E2 supported in the firmware, writes are made in the
Transient layer by default.
Important: ROM chips that use an EEPROM device to store PSKeys require the EEPROM to be initialised before
PSTools. It can be used to set values by TrueTest, E2Write or E2Util.. The amount of space appropriate
for the store is dependent on the BlueCore ROM variant.Refer to the I2C EEPROMS for use with BlueCore
Application Note (CSR ref: bcore-an-008) for recommendations for specific BlueCore variants.
The list can be displayed using either their Friendly names or by Programmer IDs and can be ordered
alphabetically (Sort by name) or by number (Sort by ordinal).
! Factory Set: when a PSKey has a value currently set in the Implementation level selecting Factory Set
applies the setting at the Factory level.
! Factory Restore: if the selected PSKey is set in the Factory level this option removes any values set at
the higher levels.
! Factory Set All: selecting this option removes any values set in the higher levels for the full range of PS
keys for which values have been set in the Factory level.
! Firmware version: reports the version of firmware currently running on the BlueCore chip.
! Describe key: see section 4.2.
! About: opens a separate window displaying version information for PSTool.
! Set: clicking this button saves the value displayed/entered in the data display area to the selected
PSKey.
! Read: clicking this button gets the Persistent Store value for the selected key and displays it in the data
display area.
! Describe: see section 4.2.
! Delete: clicking this button removes the selected PS Key from the Persistent Store.
Note: If required, the stack creates the key using a default value the next time the stack reboots. Otherwise,
the key continues to be reported in the data status area as ‘Not present’.
! Reconnect: clicking this button brings up the Choose Transport window allowing the user to reconnect
after a device resetting or if the transport was disrupted for some reason.
! Reset BC: clicking this button resets the BlueCore device.
Note: The device must be Reset and the stack rebooted before changes made to PSKeys using PSTools take
effect.
5 Troubleshooting
The most common fault experienced when using PSTool is a communication failure with the BlueCore chip.
Note: A failure to communicate with the chip is indicated when PSTool reports ENTRY NOT PRESENT – Click to
add for a PS Key that is known to store a valid entry e.g. Bluetooth Address.
If this occurs there are a few possible causes, which can be readily diagnosed and corrected if necessary:
If neither of the above was causing the communication failure two other possible causes are commonly found to
be the source of the problem:
4. Cause: There is no firmware running on the device or the firmware is not suitable for the BlueCore
variant being used.
5. Cause: The SPI device driver was not included during installation of BlueLab.
Solution: Install the SPI device driver by re-running BlueLab.exe ensuring the option to Install SPI device
driver is selected in the Select Additional Tasks window:
Note: The Install the SPI device drive option is selected by default during installation.
If you only want to install the SPI device driver uncheck the other options before clicking Next to
continue.
6 Technical Support
Further information on all CSR products can be found on the technical support website
(http://www.csrsupport.com).
Developers are also recommended to view the public newsgroups hosted by CSR on the Internet news (NTTP)
server news.csr.com. The newsgroups are a convenient forum for the Bluetooth community to exchange
knowledge and are a valuable source of information.
For setup instructions and guidelines for the use of newsgroups, follow the links on the CSR Support website.
Document History
Revision Date History
blab-ug-008Pb
December 2005
Unless otherwise stated, words and logos marked with ™ or ® are trademarks registered or owned by CSR plc or
its affiliates. Bluetooth® and the Bluetooth logos are trademarks owned by Bluetooth SIG, Inc. and licensed to
CSR. Other products, services and names used in this document may have been trademarked by their respective
owners.
The publication of this information does not imply that any licence is granted under any patent or other rights
owned by CSR plc.
CSR reserves the right to make technical changes to its products as part of its development programme.
While every care has been taken to ensure the accuracy of the contents of this document, CSR cannot accept
responsibility for any errors.
CSR’s products are not authorised for use in life-support or safety-critical applications.