ST STEVAL-MKI132V1 User Manual Download Page 16

UM1579

Supported commands

Doc ID 023744 Rev 1

15/26

Set demonstration board

The command *setdbxxxvy selects the part of the firmware able to handle the adapter board 

sensor connected to the board. e.g., in order to select the firmware for the LIS3DH the 

command must be: setdb105V1.

Start command

The *start command initiates the continuous data acquisition. When this command is sent to 

the device, it returns a string of bytes (plus carriage return and line feed) similar to “st OUT1 

OUT2 OUT3 IR BT”.

The first two bytes are always the

 ASCII char “s” 

and 

“t” 

which correspond to the 

hexadecimal values {73h 74h}.

OUT1, OUT2, and OUT3 are the bytes that contain the values measured at device outputs; 

if the output data is represented on more than 8 bits, OUT1, OUT2, and OUT3 are split into 

two bytes: high byte (e.g.: “XH”) and low byte (e.g.: “XL”).

IR contains the interrupt bytes and BT contains the bytes that describe the state of the 

buttons integrated on the board.

Specifically, bit#0 of the “BT” data corresponds to the status of the SW1 button on the 

demonstration board: it is set to 1 when the SW1 is pressed (otherwise 0). Bit#1 has the 

same behavior but is dedicated to the SW2.

Before sending the *start command, the device must be out from 3-state and some registers 

must be configured according to user needs, therefore, *start must be preceded by a *zoff 

and some “Register Write” commands.

Table 3

 shows the format of the string returned for each device when a *start command is 

sent. 

Note:

XH: X axis output high byte (same for Y axis, Z axis, P pressure, and TEMP temperature).

XL: X axis output low byte (same for Y axis, Z axis, P pressure, and TEMP temperature).

Table 3.

Returned values for *start command

STEVAL # (device)

Returned value

STEVAL-MKI089V1 (LIS331DLH) 

STEVAL-MKI105V1 (LIS3DH)    

STEVAL-MKI107V1 (L3G4200D) 

STEVAL-MKI107V2 (L3GD20)    

STEVAL-MKI110V1 (AIS328DQ) 

s t XH XL YH YL ZH ZL int1 int2 sw1|sw2 \r \n

STEVAL-MKI106V1 (LSM303DLHC) 

STEVAL-MKI303V1 (LSM303D)

s t A_XH A_XL A_YH A_YL A_ZH A_ZL M_XH M_XL 

M_YH M_YL M_ZH M_ZL A_int1 A_int2 sw1|sw2 \r \n

STEVAL-MKI108V1 (9AXISMODULEv1) 

STEVAL-MKI108V2 (9AXISMODULEv2)

s t A_XH A_XL A_YH A_YL A_ZH A_ZL                        

G_XH G_XL G_YH G_YL G_ZH G_ZL                     

M_XH M_XL M_YH M_YL M_ZH M_ZL                    

A_int1 A_int2 sw1|sw2 \r \n

STEVAL-MKI122V1 (LSM330DLC) 

STEVAL-MKI123V1 (LSM330D)

s t A_XH A_XL A_YH A_YL A_ZH A_ZL                        

G_XH G_XL G_YH G_YL G_ZH G_ZL                          

A_int1 A_int2 G_int1 G_int2 sw1|sw2 \r \n

Summary of Contents for STEVAL-MKI132V1

Page 1: ...the information therein All referenced brands product names service names and trademarks are the property of their respective owners 00000005981LF 000 EOS Power Buy Now We have 45 000 LP502030 PCM NT...

Page 2: ...etooth module it functions as a bridge between the sensor on the adapter board and the PC It is possible to connect the BlueMotion to the PC using the Bluetooth module and using the Unico graphical us...

Page 3: ...er boards 12 4 Supported commands 13 4 1 Getting started 13 4 2 Supported commands 13 4 2 1 Commands list and description 14 4 2 2 Digital output accelerometers supported commands 19 4 2 3 Digital out...

Page 4: ...ata coming from the MEMS sensor connected to the board can be read through the PC GUI provided with the board The BlueMotion can be flashed with compatible firmware using an SWD connector or a UART co...

Page 5: ...ev 1 Figure 2 Connecting BlueMotion using UART Download the hexadecimal file of the firmware on BlueMotion using the STM32 flash loader utility For further details refer to the utility s user manual F...

Page 6: ...onnecting BlueMotion using UART The BlueMotion also integrates one general purpose LED and two LEDs connected directly to the interrupt pins of the digital adapters The top view and the bottom view of...

Page 7: ...The BlueMotion demonstration board can be used with the Unico GUI interface which allows simple interaction with the sensor The steps required for establishing a Bluetooth connection with the board an...

