dm00249232

DT0050
Design tip
How to install and run the osxMotionFX Sensor Data Fusion
library
By Raffaele Riva
Main components
osxMotionFX
Real-time motion-sensor data fusion software expansion for
STM32Cube
X-NUCLEO-IKS01A1
Motion MEMS and environmental sensor expansion board
for STM32 Nucleo
STEVAL-MKI160V1
LSM6DS3 adapter board for a standard DIL24 socket
NUCLEO-F401RE
STM32 Nucleo-64 development board with
STM32F401RET6 MCU, supports Arduino and ST morpho
connectivity
How to install the osxMotionFX Sensor Data Fusion SW library
The osxMotionFX is an add-on software package for the X-CUBE-MEMS1. The software
runs on the STM32 and includes drivers that recognize the sensors and provide real-time
motion-sensor data fusion.
The following are the necessary steps to correctly install the osxMotionFX sensor data
fusion library on the NUCLEO-F401RE evaluation board:
1. Plug the X-NUCLEO-IKS01A1 expansion board into the Nucleo-F401
board (if the STEVAL-MKI160V1 board is available, plug it into the XNUCLEO-IKS01A1 expansion board).
2. Connect The Nucleo-F401 board to the PC through a mini-USB cable.
Drivers will be automatically installed.
3. If the X-CUBE-MEMS1 package is already installed on the PC to go
step 4, if not
a. Download the X-CUBE-MEMS1 package found on st.com
b. Unzip the file (suggested location: “C:\Program Files
(x86)\STMicroelectronics\OpenSoftwareX”).
4. Download and install the package osxMotionFX found on st.com.
Note: the default installation will create a folder named “Workspace” in
the folder “C:\Program Files
(x86)\STMicroelectronics\OpenSoftwareX”
a. This will also install the OSX LicenseWizard. Note: the default
installation will create a folder named “OSX LicenseWizard” in
December 2015
DT0050 Rev 1
1/4
www.st.com
the folder “C:\Program Files
(x86)\STMicroelectronics\OpenSoftwareX”
5. From the Workspace folder in the osxMotionFX package, copy the
folder STM32_OSX_MotionFX_Library (in “\Middlewares\ST”) into the
X-CUBE-MEMS1 package in the folder “\Middlewares\ST”. Note: if the
path “\Middlewares\ST” is not present in the X-CUBE-MEMS1, create
it.
6. From the osxMotionFX package, copy the folder DataLogFusion (in
“Projects\Multi\Applications”) into the X-CUBE-MEMS1 package in the
folder “Projects\Multi\Examples”.
7. Open the OSX LicenseWizard:
a. Select “MotionFX” library in the “Select the library to be
activated…” button.
b. Click on “Identify STM32 Nucleo board”.
c. Generate a license request.
d. Send the license request. An automatic mail will be sent from
[email protected] with a node-locked license number.
8. To compile the application example there are available three different
IDEs: IAR Embedded Workbench, KEIL, and System Workbench for
STM32. Taking as a reference IAR, open the project DataLogFusion
in the folder “Projects\Multi\Examples\DataLogFusion\EWARM”
a. Copy and paste the license number obtained in step 7 into the
file osx_license.h in the folder
“\Middlewares\ST\STM32_OSX_MotionFX_Library”
b. Compile the project and download into the target NucleoF401RE board.
How to run the Sensor Data Fusion demo
The steps below quickly summarize how to run the reference example demo embedding
the osxMotionFX library. For more details refer to the UM1866.
The X-CUBE-MEMS1 expansion for STM32Cube contains a utility for Windows PCs
named "Sensors_DataLog.exe ". This utility is located in the X-CUBE-MEMS1 package in
the folder “\Utilities\PC_software\Sensors_DataLog”.
1. Launch Sensors_DataLog.exe and check if the COM device number
for the current expansion board is correct (check in the Windows
"Device Manager" the “STMicroelectronics STLink Virtual COM port”).
2. Set the appropriate delay/interval in milliseconds between consecutive data points;
the default is 500 ms
3. Press "Start Sensor Fusion" and a 3D cube is displayed. The cube animation is
generated using sensor fusion quaternions.
4. Press “Switch to 6x Fusion” button to switch dynamically from 9x fusion to 6x
fusion
December 2015
DT0050 Rev 1
2/4
www.st.com
Support material
Related design support material
Product Evaluation boards:
X-NUCLEO-IKS01A1
STEVAL-MKI160V1
NUCLEO-F401RE
Development kits:
osxMotionFX: Real-time motion-sensor data fusion software expansion for STM32Cube
X-CUBE-MEMS1
Documentation
Data brief:
DB2531: Real-time motion-sensor data fusion software expansion for STM32Cube
User manual:
UM1866: Getting started with the osxMotionFx fusion and compass library for X-CUBE-MEMS1
expansion for STM32Cube
Revision history
Date
04-Dec-2015
December 2015
Version
1
Changes
Initial release
DT0050 Rev 1
3/4
www.st.com
IMPORTANT NOTICE – PLEASE READ CAREFULLY
STMicroelectronics NV and its subsidiaries (“ST”) reserve the right to make changes, corrections, enhancements,
modifications, and improvements to ST products and/or to this document at any time without notice. Purchasers should
obtain the latest relevant information on ST products before placing orders. ST products are sold pursuant to ST’s terms and
conditions of sale in place at the time of order acknowledgement.
Purchasers are solely responsible for the choice, selection, and use of ST products and ST assumes no liability for
application assistance or the design of Purchasers’ products.
No license, express or implied, to any intellectual property right is granted by ST herein.
Resale of ST products with provisions different from the information set forth herein shall void any warranty granted by ST for
such product.
ST and the ST logo are trademarks of ST. All other product or service names are the property of their respective owners.
Information in this document supersedes and replaces information previously supplied in any prior versions of this document.
© 2014 STMicroelectronics – All rights reserved
December 2015
DT0050 Rev 1
4/4
www.st.com