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.
Â
Â
Â
Â
Â