TDK InvenSense 的 CH-101 Drive Hands On 规格书

l< chirp="" microsystems="">
AN-000154
CH-101 Example Driver Hands On
This document contains information on a pre-production
product and should not be considered for production
until qualification is complete. Chirp Microsystems
reserves the right to change specifications and
information herein without notice.
Chirp Microsystems
2560 Ninth Street, Ste 200, Berkeley, CA 94710 U.S.A
+1(510) 640–8155
www.chirpmicro.com
Document Number: AN-000154
Revision: 1.0
Release Date: 08/02/2019
CH-101 Example Driver Hands On
l< chirp="" microsystems="" atmel="" studio="" 7="">
AN-000154
CH-101 Example Driver Hands On
Document Number: AN-000154 Page 2 of 11
Revision: 1.0
INTRODUCTION
This exercise demonstrates how to build and run a simple ultrasonic sensing application using the Chirp CH-101 example driver. The
application runs on the SmartSonic evaluation board, which uses an Atmel SAMG55 microcontroller. The application can run with
either a single sensor or multiple sensors connected to the board.
REQUIRED EQUIPMENT
SmartSonic evaluation board
CH-101 sensor daughter board
Two Micro-USB cables
Internet connection (if downloading and installing files)
REQUIRED SOFTWARE PACKAGES
Chirp CH-101 driver example – Atmel Studio 7 project files
SmartSonic_ExampleDriver.zip
Atmel Studio 7
Terminal emulator of your choice (for example PuTTY or TeraTerm)
l< chirp="" microsystems="">
AN-000154
CH-101 Example Driver Hands On
Document Number: AN-000154 Page 3 of 11
Revision: 1.0
TABLE OF CONTENTS
INTRODUCTION ........................................................................................................................................................................................... 1
REQUIRED SOFTWARE PACKAGES .................................................................................................................................................................... 2
1 INSTALLATION / PREPARATION ................................................................................................................................................. 4
2 BUILDING THE EXAMPLE APPLICATION AND DRIVER ................................................................................................................. 5
3 PROGRAMMING THE SMARTSONIC BOARD ............................................................................................................................... 6
4 RUNNING THE EXAMPLE APPLICATION ...................................................................................................................................... 9
5 USING ALTERNATE SENSOR FIRMWARE IMAGES ..................................................................................................................... 10
6 REVISION HISTORY ................................................................................................................................................................... 11
LIST OF FIGURES
Figure 1. SmartSonic with CH-101 Daughter Card ............................................................................................................ 4
Figure 2. Device Programming Screen ............................................................................................................................... 6
Figure 3. Programming Clock Frequency ........................................................................................................................... 7
Figure 4. Device Signature and Target Voltage ................................................................................................................. 7
Figure 5. Programming Hex File .......................................................................................................................................... 8
Figure 6. Successful Programming ..................................................................................................................................... 8
Figure 7. Example Application Output ................................................................................................................................ 9
l< chirp="" microsystems="" .‘x="" ‘="" n="" ammo="" m="" m="" u="" any="" war="" usa:="" sum="" 172="" ,="" u="" only="" man="" usa="" shun="" 34="" n="" um="" usa:="" sum="" 1.2="" or="" :4="" ‘oooooooooor'="" ,”="" m="" 0000="" 2="" 2="" e="" 2‘="" a“="" 3="" swim-l="">
AN-000154
CH-101 Example Driver Hands On
Document Number: AN-000154 Page 4 of 11
Revision: 1.0
1 INSTALLATION / PREPARATION
Download and install Atmel Studio 7 IDE.
Download and install the CH-101 driver example.
Install terminal emulator.
Connect the CH-101 sensor to the DVB board with flex cable(s).
Connect the SmartSonic board to a Windows PC with the two USB cables.
Figure 1. SmartSonic with CH-101 Daughter Card
Open Windows Device Manager look in the Ports (COM & LPT) list and identify the COM port numbers assigned to the
SmartSonic board. There will be two ports associated with the SmartSonic board: EDGB and USB Serial Port. You will need
to specify the USB serial port number when using a terminal emulator to display output.
l< chirp="" microsystems="" do="" not="">
AN-000154
CH-101 Example Driver Hands On
Document Number: AN-000154 Page 5 of 11
Revision: 1.0
2 BUILDING THE EXAMPLE APPLICATION AND DRIVER
Open Atmel Studio 7
Open the driver example project:
o Open File menu
o If you are using a new System Workbench installation:
Select File > Open > Project/Solution… > Select the SmartSonic_ExampleDriver.atsln file in the project
directory.
Click Open. The program should locate the project files and display the name of the project.
Build the project:
o Select Build > Rebuild Solution
The project should build successfully (with some warnings). The default build configuration is Debug” so the build
output files will be placed in the Debug sub-directory.
o Warning: Do NOT select “Clean Solution” or otherwise clean the build output files. Doing so will remove some
build definition files, and the next build(s) will fail. If you have this problem, run “Build Project” several (3 or 4)
times until the build succeeds – the repeated builds will ultimately reconstruct the missing files.
l< chirp="" microsystems="" 596="" n="" mammy="" t="" it‘sz:="" um‘="" dewteand="" mum="">
AN-000154
CH-101 Example Driver Hands On
Document Number: AN-000154 Page 6 of 11
Revision: 1.0
3 PROGRAMMING THE SMARTSONIC BOARD
Connect the SmartSonic board to a Windows PC with the two USB cables
Select Tools > Device Programming.
The Device Programming screen will appear:
Figure 2. Device Programming Screen
Verify that the tool is EDBG, device is ATSAMG55J19, and interface is SWD.
Select Apply.
o Note: Atmel Studio 7 may require you to update the EDBG debug interface firmware on the SmartSonic board
before continuing. Follow the on-screen instructions to update the EDBG firmware.
The Device Programming screen will prompt to set the programming clock frequency:
@TDK Chirp Microsystems Enxnwmrriirrrrrrm mmwmm 1 x M Dunn Mam Muyrunm WNW: WW mmm "m M“WWWNWWWW Wm El M m mummwm umnwmm 1 x M 5m mm Mum“ "gm-q: mm “mm . m) ~ m MM m @ mmm W mmunmumywnmnmwmonxw’in mm, a Mummm
AN-000154
CH-101 Example Driver Hands On
Document Number: AN-000154 Page 7 of 11
Revision: 1.0
Figure 3. Programming Clock Frequency
Leave the clock frequency at the default and select Set.
Select Read near the Device signature field.
The Device programming menu should look as follows:
Figure 4. Device Signature and Target Voltage
Select Memories on the Device Programming menu.
The Device Programming menu will prompt for the name of the hex file to program:
@TDK Chirp Microsystems maerrrm Dnnpmwammmq 7 x M hm 1mm may.“ Mm“! mwl AVSAMfitSAW . m 4m mums El nv @ “mm, \Emw v WWW mmmm — y—mm‘hmmmM,Wm“Jumwmflmmmmu. D “W“ Eifim‘fiyfifi‘? IE mm: 9.4.“: Smfiy ludmgdmu‘fl a Box mmmmmmmummy z x nu r...“ Mm um,“ “m; was - ”mama . m: { Ixzoswv uv @ mm“, pm WWW" sum-p A 5mm.“ mmmm — («MWWWMMMMMKJ“wkaMQMWM rug “WM“ EE§“13‘§:;TZTM7S IE1 El "’“M‘ 6mm mm, mm... ax a vawqu a...“
AN-000154
CH-101 Example Driver Hands On
Document Number: AN-000154 Page 8 of 11
Revision: 1.0
Figure 5. Programming Hex File
From the Device Programming screen scroll to the project’s debug directory and select the SmartSonic_ExampleDriver.hex
file.
Select Program. Your SmartSonic board is successfully programmed when the Device Programming screen displays the
following on the bottom left:
Figure 6. Successful Programming
@TDI( Chirp Microsystems m _ M? hymn m Saw cam: Wmdaw m. mm m MM- 3] :2 m mum]: a mu m. nu ma am» , m; yagxste» 94% My.” mm » w. mm mm 3 mu m up we 3mm m- :55 m, mm mm, mm um. n :4 p arm n; 17 h—n’. mm». s,» mm mm mm M: m mm mm mm V'nmflr nu.» . mm m: on . In“, ppm m.” on , asp.“ mu 1mm. , as can hum » flmvlitudc - m m.- mama: flnvlitudc m.) num- m... - mh. mama: finvlitudc m.) num- M-uuLu-lz. mama: mun Inm- - MuuliLu-Iz. finvlitudc m.) num- MnuliLu-lg. mama: m... | . mm; mum: finvlitudc, «mmmp. «mum-d: mm a. Nmflyn ,_ Mn “Lu-l:- : u 1/ , mph mp In -. wulr: 5 \mplcr. c mm“, ~,m..h-. a mph 1 mp m -. wulr: Np] c mm“, ~,m..h-. a mph 1 mp m . w|u]( Np] c mm“, amnuln. a mph ( upicd Nunpd Luuizd capicd mum m w upicd Nun”! mg ml cupicd mum Erwin-Y upicd Nun”! uaind cupicd mum mpw pp 1:4
AN-000154
CH-101 Example Driver Hands On
Document Number: AN-000154 Page 9 of 11
Revision: 1.0
4 RUNNING THE EXAMPLE APPLICATION
Start the terminal emulator program and open/configure the COM port assigned to the SmartSonic board:
o 921600 baud (non-standard but should work with most terminal emulators)
o 8 bits data, no parity, 1 stop bit
o New-line sequence = Line Feed only (no carriage return)
Reset the SmartSonic board using the board’s reset button (next to the Programming EDGB connector).
Status messages from the application will appear on the terminal output, followed by summary data from the sensor
initialization (device frequency, etc.).
Range measurement data from the sensor device(s) will be output in a continuous loop. Note that distance measurements
are expressed in millimeters.
Figure 7. Example Application Output
l< chirp="" microsystems="">
AN-000154
Document Number: AN-000154 Page 10 of 11
Revision: 1.0
5 USING ALTERNATE SENSOR FIRMWARE IMAGES
By default, the example application uses standard Chirp “GPR” (General Purpose Rangefinder) sensor firmware. This firmware
provides good performance over various distances under most conditions. Normally, the standard firmware is recommended, and no
changes are required.
For special applications using CH-101 sensors, two options are available. Either or both may be selected by defining symbols in the
inc/main.h header file.
To use a special firmware version that is optimized for short-range performance, define USE_SHORT_RANGE in main.h. This special
firmware provides more measurement resolution at close distances. However, the maximum range for the sensor is reduced
significantly (by a factor of 4).
To use a special firmware version that uses less power when the device is idle, define USE_LOW_POWER in main.h (at or near line
107). This version has a significant disadvantage, however – the performance of the CH-101 sensor is negatively affected by sunlight.
Therefore, it is not recommended for most applications.
@TDK Chirp Microsyskems F @TDK Chirp Microsystems
AN-000154
Document Number: AN-000154 Page 11 of 11
Revision: 1.0
6 REVISION HISTORY
Revision Date Revision Description
08/02/2019 1.0 Initial Release
This information furnished by Chirp Microsystems, Inc. (“Chirp Microsystems”) is believed to be accurate and reliable. However, no responsibility is assumed by Chirp
Microsystems for its use, or for any infringements of patents or other rights of third parties that may result from its use. Specifications are subject to change without
notice. Chirp Microsystems reserves the right to make changes to this product, including its circuits and software, in order to improve its design and/or performance,
without prior notice. Chirp Microsystems makes no warranties, neither expressed nor implied, regarding the information and specifications contained in this document.
Chirp Microsystems assumes no responsibility for any claims or damages arising from information contained in this document, or from the use of products and services
detailed therein. This includes, but is not limited to, claims or damages based on the infringement of patents, copyrights, mask work and/or other intellectual property
rights.
Certain intellectual property owned by Chirp Microsystems and described in this document is patent protected. No license is granted by implication or otherwise under
any patent or patent rights of Chirp Microsystems. This publication supersedes and replaces all information previously supplied. Trademarks that are registered
trademarks are the property of their respective companies. Chirp Microsystems sensors should not be used or sold in the development, storage, production or utilization
of any conventional or mass-destructive weapons or for any other weapons or life threatening applications, as well as in any other life critical applications such as
medical equipment, transportation, aerospace and nuclear instruments, undersea equipment, power plant equipment, disaster prevention and crime prevention
equipment.
©2016—2017 Chirp Microsystems. All rights reserved. Chirp Microsystems and the Chirp Microsystems logo are trademarks of Chirp Microsystems, Inc. The TDK logo
is a trademark of TDK Corporation. Other company and product names may be trademarks of the respective companies with which they are associated.
©2019 Chirp Microsystems. All rights reserved.