CEVA BNO086 Development Kit for Nucleo User Guide
- June 6, 2024
- CEVA
Table of Contents
BNO086 Development Kit for
Nucleo – Quick Start Guide
The BNO086 is a System in Package (SiP) that integrates a triaxial accelerometer, a triaxial gyroscope, magnetometer, and a 32-bit ARM® Cortex™-M0+ microcontroller running CEVA’s SH-2 firmware. This document is intended to provide information about the BNO086 Development Kit, the pin connections and software provided by CEVA to facilitate customer integration.
Hardware
Introduction
The BNO086 Development Kit includes a shield known as the BNO086 (“target device”) Development Board that is designed for quick and easy development and prototyping. The shield is designed to connect to a number of evaluation platforms – one of which is the STM32F411RE Nucleo (“bridgeboard”) which is developed and sold by STMicroelectronics¹ (ST) and is included in the BNO086 Development Kit package. The Nucleo platform includes an STM32F411 MCU that serves as the master to the BNO086. This document includes details for connecting and using the BNO086 Development Kit with the ST Nucleo prototyping platform.
Connections
The BNO086 Development Board simply plugs into the Nucleo board and is ready to use. The reader is encouraged to review the BNO086 Datasheet [1] for more information on the pinout configurations. The BNO086 communicates with a host system over switch-selectable serial interfaces.
Dev Board | Signal | Nucleo |
---|---|---|
J9.1 | NC | CN6.1 |
J9.2 | VDD_TRGT | CN6.2 |
J9.3 | SYS_RST | CN6.3 |
J9.4 | VDD_IO | CN6.4 |
J9.5 | NC | CN6.5 |
J9.6 | GND | CN6.6 |
J9.7 | GND | CN6.7 |
J9.8 | NC | CN6.8 |
Dev Board | Signal | Nucleo |
--- | --- | --- |
J10.1 | NC | CN8.1 |
J10.2 | NC | CN8.2 |
J10.3 | NC | CN8.3 |
J10.4 | NC | CN8.4 |
J10.5 | NC | CN8.5 |
J10.6 | NC | CN8.6 |
Dev Board | Signal | Nucleo |
--- | --- | --- |
J11.1 | SCL | CN5.10 |
J11.2 | SDA | CN5.9 |
J11.3 | NC | CN5.8 |
J11.4 | GND | CN5.7 |
J11.5 | SCK | CN5.6 |
J11.6 | MISO | CN5.5 |
J11.7 | MOSI | CN5.4 |
J11.8 | CSN | CN5.3 |
J11.9 | NC | CN5.2 |
J11.10 | NC | CN5.1 |
Dev Board | Signal | Nucleo |
--- | --- | --- |
J12.1 | CLKSEL0 | CN9.8 |
J12.2 | WAKE | CN9.7 |
J12.3 | NRST | CN9.6 |
J12.4 | BOOTN | CN9.5 |
J12.5 | INT (opt) | CN9.4 |
J12.6 | INT | CN9.3 |
J12.7 | NC | CN9.2 |
J12.8 | NC | CN9.1 |
Dev Board | Signal | NucleoNote |
--- | --- | --- |
J7.3 | RXD | CN10.21 |
J7.2 | TXD | CN10.31 |
Note: Nucleo pins are not connected to the BNO086 Dev Board. External wiring
is required.
Figure 2: BNO086 Development Board Interface to Nucleo Host device
The BNO086 uses the Sensor Hub Transport Protocol (SHTP) to communicate
with a system or application processor (the host that connects to the BNO086).
The SHTP protocol is documented in the BNO086 datasheet, allowing a customer
to potentially develop their own host software if they choose to do so. In
order to ease customer integration, CEVA has developed software that runs on a
host platform such as the STM32F411RE Nucleo series. The software driver fully
implements the communication
protocol used by the BNO086. CEVA provides this software driver package as
source code. The BNO086 Development Kit has programmed the ST Nucleo to work
with the CEVA PC application to demonstrate functions. Customers who intend to
use the BNO086 Development Kit for their own software development should use
the driver package to download new firmware.
Switch Configurations
There are several switches on the board which are used to configure the
hardware to select the protocol for communication with the host. The board is
shipped with the I2C interface setting as the default configuration.
The communication interface is configured by setting the protocol selection
SW2 (PS0/1) pins and SW4, SW6 appropriately.
PS1 | PS0 | BNO086 Transport Protocol |
---|---|---|
0 | 0 | I²C |
0 | 1 | UART-RVC |
1 | 0 | UART-SHTP |
1 | 1 | SPI |
Figure 3: BNO086 Available Selection of Host Communication Interface
SW2 PS0| SW2 PS1| SW4 SPI| SW6 SPI| BNO086
Transport
Protocol
---|---|---|---|---
0| 0| 0| 0| I²C
1| 1| 1| 1| SPI
0| 1| Don’t care| 1| UART-SHTP
Figure 4: Selection of Host Communication Interface in BNO086 Development Board
Figure 5: Default Switch Configuration for I2C
Power Measurement Headers
Two headers are available to provide an easy way to measure the current usage
of the BNO086 device.
J1 is for VDDIO and J2 is for VDD. These two jumpers must be installed for
normal use. If you need to measure the current, you should remove the jumper
and install a current meter.
Figure 6: Power Measurement Headers
Slave Address Selection for I2C Host Interface
The default slave address is 0x4A when SA0 is low (no jumper installed on J5). The slave address is 0x4B when SA0 is high (jumper installed on J5).
Figure 7: Slave Address Selection for I2C Host Interface
Reset Buttons
Two reset buttons are available. SW1 will reset the BNO086 and SW5 will reset the Nucleo.
Figure 8: Reset Buttons
Software
BNO086 Development Kit
BNO086 Development Kit contains a pre-programmed STM32 Nucleo board with CEVA
software that allows communication between the BNO086 and Freespace™
MotionStudio 2.
Freespace™ MotionStudio 2 is a Windows application to allow users to control
and configure the BNO086 through a USB interface. BNO086 Development Kit can
be used for a quick evaluation of the BNO086. A generalized system diagram is
shown in Figure 9.
Figure 9: Simplified System Diagram with Freespace™ MotionStudio 2
Running a PC Demo Application with BNO086 Development Kit
Requirement
Running Freespace™ MotionStudio 2 with BNO086 development kit requires the
following items.
- ST-LINK/V2 USB driver is available from the ST website (http://www.st.com/en/embeddedsoftware/stsw-link009.html).
- ST32 Virtual COM Port Driver from ST website (http://www.st.com/en/developmenttools/stsw-stm32102.html). Once you downloaded and extracted the driver, follow the readme.txt file for the instruction to complete the installation.
- Freespace™ MotionStudio 2 application from https://www.ceva-dsp.com/resource-center/
Connect USB Type-A to Mini-B cable to Nucleo board and your PC. The virtual COM port should appear in your Device Manager.
Figure 10: Device Manager to Check Installed Driver for ST Virtual COM Port
Start Freespace™ MotionStudio 2 (MotionStudio2.exe) after the BNO086 development kit virtual COM port is successfully detected in your PC.
Running PC Application
Start Freespace™ MotionStudio 2
After you unzip the PC Application package, launch MotionStudio2.exe under the
MotionStudio2 folder. This will open the MotionStudio2 window.
Figure 11: Startup Window of Freespace™ MotionStudio 2
Establish Connection to the Nucleo Board
From the menu panel on the left, select Device Connection. This panel allows
users to select a device type, transport protocol, and more.
- “Device Type” of the bridge is set to ST Nucleo.
- ST-Link Virtual COM Port available in your PC appears in the “Virtual COM Port” box.
- “Target Device” is set to SHTP over I2C by default. Check SW2/SW4/SW6 settings for transport protocol selection. Refer to Section 1.3.
- “SA0” is set to 0. Check J5 jumper settings for I2C address selection. Refer to Section 1.5.
- Use the “Connect” button to start.
Figure 12 Device Connection Panel in Freespace™ MotionStudio 2
Figure 13: Device Connection Window after Successful Communication in Freespace™ MotionStudio 2
When the connection process is completed, the three status indicator text
boxes on the upper right-hand corner of the panel and the console window on
the bottom would provide the result of the connection process. The three
status indicators show the status of the connected system and the status of
the associated panel. If the specific panel supports the protocol used by the
connected device, the panel becomes active and shows in green color.
Sensor Control
The Sensor Control panel allows the users to enable and disable the various
sensors individually. There are two ways to control sensors:
- To enable an individual sensor at a default operation rate, use the check box on the right end of the row for each sensor.
- To enable sensors at specific rates, input the requested operation period, in microseconds, in the ‘Requested Period (us)” fields. Then click the “Set Sensor Periods” button on the top of the panel. All sensors will be updated with a specified operating period. The “Requested Period (us)” fields that are left blanked or obtained invalid values are assumed to be “zero”.
In many cases, the sensors do not operate at the exact rate as requested. The actual operating period is shown in the “Reported Period (us)” field. Users can also use the “Get Sensor Periods” button on top of the panel to refresh the actual operating period for all sensors.
Figure 14: Sensor Control Panel in Freespace™ MotionStudio 2
Virtual Object
The virtual Object panel shows the orientation of the device. Please note that
you need to enable sensors in the Sensor Control panel, select the sensor from
the drop-down menu in the Virtual Object panel. The sword in the Virtual
Object will move according to the device orientation.
To adjust the camera position, move the cursor to the Virtual object Panel,
then press the LEFT mouse button. Hold the button down and move the mouse to
change the view position. To reset the camera position, use the “Reset Camera
Position” button.
To display the game rotation vectors, select the game rotation vectors from
the drop-down menu, the data fields should start updating with the received
sensor data. The virtual object will move according to the orientation of the
hardware. Use the Sensor Control Panel to enable or disable the specific
sensor. This panel does not control the sensor but displays the output data.
Figure 15: Virtual Object Panel in Freespace™ MotionStudio 2
Figure 16: BNO086 Device Orientation
Please follow the instruction below to align your device.
- Enable Game Rotation Vector and ARVR Stabilized Game Rotation Vector in the “Sensor Control” panel.
- Switch to the Virtual Object panel and move the background so the black corner of the CEVA logo on the ground plane points to your forward direction (heading).
- Hold the BNO086 development kit Y+ axis points to your forward direction as well.
- Select “Game Rotation Vector” in the drop-down menu and click “Tare Z”. Now, the sword will point to the edge of the CEVA log and is aligned with your device Y+.
- Switch to “ARVR Stabilized Game Rotation Vector” in the drop-down menu to evaluate ARVR Stabilized Game Rotation Vector.
Figure 17: Sensor Orientation in Virtual Object Panel in Freespace™
MotionStudio 2
Backup Bridge Image
Please keep in mind that BNO086 Development Kit is programmed to work with a
Windows PC Application. The development example code explained in Section 2.3
is different and will overwrite the binary image shipped with the BNO086
Development Kit. If you want to switch back to the bridge code to run the
Windows PC Application, please read the Nucleo device memory using STM32 ST-
LINK Utility before downloading a new image into the Nucleo board. Please
follow the instructions below to back up the prebuilt bridge image.
To save the contents of the Nucleo bridge board:
- Open STM32 ST-LINK Utility
- Target->Connect
- Use “Save the displayed content in a Binary File” on the top left corner to save the image into a file for future use.
Alternatively, the bridge firmware is available in the CEVA resource center (https://www.cevadsp.com/resource-center/) To program Nucleo bridge board with the saved image:
- Open STM32 ST-LINK Utility
- Target->Connect
- Target->Program
- In the new window select “File path” to locate the previously saved files.
- Click “Start”
Figure 18: STM32 ST-LINK Utility Window
Development Environment
The example software requires the following items to execute.
-
IAR Embedded Workbench® for ARM (EWARM) by IAR Systems.
-
ST-LINK/V2 USB driver. This driver is available from the ST website and is supported by the IAR Embedded Workbench for ARM (EWARM). After installing EWARM, check IAR_INSTALL_DIRECTORY\arm\drivers\ST-Link\ Please skip this step if you have installed already it from Section 2.2.1.
-
ST32 Virtual COM Port Driver from the ST website. Please skip this if you have installed already it from Section 2.2.1.
Figure 19: Installed driver for ST Virtual COM port -
Terminal emulator software like Tera Term or PuTTy. Set up the terminal emulator at 115200 –8bit – no parity – 1bit stop bit – no flow control.
Example Software
CEVA provides a complete software package for the STM32F411RE Nucleo boards.
The example application for the BNO086 development kit source code is
available in public GitHub.
https://github.com/hcrest/sh2-demo-nucleo
Clone this repository using the –recursive flag with git. Alternatively, you
can download a ZIP file from the link.
git clone –recursive https://github.com/hcrest/sh2-demo-nucleo
Everything required to obtain outputs from the BNO086 is included in this
package. The software package incorporates the BNO086 sensor hub driver,
enabling SH2 functionality for the development system.
The software is organized as an IAR EWARM project that can be dropped into the IAR IDE on a Windows PC. Follow this procedure to compile the project and download the software to the Nucleo board.
- Open IAR Embedded Workbench for ARM (EWARM) version 7.x
- In the File menu, select Open and choose Workspace. Browse to where the example package is extracted and select “sh2-demo-Nucleo/EWARM/Project.eww”. This should open an IAR workspace with all the files within the project.
- Select demo-i2c, demo-spi, or demo-part in the project configuration based on the board settings of SW2/SW4/SW6. Refer to Section 1.3.
- In the “Project” menu, select “Rebuild All” to compile the project.
- After the project is successfully compiled, go to the Project menu and select Download and Debug.
The “sh2” directory contains a full implementation of the CEVA communications
protocol for the BNO086 and User’s Guide for CEVA’s SH-2 driver.
The reader is encouraged to review the BNO086 datasheet[1] and the SH-2
Reference Manual [2] for details on how to construct messages. The output from
the BNO086 is printed through the serial port. The first few lines indicate
that the host has established proper communication (“Product ID Request”) with
the BNO086 and the BNO086 has responded with version information (“Product ID
Response”). Rotation vector is enabled at 100Hz by default and reports are
printed through the serial port.
References
- 1000-3927 BNO08X Datasheet, CEVA, Inc.
- 1000-3625 SH-2 Reference Manual, CEVA, Inc.
- 1000-3600 SH-2 SHTP Reference Manual, CEVA, Inc.
Notices
© Copyright 2021 CEVA, Inc. and/or its subsidiaries (“CEVA”) All rights
reserved. All specifications are subject to change without notice.
Freespace is a registered trademark of CEVA. Other company and product names
mentioned in this document may be the trademark or registered trademark of
their respective owners.
Disclaimer: The information furnished herein is believed to be accurate and
reliable. However, the information is provided “AS IS”, without any express or
implied warranty of any kind including warranties of merchantability, non-
infringement of intellectual property, or fitness for any particular purpose.
In no event shall CEVA or its suppliers be liable for any claims and/or
damages whatsoever arising out of the use of or inability to use the
materials. CEVA and its suppliers further do not warrant the accuracy or
completeness of the information, text, graphics or other items contained
within these materials. CEVA may make changes to these materials, or to the
products described within.
ww.ceva-dsp.com
FOR MORE INFORMATION:
May 2021
www.ceva-dsp.com
1000-4663 Revision 1.2
© 2021 CEVA, Inc. All rights reserved.