Page 8: ...ef 2 be used to program the BlueMotion board Jumper JP1 allows the user to measure the sensor current consumption by connecting a multimeter in series with its terminals when a 1 5 V power supply is u...

Page 9: ...le that can be flashed to the board The section below describes the procedure for establishing a Bluetooth connection with the BlueMotion board 2 1 Establishing Bluetooth connection A Bluetooth connec...

Page 10: ...tion Doc ID 023744 Rev 1 9 26 Figure 7 Searching the BlueMotion board To pair the device right click on the icon eMotion BT and select Pair Enter 1234 in the Passkey field in the dialogue box shown in...

Page 11: ...The next step is to connect to the BlueMotion board Click on the eMotion BT icon and then click on the Bluetooth Serial Port icon as shown in Figure 9 In this example the board is assigned the port CO...

Page 12: ...UM1579 BlueMotion board installation Doc ID 023744 Rev 1 11 26 Figure 9 Connecting to the BlueMotion board AM14731V1...

Page 13: ...f supported MEMS adapter boards Adapter board Device STEVAL MKI089V1 LIS331DLH STEVAL MKI105V1 LIS3DH STEVAL MKI106V1 LSM303DLHC STEVAL MKI107V1 L3G4200D STEVAL MKI107V2 L3GD20 STEVAL MKI108V1 9AXISMO...

Page 14: ...t assumes the use of the Microsoft HyperTerminal program available with the Windows XP operating system 3 Create a new connection enter a name e g BlueMotion and click OK 4 In the Connect Using field...

Page 15: ...ad e g MRAAhDDh mwAADD Magnetometer register write single It gets a single X Y and Z data acquisition see Table 4 list Prints the list of MKIs supported e g MKI105V1 listdev Prints the list of devices...

Page 16: ...SW1 is pressed otherwise 0 Bit 1 has the same behavior but is dedicated to the SW2 Before sending the start command the device must be out from 3 state and some registers must be configured according...

Page 17: ...on the lines are in 3 state mode and the user is required to send the Zoff command to allow communication between the sensor and the microcontroller If Zoff has not been launched the firmware ignores...

Page 18: ...is the address sent by the user and DD is the data present in the register For example to read the register at address 0x20 the user issues the command gr20 which returns e g GR20hC7h Gyroscope regis...

Page 19: ...read of the register just written This function is useful to check if the write has succeeded For instance if the echoon command is launched after a w2027 it results R2027 Echo off The echooff command...

Page 20: ...ter connected start Starts continuous data acquisition see Table 3 debug Returns the output data in readable text format see Table 4 stop Stops data acquisition Zon Forces 3 state Zoff Exits from 3 st...

Page 21: ...t data in readable text format see Table 4 stop Stops data acquisition Zon Forces 3 state Zoff Exits from 3 state dev Device name e g LIS3DH ver Firmware version e g V1 0 grAA Gyroscope register read...

Page 22: ...set the data rate to 50 Hz 4 Send the debug command to get the X Y and Z data measured by the sensor 5 Send stop to end the continuous acquisition and visualization Table 7 Digital output magnetometer...

Page 23: ...DC8 15 PB1 ADC9 16 STM32F103TB U3 Vin 1 Gnd 2 EN 3 BYPASS 4 Vout 5 lds3985xx30 U2 33nF C10 1uF C7 1 2 Current_Measure JP2 Vdd_dut VDD 18pF Cosc2 18pF Cosc1 1M R10 OSCOUT 1 2 3 4 16MHz Osc1 OSCOUT VDD...

Page 24: ...7 F 0603 C12 1 CAP 10 nF 0402 C13 1 CAP 100 nF 0402 Cosc1 1 CAP 18 pF 0402 Cosc2 1 CAP 18 pF 0402 D1 1 LED_SMD LED_SMDg LED_SMD_0603 D4 1 LED_SMD LED_SMDr LED_SMD_0603 D5 1 LED_SMD LED_SMDg LED_SMD_0...

Page 25: ...Res1 1 M 0402 R11 1 Res1 130R 0402 R12 1 Res1 130R 0402 R13 1 Res1 130R 0402 U1 1 L6920 L6920DC L6920DC U2 1 Component_1 lds3985xx30 SOT23 5 U3 1 STM32F103TB_VF QFPN36 STM32F103TB VFQFPN36 U4 1 Blueto...

Page 26: ...UM1579 Revision history Doc ID 023744 Rev 1 25 26 7 Revision history Table 9 Document revision history Date Revision Changes 29 Jan 2013 1 Initial release...

Page 27: ...RRANTIES 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 UNLES...

Reviews: