UM0796 User manual Demonstration kit for single and double axis gyroscopes in a 5 x 5 mm package Introduction This document applies to all demonstration kits related to ST MEMS single and double axis gyroscopes in 5 x 5 mm packages, hereafter referred to as "STEVAL-MKI0xxV1". The STEVAL-MKI0xxV1 is a demonstration kit designed to provide the user with a complete, ready-to-use platform for demonstration of the LPR5xxxAL, LPY5xxxAL, LY5xxxALH product families. The device includes a sensing element and an IC interface capable of translating information from the sensing element into a measured signal that can be used for external applications. In addition to the MEMS sensor, the demonstration board utilizes an ST72651AR6 microcontroller which functions as a bridge between the sensor and the PC, on which it is possible to use the downloadable graphical user interface (GUI), or dedicated software routines for customized applications. This user manual describes the hardware included with the demonstration kit and provides the information required to install and run the demonstration kit user interface. For details regarding the features of each member of the LPR5xxxAL, LPY5xxxAL, LY5xxxALH sensor families, please refer to the datasheets available for each single device. October 2009 Doc ID 16227 Rev 1 1/34 www.st.com Contents UM0796 Contents 1 Demonstration kit description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2 Working modes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 3 4 2.1 Analog working mode (AWM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 2.2 Digital working mode (DWM) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.3 Additional settings . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 STEVAL-MKI0xxV1 GUI installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.1 PC system requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.2 Software installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 3.3 Hardware installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Graphical user interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 4.1 Connecting to the virtual COM port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.2 GUI main window functions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.2.1 "Easy Start" button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.2.2 "Home" tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.2.3 "Options" tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 4.2.4 "Bars" tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.2.5 "Plot" tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 4.2.6 "Data" tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.2.7 "FFT" tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 5 Data acquisition quick start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 6 STEVAL-MKI0xxV1 Lite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 7 Supported commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 2/34 7.1 Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 7.2 Supported commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 7.2.1 Start command (DWM only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 7.2.2 Debug command (DWM only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 7.2.3 Stop command (DWM only) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 7.2.4 Zon and Zoff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Doc ID 16227 Rev 1 UM0796 Contents 7.3 8 7.2.5 Device name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 7.2.6 Firmware version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 Quick start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 DFU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 8.1 PC requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 8.2 DFU procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 9 Schematic diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 10 Bill of materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 11 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 Doc ID 16227 Rev 1 3/34 List of figures UM0796 List of figures Figure 1. Figure 2. Figure 3. Figure 4. Figure 5. Figure 6. Figure 7. Figure 8. Figure 9. Figure 10. Figure 11. Figure 12. Figure 13. Figure 14. Figure 15. Figure 16. Figure 17. Figure 18. Figure 19. Figure 20. Figure 21. Figure 22. 4/34 Demonstration board block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Top silk screen of the STEVAL-MKI0xxV1 demonstration board . . . . . . . . . . . . . . . . . . . . . 6 Top view of the STEVAL-MKI0xxV1 demonstration board . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Software installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Notify icon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Driver installation using the device manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 USB driver installation using the hardware update wizard . . . . . . . . . . . . . . . . . . . . . . . . . 12 Virtual COM driver port assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 Graphical user interface: main window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Home tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Options tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Bars tab - angular rate data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Plot tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Plot tab - zoom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Data tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 FFT tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 STEVAL-MKI0xxV1 Lite GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 Demonstration kit correctly recognized. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Select new firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Flash erasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Flash upgrading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 Schematic diagram of the STEVAL-MKI0xxV1 board . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 Doc ID 16227 Rev 1 UM0796 1 Demonstration kit description Demonstration kit description The STEVAL-MKI0xxV1 is a complete demonstration kit that allows evaluation of the performance of the LPR5xxxAL, LPY5xxxAL, LY5xxxALH low-power double/single-axis gyroscopes with analog outputs. The block diagram of the demonstration board included in the kit is shown in Figure 1. Figure 1. Demonstration board block diagram Control switches (reset, left) U.S.B. S.P.I. MEMS device Analog controls (ST,PD,FS) D.F.U. ST72F651 microcontroller Analog outputs (1x,4x) USB connector Power-on LED AWM LED DWM LED The analog outputs of the device are directly available through a dedicated connector. The ST72651AR6 microcontroller included on the board acquires and converts the analog outputs into digital signals, and provides the data to the user on the PC through the GUI provided with the kit. The device firmware upgrade (DFU) is a feature allowing users to upgrade the firmware of the ST7 microcontroller whenever a new firmware release is available on www.st.com. Switches and LED indicators are used to control and monitor the functionality of the board. The top silk screen view and photo of the full board, respectively, are shown in Figure 2 and Figure 3. Doc ID 16227 Rev 1 5/34 Demonstration kit description UM0796 Figure 2. Top silk screen of the STEVAL-MKI0xxV1 demonstration board Figure 3. Top view of the STEVAL-MKI0xxV1 demonstration board ref 12 ref 8 ref 3 ref 10 ref 1 ref 7 ref 2 ref 4 ref 5 ref 11 ref 6 ref 9 Operation of the STEVAL-MKI0xxV1 demonstration kit requires the installation of a dedicated driver which is included in the installation pack, together with a GUI interface which allows simple interaction with the sensor. The steps required for driver and software installation are described in the sections that follow. 6/34 Doc ID 16227 Rev 1 UM0796 2 Working modes Working modes The STEVAL-MKI0xxV1 demonstration board is designed to be used in two different working modes: - Analog working mode (AWM): the microcontroller on the board is disabled and the analog outputs of the device are available to the user on the dedicated connector (Figure 3, ref 7). This is the default working mode when power is applied either through the USB connector or through the supply connector (Figure 3, ref 10). -Digital working mode (DWM): the microcontroller on the board is enabled and allows the user to digitally acquire the output signals of the device, to see them on the PC through the dedicated GUI and to manage the control pins of the device. Each working mode requires a board setup, which is done by correctly setting the jumpers labeled JP4, JP5, JP7 (see ref 1, ref 2 and ref 3, respectively, in Figure 3) and the jumpers labeled JP1 and JP6 (see ref 4 and ref 5, respectively, in Figure 3). 2.1 Analog working mode (AWM) AWM is the working mode activated by default when the board is connected to a PC by USB or when the power supply is applied to J10. The microcontroller on the board is disabled and board behavior can be controlled through the dedicated jumpers. In this working mode, the power down (PD), self-test (ST) and high-pass filter reset (HP) functions are respectively managed by JP4, JP5 and JP7 as described below (see Figure 3 to identify the jumpers): Table 1. Jumper configurations for power down (PD), self-test (ST) and high pass filter reset (HP) in AWM Jumper on 1-2 position Jumper on 2-3 position JP4 ST Logic level 1: self-test ON Logic level 0: self-test OFF, default JP5 PD Logic level 1: power down mode Logic level 0: normal mode, default JP7 HP Logic level 1: external high-pass filter reset Logic level 0: normal mode, default Analog output signals can be measured respectively through pin 3 (marked Out1), pin 4 (marked Out2, for single-axis devices only) and pin1 (GND) of the J3 header (see Figure 3, ref 7). The JP1 and JP6 jumpers allow the user to select which output signal is available on J3. Doc ID 16227 Rev 1 7/34 Working modes Table 2. Note: UM0796 Jumper configurations for JP1 and JP6 in AWM Jumper on 1-2 position Jumper on 2-3 position JP11 1xOut1 (not amplified): on J3-pin 3 (Out1) 4xOut1 (amplified): on J3-pin 3 (Out1) JP6 1xOut2 (not amplified): on J3-pin 4 (Out2) 4xOut2 (amplified): on J3-pin 4 (Out2) Not connected for single axis devices The JP9 and JP8 (for double axis devices only; see Figure 3, ref 6 and ref 11) jumpers allow the management of external (HP and LP) filters, respectively, for Out2 and Out1. Table 3. Jumper configurations for JP9 and JP8 in AWM Configuration Function pin 1-2 short HP and LP filters enabled pin 3-4 short pin 2-4 open HP and LP filters bypassed pin 3-4 short Note: Not connected for single axis devices 2.2 Digital working mode (DWM) When the board is configured for DWM, it can be controlled by a PC through the dedicated GUI. The USB works as an interface channel between the PC and demonstration kit board by means of the microcontroller. The microcontroller takes advantage of its on-board 8-bit A/D converter to read analog values from the device and to convert them in digital values, then sends them to the PC via the USB channel. For the board to work in DWM, the jumpers must be configured as described in Table 4. Table 4. Jumper configuration for DWM Jumper JUMPER position JP4 ST 2-3 (default) or not connected JP5 PD 2-3 (default) or not connected JP7 HP 2-3 (default) or not connected JP1 and JP6 Refer to Table 1 JP9 and JP8 Refer to Table 3 Users can interact with the board by means of the STEVAL-MKI0xxV1 GUI and/or Microsoft(c) Hyper Terminal (refer to Section 4 and Section 7). 8/34 Doc ID 16227 Rev 1 UM0796 2.3 Working modes Additional settings JP2 must be present on the board to enable the DFU feature (Figure 3, ref 8). For detailed information on the DFU feature, see Section 8. JP3 allows the measurement of current consumption (Figure 3, ref 9) J4 (usually open) is used to supply the board, alternatively, through a USB connection (Figure 3, ref 10). Doc ID 16227 Rev 1 9/34 STEVAL-MKI0xxV1 GUI installation 3 UM0796 STEVAL-MKI0xxV1 GUI installation The installation of the graphical user interface (GUI) for the STEVAL-MKI0xxV1 requires two steps: 3.1 1. installation of the software downloaded from www.st.com 2. installation of the virtual COM driver needed to use the demonstration kit PC system requirements Both the hardware and software that compose the STEVAL-MKI0xxV1 demonstration kit have been designed to operate with Microsoft(R) Windows XP. 3.2 Software installation To install the software: 1. double-click on "Setup.exe". 2. follow the on-screen instructions (Figure 4). Figure 4. 10/34 Software installation Doc ID 16227 Rev 1 UM0796 3.3 STEVAL-MKI0xxV1 GUI installation Hardware installation To install the virtual COM driver, insert the demonstration kit board into a free USB port. The "notify" icon should appear as in Figure 5. Figure 5. Notify icon AM01769v1 If the "Hardware Update Wizard" window appears (Figure 7), follow the instructions on the screen, otherwise, the installation can be performed by following the instructions indicated in Figure 6 and then Figure 7. Figure 6. Driver installation using the device manager Right click on My Computer Right click on "ST MEMS UNIT" and choose update driver AM01770v1 Doc ID 16227 Rev 1 11/34 STEVAL-MKI0xxV1 GUI installation Figure 7. UM0796 USB driver installation using the hardware update wizard 3 4 6 5 7 AM01771v1 Once the installation is complete, a COM port number is assigned to the ST virtual COM driver (Figure 8). This number should be retained, as it is required to run the STEVALMKI0xxV1 demonstration software GUI. For additional details, see section 4.1. 12/34 Doc ID 16227 Rev 1 UM0796 STEVAL-MKI0xxV1 GUI installation Figure 8. Virtual COM driver port assignment AM01772v1 Doc ID 16227 Rev 1 13/34 Graphical user interface 4 UM0796 Graphical user interface To run the STEVAL-MKI0xxV1 demonstration software GUI: 1. Click on Start > All Programs. 2. Select STEVAL-MKI0xxV1 > Executables. 3. Launch the program "STEVAL-MKI0xxV1 Ver.0.0.1". The GUI main window appears as shown in Figure 9. Figure 9. Graphical user interface: main window ref 3 ref 1 ref 2 ref 4 ref 5 14/34 Doc ID 16227 Rev 1 UM0796 Graphical user interface The functions of the four main sections of the window are described below: 4.1 1. "Main control" (Figure 9, ref 1) - connects/disconnects the board and starts acquisition via the Start/Stop buttons. 2. "Saving" box (Figure 9, ref 2) - allows the user to save the data to a specified text file, choosing the data type to write. Data types available are: a) LSB: the analog values measured by the 8-bit A/D converter of the microcontroller are converted to 8-bit values, hence the 256 magnitude levels. b) Angular rate: LSB data are multiplied by the sensitivity to obtain the angular rate, expressed in deg/sec. 3. "Tab selector" (Figure 9, ref 3) - used to toggle between the different features of the demonstration kit. 4. "Legend" (Figure 9, ref 4) - used to enable/disable viewing the axes. 5. "Details" (Figure 9, ref 5) - shows information about the demonstration kit, such as the name of the sensor, the version of the firmware loaded on the microcontroller and the version of the PC software. Connecting to the virtual COM port Before using the functions of the demonstration kit software, the connection with the STEVAL-MKI0xxV1 board must be opened using the following steps: 1. Connect the STEVAL-MKI0xxV1 to the desired USB port. 2. In the "Select COM" drop-down menu (Figure 9 ref 1), choose the virtual COM number to which the board has been mapped. For additional information on how to obtain this number, see section 3.3. Otherwise, press "Find" to automatically get the correct COM number. 3. Open the connection by clicking on "Connect" (Figure 9 ref 1). Opening the connection starts the board model recognition flow. If the flow terminates successfully, a recognized board code and mounted device code is generated and written on the "Home" tab. Otherwise, a message on the same tab alerts the user to check the board. At this point, the user can acquire, plot and save the angular rate data measured by the sensor and access the content of the registers embedded in the device. If the "Find" button is pressed (Figure 9 ref 1), the GUI attempts to automatically find the COM number assigned to the demonstration kit, and displays it in the list box as a selected item. 4.2 GUI main window functions The following sections provide details regarding the functions of the tabs and buttons on the GUI main window (see Figure 9). 4.2.1 "Easy Start" button When the "Easy Start" button is clicked (Figure 9, ref 1), the GUI attempts to automatically find the COM number assigned to the demonstration kit, to recognize the connected board and its device and, if successful, starts the acquisition. If recognition is unsuccessful, a message alerts the user to verify that the board type is in the list of managed ones, or to update the SW. Doc ID 16227 Rev 1 15/34 Graphical user interface 4.2.2 UM0796 "Home" tab This tab is used to show the codes of managed and recognized devices and demonstration boards (Figure 11). In case of unmanaged devices, a message is shown on the tab. Figure 10. Home tab 4.2.3 "Options" tab The options tab allows the user to control the following parameters: 1. Operating mode (OM): allows the customer to select the operating mode: Normal Mode, Power Down Mode (Figure 11, ref 1). 2. OUTPUT Amplification/FullScale Selection: allows the selection of the data to be are acquired and plotted by the GUI between 1x amplification and 4X amplification (Figure 11, ref 2). 3. Self Test (ST): enables the self-test function. (Figure 11, ref 3). 4. High Pass Filter (HPF) Reset: allows user to reset the internal high-pass filter (Figure 11, ref 4). Figure 11. Options tab 16/34 ref 1 ref 3 ref 2 ref 4 Doc ID 16227 Rev 1 UM0796 4.2.4 Graphical user interface "Bars" tab The bars tab (Figure 12) displays the available (pitch, roll and/or yaw) angular rate data measured by the device in a bar chart format (see Figure 9, ref 4). The height of the bar is determined by the amplitude of the signal measured around the axis. The full scale of the graph is fixed to 2 times the selected full scale of the selected device. Figure 12. Bars tab - angular rate data Doc ID 16227 Rev 1 17/34 Graphical user interface 4.2.5 UM0796 "Plot" tab The plot tab (Figure 13) shows the sequence of selected angular rate samples that have been measured by the MEMS sensor and converted by the A/D converter. The tab shows the "angular rate values" (Figure 13, ref 1) the numeric values of angular rates samples that have been measured by the sensor expressed as deg/sec. Figure 13. Plot tab ref 1 18/34 Doc ID 16227 Rev 1 UM0796 Graphical user interface Figure 14. Plot tab - zoom 1) Select one point on the screen and click the LEFT mouse button. 2) Holding the LEFT mouse button pressed, move the cursor to select an area on the screen. 3) Releasing the LEFT mouse button to terminate the zoom in process, a new magnified area is shown on the screen. 4) To return to the original view, click the RIGHT mouse button. Doc ID 16227 Rev 1 19/34 Graphical user interface 4.2.6 UM0796 "Data" tab The data tab (Figure 15) shows the angular rate values measured by the device. It is divided into two sections: Note: 1. "ADC out" (Figure 15, ref 1) - displays the angular rate data provided by the sensor after its conversion to digital format by the 8-bit AD converter 2. "Angular rate value" (Figure 15, ref 2) - represents the angular rate data measured by the sensor, converted by the AD converter and multiplied by the currently-selected sensitivity. Values are expressed as deg/sec. To increase data readability, the values shown in the boxes described above are based on an average of 50 samples. Figure 15. Data tab ref 1 ref 2 20/34 Doc ID 16227 Rev 1 UM0796 4.2.7 Graphical user interface "FFT" tab The FFT tab (Figure 16) shows the FFT of the angular rate signals acquired by the sensor. The spectral data are updated for every sample arrival and are calculated on a 64-sample moving window. Figure 16. FFT tab Doc ID 16227 Rev 1 21/34 Data acquisition quick start 5 UM0796 Data acquisition quick start This section describes the basic steps that must be performed to acquire the yaw data from the STEVAL-MKI0xxV1: 22/34 1. Connect the STEVAL-MKI0xxV1 to the USB port. 2. Start the STEVAL-MKI0xxV1 GUI. 3. Select the virtual COM port and click on the "Connect" button (Figure 9, ref 1). 4. Select the destination file to which the yaw data must be saved by clicking "Save" (Figure 9, ref 2) in the main control section (optional). 5. Use the tab menu to display the desired function. 6. Click on the "START" (or "STOP") button to activate (or stop) the sensor data collection, saving to file, and screen plotting functions. 7. To close the application, click on "Disconnect" and then click on "Exit". Doc ID 16227 Rev 1 UM0796 6 STEVAL-MKI0xxV1 Lite STEVAL-MKI0xxV1 Lite A lite version of the GUI together with its source code is also included in the installation pack. The source code can be found in the directory: ($Home)\STM\STEVALMKI0xxV1\STEVAL-MKI0xxV1_lite, where ($Home) is the directory in which the software that came with the demonstration kit was installed (C:\Program Files by default). The purpose of the lite version is to provide the user with a foundation for the development of a customized application. The lite version of the demonstration kit is started by launching the STEVAL-MKI0xxV1 Lite executable file located in the STEVAL-MKI0xxV1 > Executables folder. An example of the GUI of the STEVAL-MKI0xxV1 Lite application is shown in Figure 17. Figure 17. STEVAL-MKI0xxV1 Lite GUI Follow these instructions to use the software: 1. Connect the STEVAL-MKI0xxV1 to the USB port. 2. Launch the GUI for STEVAL-MKI0xxV1 Lite. 3. Select the virtual COM port and click on the "Connect" button. 4. Select the destination file to which the yaw rate data must be saved (optional). 5. Click on the "START" (or "STOP") button to activate (or stop) the sensor data collection, saving to file, and screen plotting functions. 6. To close the application, click on "Disconnect" and then click on "Exit". Doc ID 16227 Rev 1 23/34 Supported commands 7 UM0796 Supported commands The microcontroller mounted on the STEVAL-MKI0xxV1 board is equipped with dedicated firmware which supports a set of commands that allow control of the single axis digital output MEMS sensor and permit the acquisition of the measured angular rate data. The firmware also handles the communication between the STEVAL-MKI0xxV1 and the PC through the USB bus. These features allow users to easily write their own applications to exploit the capabilities of the gyroscope. This section describes the commands that are supported by the firmware for the microcontroller of the STEVAL-MKI0xxV1 demonstration kit. 7.1 Getting started Before using the commands supported by the firmware, the following procedure must be performed: 1. Connect the STEVAL-MKI0xxV1 to the USB port. 2. Launch an application that allows the sending of commands through the virtual serial port. The remainder of this document assumes the use of Microsoft's Hyper Terminal program, available with the Windows XP operating system. 3. Create a new connection, enter a name (ex. "STEVAL-MKI0xxV1"), and click "OK". 4. In the "Connect Using" field, select the virtual COM port to which the USB port has been mapped, and click "OK". 5. In port settings, set bits per second to 115200, data bits to 8, parity to none, stop bits to 1, and flow control to none. Click "OK". 6. In the "Hyper Terminal" application window choose "files" > "properties" > "settings", then click on the "ASCII Setup" button. 7. Select "Send line ends with line feeds" and "Echo typed characters locally". 8. Click the "OK" button to close the "ASCII Setup" window. 9. Click the "OK" button to close the "Properties" window. Once this procedure has been completed the user can utilize the commands described in the following sections by typing them into the Hyper Terminal window. 7.2 Supported commands The table below lists the commands supported by the STEVAL-MKI0xxV1 firmware. Some commands are valid only for DCWM. Using them outside of DCWM could result in unexpected errors. Table 5. 24/34 Supported commands Command Description Returned value Available in WM *start Starts continuous data acquisition s t R 4O2 O2 4O1 O1 oh S DC *debug Returns the angular rate data in readable text format 4*[OUTX=XXXXX] VREF=XXXXX DC Doc ID 16227 Rev 1 UM0796 Supported commands Table 5. Supported commands (continued) Returned value Available in WM Command Description *stop Stops data acquisition DC *Zon Force 3-state (enter in AWM) Both *Zoff Exit from 3-state (enter in DWM) Both *dev Device name e.g. LPR530AL Both *ver Firmware version e.g. PR530AL 1.08 Both Where: 7.2.1 R: Vref value 4O2: 4xOutput2 O2: 1xOutput2 4O1: 4xOutput1 O1: 1xOutput1 0h: byte set to 0 hex value s: service field Start command (DWM only) The *start command initiates the continuous data acquisition. When this command is sent to the board, it returns the angular rate data measured by the device. The angular rate data are packed in a string composed of 5 bytes (plus 2): "s t R 4O2 O2 4O1 O1 0h S". The first two bytes are always the ASCII char "s" and "t" which correspond to the hexadecimal values {73h 74h}, while "R", "4O2", "O2", "4O1" and "O1" respectively represent 8-bit AD converter digital output data for Vref, 4xOutput2, 1xOutput2, 4xOutput1, 1xOutput1. 0h: one byte at hexadecimal value 0. The last byte, marked "S", returns information about the switches mounted on the board. Specifically, bit#0 of the "service data" correspond to the status of SW2 on the demonstration kit board. It is set to 1 when the SW2 switch is pressed (otherwise 0). Before sending the *start command, the device must be out of 3-state and in DWM, hence *start must have been preceded by a *Zoff command. Note: This is a digital working mode only command. 7.2.2 Debug command (DWM only) The *debug command starts the continuous data acquisition in debug mode. When this command is sent to the board, it returns the Vref value and all 4 outputs measured by the device, digitized by the 8-bit AD converter and formatted to a readable text format. The values shown on the screen correspond to the content of the ADC output data and are shown as decimal numbers. Note: This is a digital working mode only command. Doc ID 16227 Rev 1 25/34 Supported commands 7.2.3 UM0796 Stop command (DWM only) The *stop command interrupts any acquisition session that has been started with either the *start or *debug commands. Note: This is a digital working mode only command. 7.2.4 Zon and Zoff The *Zon and *Zoff commands are employed, respectively, to put into 3-state (i.e. highimpedance) and to remove from 3-state (i.e. normal mode) the lines of the ST72651AR6 microcontroller mounted on the demonstration kit. These commands allow the isolation of the sensor from the microprocessor and permit the user to interact with the sensor in a purely analog way. By default, when the kit is turned on the lines are in 3-state mode (or AWM) and the user is required to send the command *Zoff to allow communication between the sensor and the microcontroller (or DWM). 7.2.5 Device name The *dev command retrieves the name of the device mounted on the demonstration kit connected to the PC. The returned value is, e.g., "LPR530AL". 7.2.6 Firmware version The *ver command queries the demonstration kit and returns the version of the firmware loaded in the microprocessor, e.g., "PR530AL 1.08" 7.3 Quick start This section provides the basic sequence of commands to start a data communication session and to retrieve the yaw rate data from the demonstration kit, running in digital working mode: 26/34 1. Connect the STEVAL-MKI0xxV1 to the USB port. 2. Start Microsoft Hyper Terminal and configure it as described in Section 7.1. 3. Inside the Hyper Terminal window, enter the command *Zoff to enable control of the device by the ST72651AR6 microcontroller. 4. Send the *debug command to get the yaw rate data measured by the sensor. 5. Send *stop to end the continuous acquisition and visualization. Doc ID 16227 Rev 1 UM0796 8 DFU DFU The MEMS DFU (device firmware update) GUI is a graphical interface that allows the user to download and replace the firmware of a MEMS demonstration board, directly from a PC, through the USB port. MEMS demonstration boards that mount an ST72651AR6 microcontroller can reprogram an application via USB, in accordance with the DFU class specification defined by the USB Implementers Forum (USB-IF). This capability is useful because it allows the reprogramming of the microcontroller directly in the field and is particularly well-suited for USB applications where the same USB connector can be used both for standard operating mode and for the reprogramming process. Connector J4 must be shorted to allow the DFU procedure. If the demonstration kit is to be reprogrammed through the ICP (in-circuit programming) connector and the ST7 dedicated tools, J4 must be open. 8.1 PC requirements In order to use the device firmware upgrade (DFU) software with the Windows operating system, a recent version of Windows (such as Windows 98, Windows 98SE, Windows Millennium, Windows 2000 or Windows XP) must be installed on the PC. 8.2 DFU procedure Run the DFU.exe file. To enter the firmware update mode the user must plug the USB cable into the demonstration kit while pressing the sw2 button on the board (Figure 3, ref 12). Figure 18 shows the window displayed when the board has been properly detected. Figure 18. Demonstration kit correctly recognized The DFU driver must be installed before using this feature. The driver can be found in "firmwareupdate.zip" in the driver installation folder of the demonstration kit. Doc ID 16227 Rev 1 27/34 DFU UM0796 After installation, "MEMS demonstration DFU" appears in the DFU USB devices list (Figure 18). To execute the firmware upgrade: 1. Click on File > Open, select the directory where the ".dfu" file has been downloaded, and select it (Figure 19). 2. Click on "Upgrade". 3. The internal Flash memory will be erased (Figure 20) and reflashed with the new firmware (Figure 21). Once the procedure is complete, a Windows message appears, stating that a USB device is not recognized. The user can then unplug the USB cable from the STEVAL-MKI0xxV1 demonstration board and use it with the new firmware. To back up the user's current firmware before flashing the demonstration kit with a new one, flag "Upload DFU device" (Figure 18) before clicking on "Upgrade". The user is then prompted to save the current firmware in the preferred directory before the erasing the internal Flash. Figure 19. Select new firmware 28/34 Doc ID 16227 Rev 1 UM0796 DFU Figure 20. Flash erasing Figure 21. Flash upgrading Doc ID 16227 Rev 1 29/34 1 V+ 2 DM 3 DP 4 nc 5 GND USB_mini_B J1 C8 47nF R6 1.5K C9 220nF VCC R7 10K C4 C2 100nF 4.7uF + 1 2 3 4 5 Vddf 6 7 Rled 8 9 Gled DFU_SEL 10 11 C10 12 + 10uF 13 14 15 16 C1 10uF + UVss UDM UDP UVcc UVdd Vddf Vssf PE5 PE6 PE7 PB0 PB1 PB2 PB3 PB4 PB5 SW2 HP_u R1 180R C5 100nF PD_u ST_u D1 C25 33nF R13 33K Vref TP3 TP1 R14 1M 64 oscout 63 oscin 62 61 60 Vddf 59 58 ic cdata 57 ic cclk 56 55 54 53 52 51 nR ESET 50 ic csel 49 12MHz Yoscm 1 3 + 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 VCC C6 100nF Out1 4xOut1 Out2 4xOut2 Vref U2 ST72F651AR6T1E Cosc1 33pF oscin JP8 2 4 C20 470nF Out1 C26 tbd FiltOutX/OutX FiltInX VCONT FiltVDD GND OutAna2 OutAna1 Gled D2 Not Mounted Cosc2 33pF oscout 5 4 3 2 1 Vddf JP6 1 2 3 JP1 1 2 3 Rled R2 100R J3 FiltInZ ST PD HP R3 100R Not Mounted C27 tbd FiltOutZ/OutZ 6 4xOut1 R10 10K 16 Vdd 4xOutX 14 Res 15 Res Vref 7 Vref C21 10nF C22 4.7uF C3 4.7uF PWM0 AIN6 AIN5 AIN4 AIN3 AIN2 OCMP2 OCMP1 PD3 PD2 PD1 PD0 PC7 PC6 PC5 PC4 OSCOUT OSCIN Vss2 Vssa Vdda Vdd2 ICCDATA ICCCLK USBEN AIN1 AIN0 SDA SCL RESET Vpp/ICCSEL PWM1 PB6 PB7 PA0 PA1 PA2 PA3 PA4 PA5 PA6 PA7 SS MISO MOSI SCK Vdd1 Vss1 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 Vddf ST 11 VCC 9 1 3 HP JP7 PD JP5 ST ICP 1 3 5 7 9 2 4 C11 100nF J2 3 2 1 3 2 1 3 2 1 JP9 JP4 PD 12 10 HP 13 Out2 U1 2 4 6 8 10 Vddf HP_u Vddf PD_u Vddf ST_u C23 4.7uF iccdata iccclk nRESET iccsel R16 10K HP R17 10K PD R11 10K ST R15 1M + C13 10uF Vref 4xOutZ 8 4xOut2 OutAna2 OutAna1 Vref 4 3 2 1 R12 10K R9 33K SW1 NReset DFU_SEL C24 33nF Vdd_dut 1 2 A3 1 Date: 4/27/2009 File: Size: Title C7 100nF R8 1K R4 10K VCC Vddf 2 R5 470R 3 C15 2 1 8 7 6 5 ST662ABD C2+ C2- C1+ C1- U3 LE30CD 1 2 3 4 U4 Revision: 1.0a 4 220nF 3 220nF 1 2 3 4 Time: 4:58:30 PM Sheet 1 of 1 Number: + C14 Q2 SO642 Q1 2STR2215 C18 2.2uF 2 G Doc ID 16227 Rev 1 3 R 30/34 1 8 7 6 5 5 6 7 8 JP2 1 2 iccsel Power Supply J4 www.st.com C17 4.7uF 16V STMicroelectronics S.r.l. Via Tolomeo 1 20010 Cornaredo (MI) - Italy + + TP2 C12 100nF C19 100nF C16 4.7uF 16V VCC VOUT GND SHDN VCC 9 2 1 JP3 Current_Measure Schematic diagram UM0796 Schematic diagram The schematic diagram of the STEVAL-MKI0xxV1 demonstration kit is shown in Figure 22. Figure 22. Schematic diagram of the STEVAL-MKI0xxV1 board UM0796 10 Bill of materials Bill of materials The bill of materials for the STEVAL-MKI0xxV1 demonstration kit is provided in the table below. Table 6. Bill of materials Designator Description Comment Footprint C1 10 F C1206_POL C2 4 F C1206_POL C3 4 F C1206_POL C4 100 nF 0805 C5 100 nF 0805 C6 100 nF 0805 C7 100 nF 0805 C8 47 nF 0805 C9 220 nF 0805 C10 10 F C1206_POL C11 100 nF 0805 C12 100 nF 0805 C13 10 F C1206_POL 220 nF 0805 C15 220 nF 0805 C16 4 F, 16 V C1206_POL C17 4 F, 16 V C1206_POL C18 22 C1206_POL C19 100 nF 0805 C20 470 nF 0805 C21 10 nF 0805 C22 4 F 0805 C23 4 F 0805 C24 2n2 0805 C14 Capacitor C25 2n2 0805 Cosc1 33 pF 0805 Cosc2 33 pF 0805 SMD_LED green LED_SMD_0805 D1 D2 LED SMD_LED 3C LED_SMD_3C J1 USB connector USB_mini_B USB_mini_B J3 Header 8 Header 1x4 Header 1x4 2mm Doc ID 16227 Rev 1 31/34 Bill of materials UM0796 Table 6. Bill of materials (continued) Designator Description Footprint J4 Header 1x2 Header 1x2 2mm JP1 Header 1x2 Header 1x2 2mm JP2 Header 1x2 Header 1x2 2mm Header 1x2 Header 1x2 2mm JP3 JP4 Connector Header 1x3 Header 1x3 2mm JP5 Header 1x3 Header 1x3 2mm JP6 Header 1x3 Header 1x3 2mm JP7 Header 1x3 Header 1x3 2mm JP8 Header 2x2 Header 2x2 2mm Header 2x2 Header 2x2 2mm 2STR2215 SOT-23-3 SO624 SOT-23-3 R1 180 0805 R2 100 0805 R3 100 0805 R4 10 k 0805 R5 470 0805 R6 1 k 0805 R7 10 k 0805 R8 1 k 0805 JP9 Q1 Q2 R9 Header 2x2 Transistor Resistor 33 k 0805 R10 10 k 0805 R11 10 k 0805 R12 10 k 0805 R13 33 k 0805 R14 1 MW 0805 R15 1 MW 0805 R16 10 k 0805 R17 10 k 0805 SW1 NReset SMT_Button SMT_Button SMT_Button Single or dual axis gyro in 5x5mm package LGA-16_5_5_1.6 ST72F651AR6T1E TQFP64_10x10 U3 ST662ABD SO-G8 U4 LE30CD SO-G8 12 MHz SXA SW2 Button U1 U2 Yoscm1 32/34 Comment IC Crystal Doc ID 16227 Rev 1 UM0796 11 Revision history Revision history Table 7. Document revision history Date Revision 22-Oct-2009 1 Changes Initial release. Doc ID 16227 Rev 1 33/34 UM0796 Please Read Carefully: Information in this document is provided solely in connection with ST products. STMicroelectronics NV and its subsidiaries ("ST") reserve the right to make changes, corrections, modifications or improvements, to this document, and the products and services described herein at any time, without notice. All ST products are sold pursuant to ST's terms and conditions of sale. Purchasers are solely responsible for the choice, selection and use of the ST products and services described herein, and ST assumes no liability whatsoever relating to the choice, selection or use of the ST products and services described herein. No license, express or implied, by estoppel or otherwise, to any intellectual property rights is granted under this document. If any part of this document refers to any third party products or services it shall not be deemed a license grant by ST for the use of such third party products or services, or any intellectual property contained therein or considered as a warranty covering the use in any manner whatsoever of such third party products or services or any intellectual property contained therein. UNLESS OTHERWISE SET FORTH IN ST'S TERMS AND CONDITIONS OF SALE ST DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY WITH RESPECT TO THE USE AND/OR SALE OF ST PRODUCTS INCLUDING WITHOUT LIMITATION IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE (AND THEIR EQUIVALENTS UNDER THE LAWS OF ANY JURISDICTION), OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. UNLESS EXPRESSLY APPROVED IN WRITING BY AN AUTHORIZED ST REPRESENTATIVE, ST PRODUCTS ARE NOT RECOMMENDED, AUTHORIZED OR WARRANTED FOR USE IN MILITARY, AIR CRAFT, SPACE, LIFE SAVING, OR LIFE SUSTAINING APPLICATIONS, NOR IN PRODUCTS OR SYSTEMS WHERE FAILURE OR MALFUNCTION MAY RESULT IN PERSONAL INJURY, DEATH, OR SEVERE PROPERTY OR ENVIRONMENTAL DAMAGE. ST PRODUCTS WHICH ARE NOT SPECIFIED AS "AUTOMOTIVE GRADE" MAY ONLY BE USED IN AUTOMOTIVE APPLICATIONS AT USER'S OWN RISK. Resale of ST products with provisions different from the statements and/or technical features set forth in this document shall immediately void any warranty granted by ST for the ST product or service described herein and shall not create or extend in any manner whatsoever, any liability of ST. ST and the ST logo are trademarks or registered trademarks of ST in various countries. Information in this document supersedes and replaces all information previously supplied. The ST logo is a registered trademark of STMicroelectronics. All other names are the property of their respective owners. (c) 2009 STMicroelectronics - All rights reserved STMicroelectronics group of companies Australia - Belgium - Brazil - Canada - China - Czech Republic - Finland - France - Germany - Hong Kong - India - Israel - Italy - Japan Malaysia - Malta - Morocco - Philippines - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America www.st.com 34/34 Doc ID 16227 Rev 1