LPMS-ME1 SPI communication

General

LPMS-ME1’s serial peripheral interface (SPI) protocol supports full-duplex synchronous serial communication with external devices. The SPI interface of LPMS-ME1 consists of four pins (CS, SDI, SDO and SPC) and acts as a slave device.

CS: Slave select pin, controlled by master device.

SDI: Master out / slave in data. This pin is used to receive data.

SDO: Master in / slave out data. This pin is used to transmit data.

SPC: Serial clock input pin.

LPMS-ME1 communicates with a host device via SPI using the LP-BUS protocol. It uses a register structure as displayed in summary below. For in detail information about the communication protocol and the register contents please check the LPMS-ME1 manual: https://www.lp-research.com/wp-content/uploads/2017/10/LpmsMe1Manual20171002.pdf

Summary of Sensor Registers

Acknowledged / Not-acknowledged Identifiers

Identifier

Name

Parameter

Response

Default

0

REPLY_ACK

 

 

 

1

REPLY_NACK

 

 

 

Get Configuration and Status Info Commands

Identifier

Name

Parameter

Response

Default

4 (04h)

GET_CONFIG

NONE

Int32

 

5 (05h)

GET_STATUS1

NONE

Int32

 

Mode Switching Commands

 

Identifier

Name

Parameter

Response

Default

6 (06h)

GOTO_COMMAND_MODE1

NONE

ACK/NACK

 

7 (07h)

GOTO_STREAM_MODE

NONE

ACK/NACK

 

IMU ID Settings Command

Identifier

Name

Parameter

Response

Default

20 (14h)

SET_IMU_ID

Int32

ACK/NACK

 

21 (15h)

GET_IMU_ID

NONE

Int32

1

Gyroscope Settings Command

Identifier

Name

Parameter

Response

Default

22 (16h)

START_GYR_CALIBRATION

NONE

ACK/NACK

 

25 (19h)

SET_GYR_RANGE

Int32

ACK/NACK

 

26 (1Ah)

GET_GYR_RANGE

NONE

Int32

2000dps

Accelerometer Settings Command

Identifier

Name

Parameter

Response

Default

31 (1Fh)

SET_ACC_RANGE

Int32

ACK/NACK

 

32 (20h)

GET_ACC_RANGE

NONE

Int32

4g

Magnetometer Settings Command

Identifier

Name

Parameter

Response

Default

17 (11h)

START_MAG_CALIBRATION1

NONE

ACK/NACK

 

33 (21h)

SET_MAG_RANGE

Int32

ACK/NACK

 

34 (22h)

GET_MAG_RANGE

NONE

Int32

8Gauss

Register Value Save and Reset Command

Identifier

Name

Parameter

Response

Default

15 (0Fh)

WRITE_REGISTERS

NONE

ACK/NACK

 

16 (10h)

RESTORE_FACTORY_DEFAULTS

NONE

ACK/NACK

 

Reference Setting and Offset Reset Command

Identifier

Name

Parameter

Response

Default

18 (12h)

SET_ORIENTATION_OFFSET

Int32

ACK/NACK

 

82 (52h)

RESET_ORIENTATION_OFFSET

NONE

ACK/NACK

 

Filter Settings Command

Identifier

Name

Parameter

Response

Default

41(29h)

SET_FILTER_MODE

Int32

ACK/NACK

 

42(2Ah)

GET_FILTER_MODE

NONE

Int32

1

43(2Bh)

SET_FILTER_PRESET

Int32

ACK/NACK

 

44(2Ch)

GET_FILTER_PRESET

NONE

Int32

3

Device Info

Identifier

Name

Parameter

Response

Default

90(5Ah)

GET_SERIAL_NUMBER

NONE

Char[24]

 

92(5Ch)

GET_FIRMWARE_INFO

NONE

Char[16]

 

1Note: These commands are executable in both streaming mode and command mode. Other commands are executable only when the sensor is in command mode.

 

 

 

 

Â