Xtrinsic FXLS8471Q Demonstration Software User Guide 1 Introduction

Xtrinsic FXLS8471Q Demonstration Software User Guide 1 Introduction
Freescale Semiconductor
User Guide
Document Number:FXLS8471QDEMOSWUG
Rev 1.0, 2/2014
Xtrinsic FXLS8471Q
Demonstration Software User
Guide
Contents
1 Introduction
This user guide describes the operation of the Freescale
Xtrinsic FXLS8471Q Demonstration Software. This software
supports FRDM-FXS-MULTI and FRDM-FXS-MULTI-B
sensor expansion boards plugged into a FRDM-KL25Z
Freescale Freedom development platform. The FRDM-FXSMULTI-B contains multiple sensors. However, this evaluation
software focuses solely on the FXLS8471Q accelerometer.
NOTE
For more information on the FRDM-FXSMULTI, go to freescale.com/frdm-multi.
NOTE
For more information on the FRDMKL25Z: Freescale Freedom development
platform, go to freescale.com/FRDMKL25Z.
1.1 System Requirements
The kit requires the following to function properly with the
FXLS8471Q Demo Software:
• The latest PE micro OpenSDA hardware interface
drivers must be installed on your system. The demo
software installer will provide an option for installing
© 2014 Freescale Semiconductor, Inc.
1
Introduction................................................................1
1.1
System Requirements.....................................1
1.2
Programming the FRDM-KL25Z...................2
1.3
Hardware Assembly.......................................2
2
Software Installation..................................................4
3
Quick Start Demonstration........................................5
4
Sensor Data Screen...................................................5
4.1
Sensor Output Frame.....................................6
4.2
Incoming Data Stream Frame........................6
4.3
Sensor Output vs. Sample
Number Frame................................................6
4.4
Configuration Frame......................................7
5
Orientation Screen.....................................................8
6
Data Log File Format................................................9
Introduction
these drivers, otherwise go to pemicro.com/opensda to download up-to-date drivers.
• The latest firmware image for the FXLS8471Q command line interface must be programmed into the FRDM-KL25Z.
See Programming the FRDM-KL25Z for further details.
• Windows® XP, Windows Vista, Windows 7, or Windows 8.
1.2 Programming the FRDM-KL25Z
FRDM-KL25Z features a simple way to program S-record (SREC) files using the OpenSDA protocol. OpenSDA is an openstandard serial and debug adapter, bridging serial and debug communications between a USB host and an embedded target
processor. OpenSDA software includes a flash-resident USB mass-storage device (MSD) bootloader and a collection of
OpenSDA applications. FRDM-KL25Z includes an MSD flash programmer OpenSDA application pre-installed.
The MSD flash programmer is a composite USB application that provides a virtual serial port and an easy and convenient
way to program applications into the KL25Z MCU. The MSD flash programmer emulates a FAT16 file system, appearing as
a removable drive in the host file system, with a volume label of FRDM-KL25Z. Raw binary and SREC files that are copied
to the drive are programmed directly into the flash of the KL25Z and executed automatically.
To learn more, please go to freescale.com and search keyword FRDM-KL25Z Quick Start Package.
To program the FRDM-KL25Z with the required firmware, follow these steps:
1. Install the OpenSDA drivers to your PC using either the PC demo software installer or the drivers from pemicro.com/
opensda.
2. Press and hold SW1 on the FRDM-KL25Z, see Figure 1, and plug one end of the USB cable into the OpenSDA USB
port on the FRDM-KL25Z and the other end into a USB port on the PC.
3. Release SW1. At this point, a virtual drive with the name BOOTLOADER should be recognized by your PC.
4. Drag and drop the file named MSD-FRDM-KL25Z_Pemicro_VERSION.SDA into the BOOTLOADER drive (see
the Necessary Freedom Images folder).
5. Cycle power by disconnecting and reconnecting the USB cable.
6. Drag and drop the file named fxls8471q_CLI_DATECODE.srec into the FRDM-KL25Z virtual drive (see the
Necessary Freedom Images folder).
7. Cycle power by disconnecting and reconnecting the USB cable.
Your kit is now ready to use with the PC demo software.
1.3 Hardware Assembly
This section explains assembly of the kit’s hardware shown in Figure 1.
SW1
OpenSDA
USB port
Figure 1. FRDM-FXS-MULTI-B and FRDM-KL25Z
Xtrinsic FXLS8471Q Demonstration Software User Guide, Rev 1.0, 2/2014
2
Freescale Semiconductor, Inc.
Introduction
J6
(pins 2-3)
J7
(pins 1-2)
D1
LED
Xtrinsic FXLS8471Q
Accelerometer
J22
(pins 1-2)
Figure 2. FRDM-FXS-MULTI-B top view
To assemble the hardware:
1. Align the pins of the FRDM-FXS-MULTI(-B) to the headers of the FRDM-KL25Z so that the two boards mate
properly and press them together.
2. When the board assembly is complete, the pointing direction is indicated by the pointing direction arrow in Figure 3.
3. Connect header J6 pins 2–3 using a jumper. See Figure 2.
Roll Φ
–180° to 180°
N, x
Pointing direction
E, y
D, z
Yaw Ψ
0° to 360°
Pitch θ
–90° to 90°
OpenSDA
USB port
Figure 3. Assembled Kit and NED Coordinate System
4. If a hard-wired connection is desired, complete the following:
a. Plug one end of the USB cable into the USB port on the assembled boards (see Figure 3) and the other end into a
USB port on the PC.
b. Ensure that the OpenSDA serial port is recognized by the OS of your PC. See Figure 4.
Xtrinsic FXLS8471Q Demonstration Software User Guide, Rev 1.0, 2/2014
Freescale Semiconductor, Inc.
3
Software Installation
Figure 4. Example List of Ports in Device Manager
5. If a wireless connection is desired (FRDM-FSX-MULTI-B only), complete the following:
a. Connect header J7, pins 1–2 and header J22, pins 1–2 using jumpers.
b. Move SW1 to ON to use battery power (the battery will be automatically charged whenever there is a hard-wired
connection). See Figure 2.
c. Pair the BT module with the host PC in order to use Serial Port Profile (SPP) for communications. Once the
board and PC are paired and the serial port is opened, LED D1 (blue) will be lit
NOTE
Communication with the kit will fail if the Bluetooth module is enabled (using J7) while,
the COM port is open using a wired connection.
2 Software Installation
This installation procedure is for the Freescale Xtrinsic FXLS8471Q demonstration software, release v1.0.0.0 and later, as
developed for the FRDM-FXS-MULTI(-B) sensor expansion board plugged into the FRDM-KL25Z: Freescale Freedom
development platform.
Installation
1.
2.
3.
4.
Go to freescale.com/FXLS8471Q and click on the link to download the Xtrinsic FXLS8471Q demonstration software.
Read the Freescale software license agreement and click I Accept to begin the download.
Extract the zip file FXLS8471QDEMOSW to a location of your choosing.
Double-click the setup file in the FXLS8471QDEMOSW REVNUMBER directory, and follow the installation
instructions.
Launch
1. At the end of the installation, a desktop shortcut named XTRINSIC-FXLS8471Q-DEMO will appear. Double-click
on the shortcut to run the software.
2. The launch screen shown in Figure 5 will appear until the hardware kit (with the correct firmware) is recognized by the
demonstration software.
The application is now ready for use.
Figure 5. Launch screen
Xtrinsic FXLS8471Q Demonstration Software User Guide, Rev 1.0, 2/2014
4
Freescale Semiconductor, Inc.
Quick Start Demonstration
3 Quick Start Demonstration
This Quick Start demonstration is for the Freescale Xtrinsic FXLS8471Q demonstration software, release v1.0.0.0 and later,
as developed for the FRDM-FXS-MULTI(-B) sensor expansion board plugged into the FRDM-KL25Z: Freedom
development platform.
1. Download and install the PC software after extracting the zip file FXLS8471QDEMOSW to a location of your
choosing using the setup.exe file found in the FXLS8471QDEMOSW REVNUMBER directory.
2. Make sure OpenSDA drivers are installed on your system. (pemicro.com/opensda)
3. Flash firmware image named fxls8471q_CLI_DATECODE.srec found under the Necessary Freedom Images folder
into the FRDM-KL25Z following instructions in Programming the FRDM-KL25Z.
4. Make sure the COM port for the desired connection method is recognized by your PC under Device Manager.
5. Launch the PC demo software by double-clicking on the shortcut XTRINSIC-FXLS8471Q-DEMO on your PC's
Desktop.
The application screen appears as shown in Figure 6. Acceleration data from the FXLS8471Q will be displayed per the
settings shown in the Configuration frame.
4 Sensor Data Screen
This section describes in detail each element of the Sensor Data screen shown in Figure 6.
Figure 6. Sensor Data screen
Xtrinsic FXLS8471Q Demonstration Software User Guide, Rev 1.0, 2/2014
Freescale Semiconductor, Inc.
5
Sensor Data Screen
4.1 Sensor Output Frame
The Sensor Output frame displays the parameters of the most recent accelerometer measurement. The units of the
measurement can be toggled between g and integer bit counts using the g Units and Counts radio buttons.
Figure 7. Sensor Output frame
4.2 Incoming Data Stream Frame
The Incoming Data Stream frame displays the parameters of the fifteen latest accelerometer measurements. The units are
always integer bit counts, showing the raw data coming in from the device.
The Capture To File and Stop Capture buttons enable and disable the data logging of sensor data to a file on the PC disc
drive. This is discussed further in Data Log File Format.
Figure 8. Incoming Data Stream Frame
Xtrinsic FXLS8471Q Demonstration Software User Guide, Rev 1.0, 2/2014
6
Freescale Semiconductor, Inc.
Sensor Data Screen
4.3 Sensor Output vs. Sample Number Frame
The Sensor Output vs. Sample Number frame displays the parameters of the 100 latest accelerometer measurements on a
graph.
The horizontal graph axis always displays the range of the 100 latest samples.
The vertical graph axis displays a range of integer bit counts from –8192 to +8191 (corresponding to the full-scale range of
14-bit accelerometer output using 2's complement representation) when the Counts radio button is checked in Sensor
Output frame. When the g Units radio button is checked, the vertical axis displays the range of numbers representing the grange selected in the Full-Scale Range (FSR) menu in the Configuration frame.
Figure 9. Sensor Output vs. Sample Number frame
4.4 Configuration Frame
The Configuration frame displays operating mode specifics for the FXLS8471Q.
• Output-Data Rate (ODR): Menu for selecting the desired output data rate. See register CTRL_REG1 (0x2A) in the
FXLS8471Q datasheet.
• Oversampling Ratio (OSR): Menu for selecting the desired oversampling ratio. See register CTRL_REG2 (0x2B)
and table Oversampling ratio vs. oversampling mode in the FXLS8471Q datasheet.
• Full-Scale Range (FSR): Menu for selecting the full-scale g-range of the accelerometer output. See register
XYZ_DATA_CFG (0x0E) in the FXLS8471Q datasheet.
• High-Pass Filter (HPF): Menu for selecting the high-pass filter applied to the accelerometer output. See registers
XYZ_DATA_CFG (0x0E) and HP_FILTER_CUTOFF (0x0F) in the FXLS8471Q datasheet.
Figure 10. Configuration frame
Xtrinsic FXLS8471Q Demonstration Software User Guide, Rev 1.0, 2/2014
Freescale Semiconductor, Inc.
7
Orientation Screen
5 Orientation Screen
The Orientation screen displays the tilt orientation using Euler angles (deg) in a NED (x = North, y = East, z = Down)
coordinate system. The orientation is defined relative to a starting position with the PCB assembly oriented flat and pointed
northwards as shown in Figure 3. Since accelerometers are insensitive to rotations about the gravity vector, the yaw angle is
arbitrarily fixed to 0 degrees (due North).
Keep in mind that the FXLS8471Q sensor frame and the PCB frame are not aligned. The software handles this misalignment
prior to calculating roll and pitch angles in the hardware abstraction layer (HAL).
Orientation is also visually displayed.
• A 3D graphics image of a rectangular prism shows the tilt orientation of the PCB.
• A 2D image of a mobile tablet shows how orientation information can be used for adjusting the display to keep images
upright (in portrait/landscape frame). The Bottom edge down orientation shown in Figure 11 corresponds to the
Pointing direction arrow, shown in Figure 3, oriented so it points upward. For more details, see AN3461, Tilt Sensing
Using a Three-Axis Accelerometer, Section 6, Selecting Portrait and Landscape Modes.
Figure 11. Orientation screen
Xtrinsic FXLS8471Q Demonstration Software User Guide, Rev 1.0, 2/2014
8
Freescale Semiconductor, Inc.
Data Log File Format
6 Data Log File Format
The Capture To File and Stop Capture button in the Incoming Data Stream frame enables and disables data logging of
sensor data to a file on the PC disc drive.
When the Capture To File button is clicked, the user is prompted for the output filename and location. Because the file will
be written in ASCII format with tab delimiters, it is recommended to choose a .csv file extension. The data is written when it
is received from the kit based on the sampling rate selected. Once the program starts capturing data, the Capture To File
button will be replaced with a Stop Capture button. The data fields and definitions are explained in Table 1.
Table 1. Data Log Field Description
Data Field
Definition
Date / Time
The date and time of the measurement
Sample Number
An integer counter which increases with each sample
X Accel (Counts)
The x-component of the accelerometer sensor in integer bit counts
Y Accel (Counts)
The y-component of the accelerometer sensor in integer bit counts
Z Accel (Counts)
The z-component of the accelerometer sensor in integer bit counts
X Accel (g)
The x-component of the accelerometer sensor in units of g
Y Accel (g)
The y-component of the accelerometer sensor in units of g
Z Accel (g)
The z-component of the accelerometer sensor in units of g
Xtrinsic FXLS8471Q Demonstration Software User Guide, Rev 1.0, 2/2014
Freescale Semiconductor, Inc.
9
How to Reach Us:
Home Page:
freescale.com
Web Support:
freescale.com/support
Information in this document is provided solely to enable system and
software implementers to use Freescale products. There are no express
or implied copyright licenses granted hereunder to design or fabricate
any integrated circuits based on the information in this document.
Freescale reserves the right to make changes without further notice to
any products herein.
Freescale makes no warranty, representation, or guarantee regarding
the suitability of its products for any particular purpose, nor does
Freescale assume any liability arising out of the application or use of
any product or circuit, and specifically disclaims any and all liability,
including without limitation consequential or incidental damages.
“Typical” parameters that may be provided in Freescale data sheets
and/or specifications can and do vary in different applications, and
actual performance may vary over time. All operating parameters,
including “typicals,” must be validated for each customer application by
customer's technical experts. Freescale does not convey any license
under its patent rights nor the rights of others. Freescale sells products
pursuant to standard terms and conditions of sale, which can be found
at the following address: freescale.com/SalesTermsandConditions.
Freescale, the Freescale logo, Energy Efficient Solutions logo, and
Xtrinsic are trademarks of Freescale Semiconductor, Inc., Reg. U.S.
Pat. & Tm. Off. All other product or service names are the property of
their respective owners.
© 2014 Freescale Semiconductor, Inc.
Document Number FXLS8471QDEMOSWUG
Revision 1.0, 2/2014
Was this manual useful for you? yes no
Thank you for your participation!

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement