LPMS2 Command List

Acknowledged and Not-acknowledged Identifiers

Identifier:

Name:

Description:

0

REPLY_ACK

Confirms a successful SET command.

Identifier:

Name:

Description:

1

REPLY_NACK

Reports an error during processing a SET command.

Firmware Update and In-Application-Programmer Upload Commands

Identifier:

Name:

Description:

 

 

Packet data:

Data format:

Response:

2

UPDATE_FIRMWARE

Start the firmware update process.

NOTE: By not correctly uploading a firmware file the sensor might become in-operable. Please only use authorized firmware packages.

Firmware data

Firmware binary file separated into 256 byte chunks for each update packet.

ACK (success) or NACK (error) for each transmitted packet.

Identifier:

Name:

Description:

Packet data:

Data format:

Response:

3

UPDATE_IAP

Start the in-application programmer (IAP) update process.

IAP data

IAP binary file separated into 256 byte chunks for each update packet.

ACK (success) or NACK (error) for each transmitted packet.

Configuration and Status Commands

Identifier:

Name:

Description:



Packet data:


Data format:

4

GET_CONFIG

Get the current value of the configuration register of the sensor. The configuration word is read-only. The different parameters are set by their respective SET commands. E.g. SET_TRANSMIT_DATA for defining which data is transmitted from the sensor.

Configuration word. Each bit represents the state of one configuration parameter.

32-bit integer

Identifier:

Name:

Description:

Packet data:

Data format:

5

GET_STATUS

Get the current value of the status register of the LPMS device. The status word is read-only.

Status indicator. Each bit represents the state of one status parameter.

32-bit integer. A high bit (1) indicates the following status:

bit 0: Command Mode enabled
bit 1: Streaming Mode enabled
bit 2: Reserved
bit 3: Gyro calibration running
bit 4: Magnetometer calibration running
bit 5: Gyroscope initialization failed
bit 6: Accelerometer initialization failed
bit 7: Magnetometer initialization failed
bit 8: Pressure sensor initialization failed
bit 9: Gyroscope unresponsive
bit 10: Accelerometer unresponsive
bit 11: Magnetometer unresponsive
bit 12: Flash write failed
bit 13: Set baudrate failed

Mode Switching Commands

Identifier:

Name:

Description:

Response:

6

GOTO_COMMAND_MODE

Switch to command mode. In command mode the user can issue commands to the firmware to perform calibration, set parameters etc.

ACK (success) or NACK (error)

Identifier:

Name:

Description:

 

Response:

7

GOTO_STREAM_MODE

Switch to streaming mode. In this mode data is continuously streamed from the sensor,and all other commands cannot be performed until the sensor receives the GOTO_COMMAND_MODE command.

ACK (success) or NACK (error)

Data Transmission Commands

Identifier:

Name:

Description:

 

Data format:

9

GET_SENSOR_DATA

Retrieves the latest set of sensor data. A data packet will be composed as defined by SET_TRANSMIT_DATA. The currently set format can be retrieved with the sensor configuration word.

See the LP-BUS protocol explanation for a description of the measurement data format.

Identifier:

Name:

Description:

Packet data:

Data format:

Response:

10

SET_TRANSMIT_DATA

Set the data that is transmitted from the sensor in streaming mode or when retrieving data through the GET_SENSOR_DATA command.

Data selection indicator

32-bit integer.

ACK (success) or NACK (error)

Identifier:

Name:

Description:

 

Packet data:

Data format:

Response:

11

SET_STREAM_FREQ

Set the timing in which streaming data is sent to the host. Please note that high frequencies might be not practically applicable due to limitations of the communication interface. Check the current baudrate before setting this parameter.

Update frequency identifier

32-bit integer

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Packet data:

Data format:

Response:

75

SET_LPBUS_DATA_MODE

Sets current data mode for LP-BUS (binary) output.

Data mode identifier

Int32

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Packet data:

Data format:

Response:

66

SET_TIMESTAMP

Sets current sensor timestamp counter. Counter increments at 400Hz, 2.5ms. To set time stamp at 1s, counter should be set to 400.

Timestamp data

Int32

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Packet data:

Response:

83

SET_ARM_HARDWARE_TIMESTAMP_RESET

Arms hardware timestamp reset

None

ACK (success) or NACK (error)

Register Value Save and Reset Command

Identifier:

Name:

Description:

Response:

15

WRITE_REGISTERS

Write the currently set parameters to flash memory.

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Response:

16

RESTORE_FACTORY_VALUE

Reset the LPMS parameters to factory default values. Please note that upon issuing this command your currently set parameters will be erased.

ACK (success) or NACK (error)

Reference Setting and Offset Reset Command

Identifier:

Name:

Description:


Packet data:

Data format:

Response:

18

SET_OFFSET

Sets the orientation offset using one of the three offset methods.
0: Object reset, 1: Heading reset, 2: Alignment reset. Details here.

Orientation offset mode

32-bit integer

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Response:

82

RESET_ORIENTATION_OFFSET

Reset the orientation offset to 0 (unity quaternion).

ACK (success) or NACK (error)

Self-Test Command

Identifier:

Name:

Description:

 

Response:

19

SELF_TEST

Initiate the self-test. During the self test the sensor automatically rotates about the three room axes. To simulate realistic circumstances an artificial offset is applied to the magnetometer and the gyroscope values.

ACK (success) or NACK (error)

IMU ID Setting Command

Identifier:

Name:

Description:

Packet data:

Data format:

Response:

20

SET_IMU_ID

Set the OpenMAT ID.

OpenMAT ID

32-bit integer

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Packet data:

Return format:

21

GET_IMU_ID

Get the ID (OpenMAT ID) of the device.

The ID of the IMU device

32-bit integer

Gyroscope Settings Command

Identifier:

Name:

Description:

Response:

22

START_GYR_CALIBRATION

Start the calibration of the gyroscope sensor.

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Packet data:

Format:

Response:

23

ENABLE_GYR_AUTOCAL

Enable or disable auto-calibration of the gyroscope.

Gyroscope auto-calibration enable / disable identifier

32-bit integer

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Packet data:

Format:

Response:

24

ENABLE_GYR_THRES

Enable or disable gyroscope threshold.

Gyroscope threshold enable / disable identifier

32-bit integer

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Packet data:

Format:

Response:

25

SET_GYR_RANGE

Set the current range of the gyroscope.

Gyroscope range identifier

32-bit integer

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Response:

Returnformat:

26

GET_GYR_RANGE

Get current gyroscope range.

Gyroscope range indicator

32-bit integer

Identifier:

Name:

Description:

Packet data:

Format:

Response:

48

SET_GYR_ALIGN_BIAS

Set gyroscope alignment bias.

Gyroscope alignment bias

Float 3-vector

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Response:

Return format:

49

GET_GYR_ALIGN_BIAS

Get gyroscope alignment bias.

Gyroscope alignment bias

Float 3-vector

Identifier:

Name:

Description:

Packet data:

Format:

Response:

50

GET_GYR_ALIGN_MATRIX

Set gyroscope alignment matrix.

Gyroscope alignment matrix

Float 3x3 matrix

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Response:

Return format:

51

GET_GYR_ALIGN_MATRIX

Get gyroscope alignment matrix.

Gyroscope alignment matrix

Float 3x3 matrix

Accelerometer Settings Command

Identifier:

Name:

Description:

Packet data:

Format:

Response:

27

SET_ACC_BIAS

Set the accelerometer bias.

Accelerometer bias (X, Y, Z-axis)

32-bit integer encoded float 3-component vector

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Response:

Return format:

28

GET_ACC_BIAS

Get the current accelerometer bias vector.

Accelerometer bias vector

32-bit integer encoded float 3-component vector

Identifier:

Name:

Description:

Packet data:

Format:

Response:

29

SET_ACC_ALIG

Set the accelerometer alignment matrix.

Alignment matrix

32-bit integer encoded float 3 x 3 matrix

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Response:

Return format:

30

GET_ACC_ALIG

Get the current accelerometer alignment matrix.

Accelerometer alignment matrix

32-bit integer encoded float 3 x 3 matrix

Identifier:

Name:

Description:

Packet data:

Format:

Response:

31

SET_ACC_RANGE

Set the current range of the accelerometer.

Accelerometer range identifier

32-bit integer

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Response:

Return format:

32

GET_ACC_RANGE

Get current accelerometer range.

Accelerometer range indicator

32-bit integer

Magnetometer Settings Command

Identifier:

Name:

Description:

Packet data:

Format:

Response:

33

SET_MAG_RANGE

Set the current range of the magnetometer.

Magnetometer range identifier

32-bit integer

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Response:

Return format:

34

GET_MAG_RANGE

Get current magnetometer range.

Magnetometer range indicator (same as above)

32-bit integer

Identifier:

Name:

Description:

Packet data:

Format:

Response:

35

SET_HARD_IRON_OFFSET

Set the current hard iron offset vector.

Hard iron offset values

32-bit integer encoded 3-element float vector

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Response:

Return format:

36

GET_HARD_IRON_OFFSET

Get current hard iron offset vector.

Hard iron offset values

32-bit integer encoded 3-element float vector

Identifier:

Name:

Description:

Packet data:

Format:

Response:

37

SET_SOFT_IRON_MATRIX

Set the current soft iron matrix.

Soft iron matrix values

32-bit integer encoded 9-element (3x3) float matrix

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Response:

Return format:

38

GET_SOFT_IRON_MATRIX

Get the current soft iron matrix.

Soft iron matrix values

32-bit integer encoded 9-element (3x3) float matrix

Identifier:

Name:

Description:

Packet data:

Format:

Response:

39

SET_FIELD_ESTIMATE

Set the current earth magnetic field strength estimate.

Field estimate value in uT

32-bit integer encoded float

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Response:

Return format:

40

GET_FIELD_ESTIMATE

Get the current earth magnetic field strength estimate.

