STEVAL-MKI022V1

STEVAL-MKI022V1

  • 厂商:

    STMICROELECTRONICS(意法半导体)

  • 封装:

    -

  • 描述:

    DEMO BOARD FOR LIS331DLH

  • 数据手册
  • 价格&库存
STEVAL-MKI022V1 数据手册
UM0609 User manual STEVAL-MKI022V1 demonstration kit for LIS331DLH Introduction The STEVAL-MKI022V1 is a demonstration kit designed to provide the user with a complete, ready-to-use platform for demonstration of the LIS331DLH. The LIS331DLH is a low-power 3-axis linear accelerometer with digital output. 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 ST7-USB microcontroller which functions as a bridge between the sensor and the PC, on which it is possible to use the graphical user interface downloadable to the website 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 the LIS331DLH sensor, please refer to the datasheet for this device and application note AN2847. March 2009 Rev 1 1/40 www.st.com Contents UM0609 Contents 1 Demonstration kit description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2 STEVAL-MKI022V1 GUI installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 3 2.1 PC system requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2 Software installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.3 Hardware installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Graphical user interface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 3.1 Connecting to the virtual COM port . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.2 “Easy Start” button . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 3.3 “Options” tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13 3.4 “Register Setup” tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 3.5 “Bars” tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 3.6 “Plot” tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3.7 “Data” tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 3.8 “Inclinometer” tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.9 “Map Browsing” tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 3.10 “FFT” tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.11 “Interrupt” tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.12 “6 Direction” tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.13 “Portrait/landscape” tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 4 Data acquisition quick start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 5 EK lite . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 6 MEMS pointer . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 6.1 7 6.1.1 Left side: main control . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 6.1.2 Right side: pointer application controls . . . . . . . . . . . . . . . . . . . . . . . . . 28 Supported commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 7.1 2/40 GUI description . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Getting started . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 UM0609 Contents 7.2 7.3 8 Supported commands . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 7.2.1 Start command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 7.2.2 Debug command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 7.2.3 Stop command . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 7.2.4 Register read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30 7.2.5 Register write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 7.2.6 Single bit write . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 7.2.7 Zon and Zoff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 7.2.8 Device name . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 7.2.9 Firmware version . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 Quick start . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 DFU . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 8.1 PC requirements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 8.2 DFU procedure . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 9 Schematic diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 10 Bill of materials . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37 11 Revision history . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 39 3/40 List of figures UM0609 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. Figure 23. Figure 24. Figure 25. Figure 26. Figure 27. Figure 28. Figure 29. Figure 30. 4/40 Demonstration board block diagram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 Top silk screen of the STEVAL-MKI022V1 kit . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Board photograph . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6 Software installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 Notify icon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 Driver installation using the device manager . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8 USB driver installation using the hardware update wizard . . . . . . . . . . . . . . . . . . . . . . . . . . 9 Virtual COM driver port assignment . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 Graphical user interface: main window . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11 Options tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 Register setup tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15 Bars tab - acceleration data . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Bars tab - selected acceleration as a numerical value . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 Plot tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 Plot tab - zoom . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 Data tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 Inclinometer tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Axis inclination . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 Map browsing tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 FFT tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 Interrupt tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23 6D direction tab. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 Portrait/landscape tab . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 STEVAL-MKI022V1 lite GUI . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 MEMS pointer demonstration . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 Demonstration kit correctly recognized. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33 Select new firmware . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Flash erasing . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34 Flash upgrading . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 Schematic diagram of the STEVAL-MKI022V1 board . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36 UM0609 1 Demonstration kit description Demonstration kit description The STEVAL-MKI022V1 is a complete demonstration kit that allows demonstrating the performance of the LIS331DLH low-power 3-axis linear accelerometer with digital output. The block diagram of the demonstration kit is shown in Figure 1. Figure 1. Demonstration board block diagram Control switches (left, right and reset) MEM S senso r D.F.U. SPI USB ST72F651 µC USB connector Power on LED Data ready LED General purpose LED AM01765v1 The ST7-USB microcontroller included on the board allows communication between the sensor device and the PC. The user can interact with the hardware either through the GUI provided with the kit or through dedicated software routines to run customized applications. The device firmware upgrade (DFU) is a feature that allows the customer to upgrade the firmware inside the ST7 microcontroller in case a new firmware relase is available on www.st.com/mems. 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. 5/40 Demonstration kit description Figure 2. UM0609 Top silk screen of the STEVAL-MKI022V1 kit AM01766v1 Figure 3. Board photograph AM01767v1 Operation of the STEVAL-MKI022V1 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 following section. 6/40 UM0609 2 STEVAL-MKI022V1 GUI installation STEVAL-MKI022V1 GUI installation The installation of the graphical user interface (GUI) for the STEVAL-MKI022V1 requires two steps: 2.1 1. installation of the software downloaded from www.st.com/mems 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-MKI022V1 demonstration kit have been designed to operate with Microsoft® Windows XP. 2.2 Software installation To install the software downloaded from demonstration kit web page: 1. double-click on “Setup.exe” 2. follow the on-screen instructions (Figure 4). Figure 4. Software installation AM01768v1 7/40 STEVAL-MKI022V1 GUI installation 2.3 UM0609 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 8/40 UM0609 STEVAL-MKI022V1 GUI installation Figure 7. 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 STEVALMKI022V1 demonstration software GUI. For additional details, see section 3.1. 9/40 STEVAL-MKI022V1 GUI installation Figure 8. UM0609 Virtual COM driver port assignment AM01772v1 10/40 UM0609 3 Graphical user interface Graphical user interface To execute the STEVAL-MKI022V1 demonstration software GUI: 1. click on Start > All Programs 2. select STEVAL-MKI022V1 > Executables 3. launch the program “STEVAL-MKI022V1 Ver.1.0”. The GUI main window appears as shown in Figure 9. Figure 9. Graphical user interface: main window ref 3 ref 2 ref 1 ref 5 ref 4 AM01773v1 11/40 Graphical user interface UM0609 The functions of the four main sections of the window are described below: 3.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 availabe are: a) RAW: for each axis the software writes the data read directly from the sensor output registers (OUTX_H, OUTX_L, OUTY_H, OUTY_L and OUTZ_H, OUTZ_L) b) LSB: the data read directly from the sensor are converted from 2’s complement to sign and magnitude c) Acceleration: LSB data are multiplied by the sensitivity to obtain the acceleration expressed in mg d) Angle: LSB data converted to the tilting angle of the board expressed in degrees e) Inturrupt: status of the interrupt 3. “Tab Selector” (Figure 9, ref 3) - used to toggle between the different functions of the demonstration kit 4. “Legend” (Figure 9, ref 4) - possiblity to enable/disable viewing the axes 5. “Details” (Figure 9, ref 5) - shows the details of the demonstration kit, 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-MKI022V1 board must be opened using the following steps: 1. connect the STEVAL-MKI022V1 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 2.3 3. open the connection by clicking on “Connect” (Figure 9 ref 1) At this point the user can acquire, plot and save the acceleration data measured by the sensor and access the content of the registers embedded in the device. Clicking the "Find" button (Figure 9 ref 1), the GUI attempts to automatically find the COM number assigned to the demonstration kit and shows it in the list box as a selected item. The following sections provide details regarding the functions of the tabs in Figure 9, ref 1. 3.2 “Easy Start” button Clicking the "Easy Start" button (Figure 9, ref 1), the GUI attempts to automatically find the COM number assigned to the demonstration kit and starts the acquisition. 12/40 UM0609 3.3 Graphical user interface “Options” tab The options tab allows the user to control the following parameters: 1. Full scale (FS) - Sets the maximum acceleration value measurable by the device. It is possible to select either 2g, 4g or 8g (Figure 10, ref 1) 2. Operating mode (OM) - This control allows the customer to select the operating mode: normal mode, power-down mode and different low-power modes (0.5, 1, 2, 5 or 10 Hz) (Figure 10, ref 2) 3. Block data update (BDU) - BDU function is used to inhibit the output registers update between the reading of upper and lower register parts. After the reading of the lower (upper) part, the content of that output register is not updated until the upper (lower) part is read too (Figure 10, ref 3) 4. High-pass filter (HP) - This control activates the high-pass filter on the device and selects the cut-off frequency (Figure 10, ref 4) 5. Data rate (DR) - In this box the rate at which each acceleration sample is produced can be selected. The possible values are 50, 100, 400 or 1000 Hz (Figure 10, ref 5) 6. Tri-state (TS) - Permits switching the SPI lines of the ST7-USB microcontroller mounted on the demonstration kit between 3-state (i.e. high-impedance) and normal mode (Figure 10, ref 6). This function makes it possible to isolate the sensor mounted on the board from the microprocessor, in case any external control (from a different microcontroller mounted on a separate user board) is needed. This function is inhibited during the acquisition 7. Big/little endian (BLE) - It is used to select big endian or little endian representation for output registers. In big endian representation one MSB acceleration value is located at addresses 28h (X-axis), 2Ah (Y-axis) and 2Ch (Z-axis) while the LSB acceleration value is located at addresses 29h (X-axis), 2Bh (Y-axis) and 2Dh (Z-axis). In little endian representation the order is inverted (Figure 10, ref 7) 8. Sleep to Wake (StW) - This feature allows the user to configure the automatic wakeup feature of the LIS331DLH. When the Sleep to Wake function is activated, the LIS331DLH is able to automatically wake up as soon as the configured interrupt event has been detected, increasing the output data rate and bandwidth. With this feature the system can be efficiently switched from low-power mode to full performance, depending on user-selectable positioning and acceleration events, thus ensuring power saving and flexibility. With the “Set Function” button the software automatically configures the sensor to use the Sleep to Wake with a wakeup interrupt mode (Figure 10, ref 8) 9. Current consumption - It shows the typical current consumption for each operating mode/data rate configuration (Figure 10, ref 9). 13/40 Graphical user interface UM0609 Figure 10. Options tab ref 1 ref 5 ref 2 ref 6 ref 3 ref 7 ref 8 ref 4 ref 9 AM01774v1 3.4 “Register Setup” tab The register setup tab shown in Figure 11 allows read/write access to the content of the registers embedded in the LIS331DLH MEMS sensor mounted on the demonstration kit. The tab is divided into five sections: Note: 14/40 1. “General” (Figure 11, ref 1) - provides access to the registers which control the main settings of the device. This section contains the control registers (CTRL_REG1, CTRL_REG2 and CTRL_REG3) and the registers that control the generation of inertial interrupt signals. It is possible to read and write the contents of each register. To restore the default value for a given register, press the “Default” button 2. “All Registers” (Figure 11, ref 2) - permits the user to read, write and recall the default content for all the registers shown in ref 1 with a single click on the read/write/default button 3. “Registers Direct Access” (Figure 11, ref 3) - provides access to any register in the device. To read a generic register, insert the address in the “Register Address” textbox, then click on the “Read” button. The retrieved content of the register is displayed in the “Register Value” field. As with writing to a register, the user must specify the address and the data to be written inside the fields marked “Register Address” and “Register Value”, respectively, and then press the “Write” button 4. “Parameters” (Figure 11, ref 4) - allows the user to save the register configuration to a text file, which includes a detailed description of the resulting configuration for each register 5. “Load/save configuration” (Figure 11, ref 5) - lets the user save/load a specific configuration to/from a file By pressing the "Default" button, the default values for the registers are recalled in the registers field. To write the values to the registers of the device, the user has to press the "Write" button after the "Default" button. UM0609 Graphical user interface Figure 11. Register setup tab ref 1 ref 2 ref 3 ref 5 ref 4 AM01775v1 3.5 “Bars” tab The bars tab (Figure 12) displays the acceleration data measured by the LIS331DLH sensor in bar chart format. The accelerations along the X, Y and Z axes correspond respectively to the red, green and blue bars. The height of each bar is determined by the amplitude of the acceleration signal measured along the related axis. The full scale of the graph depends on the FS1/FS0 bits of CTRL_REG4 that may be changed through both the Option (Figure 10, ref 1) and the Register Setup tabs (Figure 11, ref 1). Click on the desired bar to zoom. The selected bar is shown at the center of the screen together with the acceleration as a numerical value. To return to the default view, click on the center of the bar (Figure 13). 15/40 Graphical user interface UM0609 Figure 12. Bars tab - acceleration data AM01776v1 Figure 13. Bars tab - selected acceleration as a numerical value AM01777v1 16/40 UM0609 3.6 Graphical user interface “Plot” tab The plot tab (Figure 14) shows the sequence of acceleration samples that have been measured by the LIS331DLH MEMS sensor mounted on the demonstration kit. This tab shows: 1. “Acceleration value” (Figure 14, ref 1) - shows the numeric values of acceleration samples that have been measured by the sensor 2. “Information” (Figure 14, ref 2) - legend of the current status which gives the operating mode, the data rate and the full scale To zoom in on the waveform, select the desired zone with the left button of the mouse (Figure 15). Click again with the right button to return to the default view. Figure 14. Plot tab ref 1 ref 2 AM01778v1 17/40 Graphical user interface UM0609 Figure 15. Plot tab - zoom 1) Select one point on the screen and click the LEFT mouse button 2) Holding the LEFT mouse button clicked, move the cursor to obtain an area on the screen 3) Releasing the button to terminate the Zoom in process, a new area is visualized on the screen 4) To return to the previous view the user has to click the RIGHT mouse button AM01779v1 18/40 UM0609 3.7 Graphical user interface “Data” tab The data tab (Figure 16) shows the acceleration values measured by the LIS331DLH sensor. It is divided into three sections: Note: 1. “ADC Out” (Figure 16, ref 1) - displays the acceleration data provided by the sensor after its conversion from 2’s complement to magnitude and sign 2. “Acceleration Value” (Figure 16, ref 2) - represents the acceleration data measured by the sensor, expressed in mg 3. “Angle” (Figure 16, ref 3) - returns the tilt angle, expressed in degrees, that is inferred from the “ADC Out” data To increase data readability, the values shown in the boxes described above are based on an average of 50 samples. Figure 16. Data tab ref 1 ref 2 ref 3 AM01780v1 19/40 Graphical user interface 3.8 UM0609 “Inclinometer” tab The inclinometer tab (Figure 17) represents the acceleration data measured by the sensor in the form of an artificial horizon. Figure 17. Inclinometer tab AM01781v1 Figure 18. Axis inclination +90° 0° horizontal plane x,y, z -90° 3.9 AM01782v1 “Map Browsing” tab The map browsing tab demonstrates the possibility of using the acceleration data obtained from the sensor to scroll a map (or another type of document) on the screen. 20/40 UM0609 Graphical user interface Figure 19. Map browsing tab a) b) AM01783v1 To move the map on the screen, the user must tilt the demonstration kit. Figure 19, (a) illustrates: 1. a tilt along the X-axis (roll) causes the map to move in a left/right direction on the screen 2. a tilt along the Y-axis (pitch) causes the map to move in a top/bottom direction on the screen Figure 19 (b) shows an example. The board is tilted along the X-axis (positive roll) and the map on the screen is moved to the right. 21/40 Graphical user interface 3.10 UM0609 “FFT” tab The FFT tab (Figure 20) shows the FFT of the acceleration signals acquired by the sensor. The spectral data are updated every sample and are calculated on a 64-sample moving window. Figure 20. FFT tab AM01784v1 3.11 “Interrupt” tab The interrupt tab (Figure 21) provides a tool for evaluating the interrupt generation features of the LIS331DLH MEMS sensor. In this section of the GUI it is possible to configure the characteristics of the inertial events that must be recognized by the device and to visualize, in real-time, the level of the two interrupt lines together with the acceleration signals that are measured by the device. The GUI provides direct access to the registers (INT_CFG, INT_SRC, THS and duration) that allow the configuration (Figure 21, ref 1) of the two independent interrupt sources of the device. Conversion boxes are located on the right-most side of the THS and DURATION registers (Figure 21, ref 2). These boxes are intended to show, respectively, the threshold value expressed in mg and the duration value converted in msec for better readability and understanding. Finally, two buttons are provided for each interrupt line to set the suggested default values for free-fall and wakeup detection. Those buttons are marked “Set FreeFall Default” and “Set Wake Up Default”, respectively (Figure 21, ref 3). 22/40 UM0609 Graphical user interface Figure 21. Interrupt tab ref 1 3.12 ref 2 ref 3 AM01785v1 “6 Direction” tab The 6 direction tab (Figure 22) gives an example of usage of the “6D Position” function available on the LIS331DLH. In this tab it is possible to configure the interrupt with the related registers (INTx_CFG, INTx_THS, INTx_DURATION) (Figure 22, ref 1) and visualize in real time the status of INTx_SRC (Figure 22, ref 2). In our example INT1 has been configured. Referring to Figure 22, the teapot (ref 3) changes its orientation according to INT1_SRC content. The grey arrows around the board turn from grey to red according to the orientation of the board with respect to gravity (Figure 22, ref 4). If no position has been recognized, INTx_SRC is equal to 0x00h and the message “Undefined Position” appears. 23/40 Graphical user interface UM0609 Figure 22. 6D direction tab ref 3 ref 4 3.13 ref 1 ref 2 AM01786v1 “Portrait/landscape” tab This tab shows an example of the portrait/landscape function. The image shown on the screen of the mobile phone (Figure 23) is always horizontal regardless of the orientation of the device. Figure 23. Portrait/landscape tab Earth AM01787v1 24/40 UM0609 4 Data acquisition quick start Data acquisition quick start This section describes the basic steps that must be performed to acquire the acceleration data from the STEVAL-MKI022V1: 1. connect the STEVAL-MKI022V1 to the USB port 2. start the STEVAL-MKI022V1 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 acceleration 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”. 25/40 EK lite 5 UM0609 EK lite A lite version of the previous GUI together with its source code is also included in the installation pack. The source code can be found in the directory: ($Home)\STM\STEVALMKI022V1\STEVAL-MKI022V1_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 base for the development of a customized application. The lite version of the demonstration kit is started by launching the STEVAL-MKI022V1 lite executable file located in the STEVAL-MKI022V1 > Executables folder. An example of the GUI of the EK lite application is shown in Figure 24. Figure 24. STEVAL-MKI022V1 lite GUI AM01788v1 Follow these instructions to use the software: 1. connect the STEVAL-MKI022V1 to the USB port 2. launch the GUI for STEVAL-MKI022V1 lite 3. select the virtual COM port and click on the “Connect” button 4. select the destination file to which the acceleration 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”. The GUI also gives read/write access to the registers embedded in the LIS331DLH device and allows a single read of the acceleration data measured by the sensor. 26/40 UM0609 6 MEMS pointer MEMS pointer This section describes how to use a simple pointer application which utilizes acceleration data provided by the LIS331DLH MEMS 3-axis linear accelerometer to control the position of a pointer on the screen of the PC. The software provided with the kit allows the STEVAL-MKI022V1 demonstration kit to be used as an inertial mouse, where the tilt of the board is translated into movement of the pointer. The board also emulates the left and right buttons of the mouse. 6.1 GUI description The GUI window (see Figure 25) is divided into two sections. The left section contains the main controls to open the connection to the demonstration kit and to start/stop the data acquisition (ref 1). The bottom section contains the demonstration kit details (device and firmware, ref 2). The right section shows the same data and the mouse speed control. Figure 25. MEMS pointer demonstration ref 3 ref 1 ref 4 ref 5 ref 6 ref 2 AM01789v1 6.1.1 Left side: main control The buttons on the left side of the GUI and their related functions are described below: 1. Connect/disconnect control - selects the COM port to which the EK board is connected 2. Acquisition control - starts and stops acquisition 3. Exit - exits the MEMS pointer demonstration application. 27/40 MEMS pointer 6.1.2 UM0609 Right side: pointer application controls The controls on the right side of the GUI and their related functions are as follows: 28/40 1. Left button/right button - indicates when the left/right button on the demonstration kit is pressed (ref 3) 2. X/Y-position - shows the current x/y coordinates of the mouse pointer on the PC screen (ref 4) 3. X/Y-deg - shows the tilt of the demonstration kit along the X and Y axes (ref 5) 4. Pointer speed - sets the sensitivity of the pointer to the inclination of the board (ref 6). UM0609 7 Supported commands Supported commands The microcontroller mounted on the STEVAL-MKI022V1 board is equipped with dedicated firmware which supports a set of commands that allow the control of the 3-axis digital output MEMS sensor and permit the acquisition of the measured acceleration data. The firmware also handles the communication between the EK board and the PC through the USB bus. These features allow users to easily write their own applications to exploit the capabilities of the accelerometer. This section describes the commands that are supported by the firmware for the microcontroller of the STEVAL-MKI022V1 demonstration kit. 7.1 Getting started Before using the commands supported by the firmware, the following procedure must be performed: 1. connect the STEVAL-MKI022V1 to the USB port 2. launch an application which allows the sending of commands through the Virtual serial port. The remainder of this document assumes the use of the Microsoft© Hyper Terminal program integrated in the Windows XP operating system 3. create a new connection, enter a name (ex. “STEVAL-MKI022V1”), 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 select files > properties > settings and 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-MKI022V1 firmware: Table 1. Supported commands Command Description Returned value *start Starts continuous data acquisition s t xh xl yh yl zh zl I1 I2 s *debug Returns the acceleration data in readable text format x=XX y=YY z=ZZ *stop Stops data acquisition *rAA Register read RAAhDDh 29/40 Supported commands Table 1. Note: UM0609 Supported commands (continued) Command Description Returned value *wAADD Register write *bwAA Single bit write *Zon Force 3-state *Zoff Exit from 3-state *dev Device name LIS331DLH *ver Firmware version 331DLH 1.0 AA: register address DD: data S: service field Xh and Xl, Yh and Yl, Zh and Zl: Acceleration data returned for the X, Y and Z axes I1, I2 : interrupt value on each axis. 7.2.1 Start command The *start command initiates the continuous data acquisition. When this command is sent to the board, it returns the acceleration data measured by the LIS331DLH device. The acceleration data are packed in a string composed of eight bytes: “s t xh xl yh yl zh zl I1 I2 s”. The first two bytes are always “s” and “t” which correspond to the hexadecimal values {73 74}, while “X” “Y” “Z” represent, respectively, the acceleration data for the X, Y, Z axes. “I1” and “I2” contain the values of INT1_SRC and INT2_SRC, where each bit is a specific interrupt. The last byte “s” returns information about the switches mounted on the board. Specifically, bit#1 and bit#0 of the "service data" correspond to the status of SW3 and SW2 on the demonstration kit board, and they are set to 1 when the corresponding switch is pressed. 7.2.2 Debug command The debug command starts the continuous data acquisition in debug mode. When this command is sent to the board, it returns the acceleration data measured by the LIS331DLH device in readable text format. The values shown on the screen correspond to the content of the output data registers and are shown as a decimal number. A tab is employed as a separator between the different fields. 7.2.3 Stop command The *stop command interrupts any acquisition session that has been started with either the *start or *debug commands. 7.2.4 Register read The *rAA command allows the contents of the LIS331DLH device registers in the demonstration kit board to be read. AA, expressed as hexadecimal value and written uppercase, represents the address of the register to be read. 30/40 UM0609 Supported commands Once the read command is issued, the board returns RAAhDDh, where AA is the address sent by the user and DD is the data present in the register. For example, to read the CTRL_REG1 the user would issue the command *r20, which returns R20hC7h. 7.2.5 Register write The *wAADD command permits writing to the contents of the LIS331DLH device registers in the demonstration kit board. AA and DD, expressed as hexadecimal values and written upper-case, represent respectively the address of the register and the data to be written. To write 0xC7 to the CTRL_REG1, for example, the user would issue the command *w20C7. 7.2.6 Single bit write Using this command it is possible to set/reset a single bit in a given register. The command *bwAA requires the user to specify the address AA of the register in which to change the bit, with AA expressed as a hexadecimal value and written in lower-case, followed by the position of the bit to be changed, an integer between 0 and 7, and the value, either 0 or 1, to be associated to the specified bit. For example, to set the FS bit to 1 within the CTRL_REG2, the user would issue the command *bw2171. 7.2.7 Zon and Zoff The *Zon and *Zoff commands are employed respectively to put into 3-state (i.e. highimpedance) and to exit (i.e. normal mode) the SPI lines of the ST7-USB microcontroller mounted on the demonstration kit. These commands allow the isolation of the sensor from the microprocessor in the event that an external control (from a different microcontroller mounted on a separate board) is needed. By default, when the kit is first turned on, the SPI lines are in 3-state mode and the user is required to send the command *Zoff to allow communication between the sensor and the microcontroller. 7.2.8 Device name The *dev command retrieves the name of the device mounted on the demonstration kit connected to the PC. For the STEVAL-MKI022V1, the returned value is “LIS331DLH”. 7.2.9 Firmware version The *ver command queries the demonstration kit and returns the version of the firmware loaded in the microprocessor. 31/40 Supported commands 7.3 UM0609 Quick start This section shows the basic sequence of commands to start a data communication session and to retrieve the acceleration data from the demonstration kit: 32/40 1. connect the STEVAL-MKI022V1 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 the control of the SPI line from the ST7-USB microcontroller 4. send the *debug command to get the acceleration data measured by the sensor 5. send *stop to end the continuous acquisition and visualization. UM0609 8 DFU DFU The MEMS device firmware update GUI is a graphical interface that allows the user to download and replace the firmware of a MEMS product division demonstration board directly from a PC through the USB port. The MEMS demonstration boards that mount an ST7-USB microcontroller have the capability of reprogramming an application through the USB, in accordance with the DFU class specification defined by the USB Implementers Forum. This capability is useful because it allows reprogramming the microcontroller directly in the field and is particularly well-suited in the USB applications where the same USB connector can be used both for the standard operating mode and for the reprogramming process. Connector J4 must be shorted to allow the DFU procedure. If the demonstration kit is going to be reprogrammed through the ICP 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 in the USB cable to the demonstration kit while pressing Button 2 (Figure 26). Figure 26. Demonstration kit correctly recognized AM01790v1 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. After installation, “MEMS demonstration DFU” appears in the DFU USB devices list (Figure 26). 33/40 DFU UM0609 To execute the firmware upgrade: 6. click on File > Open, then select the correct directory where the “.dfu” file has been downloaded and select it (Figure 27) 7. click on “Upgrade” 8. the internal flash memory erased (Figure 28) 9. and reflashed with the new firmware (Figure 29). Once the procedure is finished, a windows message appears, stating that a USB device is not recognized. You can then unplug the USB cable from the EK demonstration board and use it with the new firmware. In order to back up your actual firmware before flashing the demonstration kit with a new one, flag “Upload DFU device” (Figure 26) before clicking on “Upgrade”. You will be prompted to save the current firmware in your preferred directory before the erasing of the internal flash. Figure 27. Select new firmware AM01791v1 Figure 28. Flash erasing AM01792v1 34/40 UM0609 DFU Figure 29. Flash upgrading AM01793v1 35/40 D C B 1 V+ 2 DM 3 DP 4 nc 5 GND USB_mini_B J1 D1 1 C8 47nF R6 1.5K R1 180R C9 220nF VCC 2 R7 10K C2 C4 100nF 4.7uF + 1 2 3 4 5 Vddf 6 7 8 Rled Gled 9 DFU_SEL 10 11 CS1 12 C10 + 10uF 13 14 15 16 C1 10uF + C5 100nF 3 64 oscout 63 oscin 62 61 60 59 58 ic cdata 57 ic cclk 56 55 54 53 52 51 nR ESET 50 ic csel 49 UVss UDM UDP UVcc UVdd Vddf Vssf PE5 PE6 PE7 PB0 PB1 PB2 PB3 PB4 PB5 SW2 SW3 R11 10K 3 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 cs_pad 21 22 PD ST 23 INT1 24 INT2 25 26 Vddf 27 miso 28 mosi 29 sck 30 31 32 + 48 47 46 45 44 43 42 41 40 39 38 37 36 35 34 33 VCC C6 100nF U2 ST7265X_TQFP64 Cosc1 33pF oscin Gled D2 sck Vddf 1 2 3 4 5 12MHz Yoscm Rled R2 100R 4 J3 SPI 4 Cosc2 33pF oscout R3 100R GND GND Int1 Reserved Int2 SDA SDO CS mosi 6 miso 7 cs_pad 8 Vdd_IO NC NC SCL GND 16 15 14 GND Reserved VDD TP1 VCC R12 0R 13 12 11 INT1 10 9 U1 Motion Sensor 5 ICP 1 3 5 7 9 R13 0R C11 100nF J2 5 2 4 6 8 10 INT2 R10 100R iccdata iccclk nRESET iccsel R9 100R + C13 10uF D3 Riccsel 10K DFU_SEL D4 SW1 NReset 6 R8 1K VCC 2 R5 470R C7 100nF 1 3 C15 + 2 1 4 220nF 3 220nF C18 2.2uF C14 Q2 SO642 Q1 2STR2215 Vddf J5 Current_Measure R4 10K Vdd_dut 6 1 2 A 2 CS1 cs_pad sck miso mosi INT1 INT2 7 6 5 4 3 2 1 2 G 36/40 3 LE25 1 2 3 4 7 ST662ABD C2+ C2- C1+ C1- U3 1 2 3 4 U4 7 8 7 6 5 8 5 6 7 C16 4.7uF 16V VCC VOUT GND SHDN 8 7 6 5 + + 2 C19 100nF C12 100nF VCC C17 4.7uF 16V J4 TP2 8 1 8 iccsel D C B A 9 1 R 1 Schematic diagram UM0609 Schematic diagram The schematic diagram of the STEVAL-MKI022V1 demonstration kit is shown in Figure 30. Figure 30. Schematic diagram of the STEVAL-MKI022V1 board AM01794v1 UM0609 10 Bill of materials Bill of materials The bill of materials for the STEVAL-MKI022V1 demonstration kit is provided in Table 2. Table 2. Bill of materials Designator Description Comment Footprint C1 Capacitor 10 µF C1206 POL C2 Capacitor 4.7 µF C1206 POL C3 Capacitor 47 µF C1206 POL C4 Capacitor 100 nF 0805 C5 Capacitor 100 nF 0805 C6 Capacitor 100 nF 0805 C7 Capacitor 100 nF 0805 C8 Capacitor 47 nF 0805 C9 Capacitor 220 nF 0805 C10 Capacitor 10 µF C1206 POL C11 Capacitor 100 nF 0805 C12 Capacitor 100 nF 0805 C13 Capacitor 10 µF C1206 POL C14 Capacitor 220 nF 0805 C15 Capacitor 220 nF 0805 C16 Capacitor 4.7 µC 16 V C1206 POL C17 Capacitor 4.7 µC 16 V C1206 POL C18 Capacitor 2.2 µC C1206 POL C19 Capacitor 100 nF 0805 Cosc1 Capacitor 33 pF 0805 Cosc2 Capacitor 33 pF 0805 D1 LED SMD LED green SMD LED D2 LED SMD LED 3C SMD LED 3C D3 LED SMD LED green SMD LED D4 LED SMD LED red SMD LED J1 USB connector USB B mini USB B mini J2 Header, 5X2 ICP HEADER 5X2 A J3 Header, 7-pin SPI HDR1X7 DFU jumper J4 Header, 2-pin Q1 Transistor 2STR2215 HDR1X2 Q2 Transistor SO624 R1 Resistor 180 Ω 0805 R2 Resistor 100 Ω 0805 R3 Resistor 100 Ω 0805 R4 Resistor 10 kΩ 0805 37/40 Bill of materials UM0609 Table 2. Bill of materials (continued) Designator Description Comment R5 Resistor 470 Ω 0805 R6 Resistor 1k5 0805 R7 Resistor 10 kΩ 0805 R8 Resistor 1 kΩ 0805 R9 Resistor 100 Ω 0805 R10 Resistor 100 Ω 0805 R11 Resistor 10 kΩ 0805 R12 Resistor 0Ω 0805 R13 Resistor 0Ω 0805 Riccsel Resistor 10 kΩ 0805 SW1 Button NReset SMT button SW2 Button SMT button SMT button SW3 Button SMT button SMT button TP1 Test point TP TP TP2 Test point GND TP U1 LIS331DLH TLGA 3x3x1 U2 ST72F651AR6T1E TQFP64 10x10 U3 ST662ABD SO-G8 U4 LE25 SO-8 12 MHz OSC SMD Yoscm1 38/40 Footprint Crystal UM0609 11 Revision history Revision history Table 3. Document revision history Date Revision 05-Mar-2009 1 Changes Initial release 39/40 UM0609 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. © 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 - Singapore - Spain - Sweden - Switzerland - United Kingdom - United States of America www.st.com 40/40
STEVAL-MKI022V1 价格&库存

很抱歉,暂时无法提供与“STEVAL-MKI022V1”相匹配的价格&库存,您可以联系我们找货

免费人工找货
STEVAL-MKI022V1
    •  国内价格
    • 1+1811.23560
    • 200+722.70360
    • 500+698.54400
    • 1000+686.62080

    库存:0