Field estimate value in uT

Int32

Identifier:

Name:

Description:

Packet data:

Format:

Response:

76

SET_MAG_ALIGNMENT_MATRIX

Sets the magnetometer misalignment matrix.

Misalignment matrix

Matrix3x3f

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Packet data:

Format:

Response:

77

SET_MAG_ALIGNMENT_BIAS

Sets the magnetometer misalignment bias.

Misalignment bias

Vector3f

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Packet data:

Format:

Response:

78

SET_MAG_REFRENCE

Sets the magnetometer reference vector.

Misalignment matrix

Vector3f

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Response:

Return format:

79

GET_MAG_ALIGNMENT_MATRIX

Gets magnetometer misalignment matrix.

Misalignment matrix

Matrix3x3f

Identifier:

Name:

Description:

Response:

Return format:

80

GET_MAG_ALIGNMENT_BIAS

Gets magnetometer misalignment bias.

Misalignment bias

Vector3f

Identifier:

Name:

Description:

Response:

Return format:

81

GET_MAG_REFERENCE

Gets magnetometer reference.

Magnetometer reference vector

Vector3f

Filter Settings Command

Identifier:

Name:

Description:

Packet data:

Format:

Response:

41

SET_FILTER_MODE

Set the sensor filter mode.

Mode identifier

32-bit integer

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Response:

Return format:

42

GET_FILTER_MODE

Get the currently selected filter mode.

Filter mode identifier

32-bit integer

Identifier:

Name:

Description:

Packet data:

Format:

Response:

43

SET_FILTER_PRESET

Set one of the filter parameter presets.

Magnetometer correction strength preset identifier

[ TO-DO ]

32-bit integer

Identifier:

Name:

Description:

Response:

Return format:

44

GET_FILTER_PRESET

Get the currently magnetometer correction strength preset

Magnetometer correctionstrength preset identifier

32-bit integer

Identifier:

Name:

Description:

Packet data:

Format:

Response:

60 (deprecated)

SET_RAW_DATA_LP

Set raw data low-pass

Low pass strength

Float

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Response:

Return format:

61 (deprecated)

GET_RAW_DATA_LP

Get raw data low-pass

Low pass strength

Float

Identifier:

Name:

Description:

Packet data:

Format:

Response:

67

SET_LIN_ACC_COMP_MODE

Sets linear acceleration compensation mode.

Mode identifier

32-bit integer

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Response:

Return format:

68

GET_LIN_ACC_COMP_MODE

Gets linear acceleration compensation mode.

Mode identifier

32-bit integer

Identifier:

Name:

Description:

Packet data:

Format:

Response:

69

SET_CENTRI_COMP_MODE

Sets centripetal acceleration compensation mode.

Mode identifier

32-bit integer

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Response:

Return format:

70

GET_CENTRI_COMP_MODE

Gets centripetal acceleration compensation mode.

Mode identifier

32-bit integer

UART Settings Commands

Identifier:

Name:

Description:

Packet data:

Format:

Response:

84

SET_UART_BAUDRATE

Sets the current UART baud rate.

Baud rate data

Int32

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Response:

Return format:

85

GET_UART_BAUDRATE

Gets current UART baud rate.

Baud rate identifier

32-bit integer

Identifier:

Name:

Description:

Packet data:

Format:

Response:

86

SET_UART_FORMAT

Sets UART communication format,

Communication format identifier

Int32

ACK (success) or NACK (error)

CAN Bus Settings Command

Identifier:

Name:

Description:

Packet data:

Format:

Response:

46

SET_CAN_BAUDRATE

Sets CAN baud rate.

Baud rate identifier

Int32

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Packet data:

 

Format:

Response:

62

SET_CAN_MAPPING

Sets CANopen data format mapping.

The mapping data consists of 8 integer words. Each of these words represents the assignment of half a CANopen transmission object / message (TPDO) to specific sensor data.

Int32

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Response:

Return format:

63

GET_CAN_MAPPING

Gets CANopen mapping.

Mapping identifier

Int32

Identifier:

Name:

Description:

Packet data:

Format:

Response:

64

SET_CAN_HEARTBEAT

Sets CANopen heartbeat frequency

Frequency identifier

Int32

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Response:

Return format:

65

GET_CAN_HEARTBEAT

Gets CAN heartbeat frequency

Int32

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Response:

Return format:

71

GET_CAN_CONFIGURATION

Sets the current CAN channel mode.

Channel mode identifier

Int32

Identifier:

Name:

Description:

Packet data:

Format:

Response:

72

SET_CAN_CHANNEL_MODE

Sets the current CAN channel mode.

Channel mode identifier

Int32

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Packet data:

Format:

Response:

73

SET_CAN_POINT_MODE

Sets the current CAN point mode.

Point mode identifier

Int32

ACK (success) or NACK (error)

Identifier:

Name:

Description:

Packet data:

Format:

Response:

74

SET_CAN_START_ID

Sets current CAN message start ID.

Start ID

Int32

ACK (success) or NACK (error)