Functional Description


This chapter describes the MTi 1-s pinout and gives details about the supported communication interfaces.

 

Pin configuration

 

Pin configuration of the MTi 1-series module (top view)

 

 

Pin map

 

The pin map depends on the peripheral selection, as can be seen in the table below. Configuring the peripheral is explained in #Peripheral interface selection.

 

Pin mapping for peripheral selection

 

 

PSEL:

 I2C

PSEL:

SPI

PSEL:

UART half duplex

PSEL:

UART full duplex

1#1

AUX_SCK/DNC

AUX_SCK/DNC

AUX_SCK/DNC

AUX_SCK/DNC

2

DNC

DNC

DNC

DNC

3

DNC

DNC

DNC

DNC

4

GND

GND

GND

GND

5

VDDA

VDDA

VDDA

VDDA

6

nRST

nRST

nRST

nRST

7

VDDIO

VDDIO

VDDIO

VDDIO

8

GND

GND

GND

GND

9

DNC

SPI_nCS

DNC

DNC

10

ADD2#2

SPI_MOSI

DNC

DNC

11

ADD1#2

SPI_MISO

DNC

DNC

12

ADD0

SPI_SCK

DNC

DNC

13

GND

GND

GND

GND

14

PSEL0

PSEL0

PSEL0

PSEL0

15

PSEL1

PSEL1

PSEL1

PSEL1

16

SYNC_IN

SYNC_IN

SYNC_IN

SYNC_IN

17

RESERVED

RESERVED

RESERVED

RESERVED

18#1

AUX_RX/DNC

AUX_RX/DNC

AUX_RX/DNC

AUX_RX/DNC

19#1

AUX_TX/DNC

AUX_TX/DNC

AUX_TX/DNC

AUX_TX/DNC

20#1

SYNC_PPS/DNC

SYNC_PPS/DNC

SYNC_PPS/DNC

SYNC_PPS/DNC

21

DNC

DNC

DE

RTS

22

DRDY

DRDY

nRE

CTS#3

23

I2C_SDA

DNC

UART_RX

UART_RX

24

I2C_SCL

DNC

UART_TX

UART_TX

25

GND

GND

GND

GND

26#1

AUX_nCS/DNC

AUX_nCS/DNC

AUX_nCS/DNC

AUX_nCS/DNC

27#1

AUX_MOSI/DNC

AUX_MOSI/DNC

AUX_MOSI/DNC

AUX_MOSI/DNC

28#1

AUX_MISO/DNC

AUX_MISO/DNC

AUX_MISO/DNC

AUX_MISO/DNC

 


[1] AUX and SYNC_PPS pins are only available on MTi-7/8.

[2] I2C addresses, see #List of I2C addresses.

[3] CTS cannot be left unconnected if the interface is set to UART full duplex. If HW flow control is not used, connect to GND.


 

 

 

Pin descriptions

 

Pin description MTi 1-series module

Name

Type

Description

Power Interface

VDDA

Power

Analog power supply voltage for sensing elements

VDDIO

Power

Digital supply voltage. Also used as I/O reference.

Controls

PSEL0

Selection pins

These pins determine the signal interface. See #Peripheral interface selection. Note that when the PSEL0/PSEL1 is not connected, its value is 1. When PSEL0/PSEL1 is connected to GND, its value is 0.

PSEL1

nRST#nrst note

 

Active low reset pin. Only drive with an open drain output or momentary (tactile) switch to GND. During normal operation this pin must be left floating, because this line is also used for internal resets. This pin has an internal weak pull-up to VDDIO.

ADD2

Selection pins

I2C address selection lines. See #List of I2C addresses.

 

ADD1

ADD0

Signal Interface

I2C_SDA

I2C interface

I2C serial data input/output

I2C_SCL

I2C serial clock input

SPI_nCS

SPI interface

SPI chip select input (active low)

SPI_MOSI

SPI serial data input (slave)

SPI_MISO

SPI serial data output (slave)

SPI_SCK

SPI serial clock input

RTS

UART interface

Hardware flow control output in UART full duplex mode (Ready-to-Send)

CTS

Hardware flow control input in UART full duplex mode (Clear-to-Send). If flow control is not used, connect to GND

nRE

Receiver control signal output in UART half duplex mode

DE

Transmitter control signal output in UART half duplex mode

UART_RX

Receiver data input

UART_TX

Transmitter data output

SYNC_IN

Sync interface

Accepts a trigger input to request the latest available data message

DRDY

Data ready

Data ready output indicates that data is available (SPI / I2C)

Auxiliary interface (MTi-7/8 only)

AUX_RX

Auxiliary GNSS interface

Receiver data input from GNSS module

AUX_TX

Transmitter data output to GNSS module

SYNC_PPS

Pulse per second input from GNSS module

AUX_nCS

Auxiliary SPI interface

SPI chip select output

AUX_MOSI

SPI serial data output (master)

AUX_MISO

SPI serial data input (master)

AUX_SCK

SPI serial clock output

 

*nRST Note: After sending a configuration message (e.g., SetOutputConfiguration) or a store message (e.g., IccCommand to store ICC parameters), please ensure that you wait until an Ack message is received before sending a Reset message or forcing a reset with the nRST pin.

 

Peripheral interface selection

 

The MTi 1-series module supports UART, I2C, and SPI interfaces for host communication. The host can select the active interface through the peripheral selection pins PSEL0 and PSEL1. The module reads the state of these pins at start-up, and configures its peripheral interface according to the Table below. To change the selected interfaces, the host must first set the desired state of the PSEL0 and PSEL1 pins, and then reset the module. The module has internal pull-ups on the PSEL0 and PSEL1 pins. If these pins are left unconnected, the peripheral interface selection defaults to I2C (PSEL0 = 1, and PSEL1 = 1).

 

Peripheral interface selection

Interface

PSEL1

PSEL0

I2C

1

1

SPI

1

0

UART half-duplex

0

1

UART full-duplex

0

0

 


Peripheral interface architecture

 

At its core, the module uses the Xsens-proprietary Xbus protocol which is compatible with all Xsens Motion Tracker products. This protocol is available on all interfaces; UART (asynchronous serial port interfaces), I2C and SPI interfaces. The I2C and SPI interfaces differ from UART in that they are synchronous, and have a master-slave relationship in which the slave cannot send data by itself. This makes the Xbus protocol not directly transferable to these interfaces. For this purpose, the module introduces the MTi Synchronous Serial Protocol (MTSSP) protocol, a protocol for exchanging standard Xbus protocol messages over the I2C and SPI interfaces. The below figure shows how MTSSP fits in the module's (simplified) communication architecture. The module has generic Input- and Output-Queues for Xbus protocol messages. For I2C and SPI, the MTSSP layer translates these messages, while for the UART connection, the module transports the messages as-is.

 

Note: The MTi 1-series offers access to the module via the UART, SPI and I²C interfaces, as well as an additional USB interface when using the Development Shield. Please note that the graphical software tools, such as MT Manager and the Magnetic Field Mapper, as well as a large part of the MT SDK are only supported when using serial (UART/USB) communication. For I²C or SPI communication, dedicated "embedded example codes" are available as part of the MT SDK.

 

Communication architecture of MTi 1-series module (simplified)

 

 

Xbus Protocol

 

The Xbus protocol is Xsens’ proprietary protocol for interfacing with the MTi 1-series. The MT Low Level Communication Protocol Documentation is a complete reference for the protocol. For a better understanding of the MTSSP explanation, the advice is to read the protocol reference first.

 

 

MTSSP Synchronous Serial Protocol

 

This Section specifies the MTi Synchronous Serial Protocol (MTSSP). The MTi 1-series module uses MTSSP as the communication protocol for both the I2C and SPI interfaces. The embedded example codes, which can be found in the MT SDK folder of the MT Software Suite, provide a reference implementation for the host side of the protocol.

 

Data flow

MTSSP communication happens according to the master-slave model. The MTi 1-series module will always fulfill the slave-role while the user/integrator/host of the module is always the Master. The Master always initiates and drives communication. The Master either writes a message to the module, or reads a message from the module.

The figure below shows the data flow between the host (Master Device), and the MTi 1-s (Slave). The Master can control the Module by sending Xbus messages to the Control Pipe. The Module considers the bytes received in a single bus transfer to be exactly one Xbus message. The MTi 1-s places the received message in the Input Queue for further handling. The Xbus Interpreter handles the messages in the Input Queue, and places the response messages in the Output Queue. The Master Device can read these response messages from the Notification Pipe.

The Master can switch the Module between configuration and measurement mode by sending the usual GotoConfig and GotoMeasurement (reduced Xbus) messages to the Control Pipe. When placed in Measurement mode, the module will place the generated measurement data (MTData2) in the Measurement Pipe. The Master Device has to read the Measurement Pipe to receive measurement data.

For the Master to know the size of the messages in the Notification and Measurement pipes, it can read the Pipe Status. The Pipe Status contains the size in bytes of the (single) next message in both the Notification and Measurement pipes. The Master can tweak the behavior of the protocol by writing the Protocol Configuration. The Master can also read the Protocol Configuration to check current behavior, and get protocol information.

 

Note: Both the Measurement Pipe and the Notification Pipe have limited sizes and can therefore only contain a limited number of (reduced) Xbus messages. The amount of messages that can be contained in the pipes depends on the size of the individual messages. Both pipes act as a First-In-First-Out (FIFO) buffer: When reading from either pipe, the oldest message in the pipe will be read first. Once the pipe is full, a newly produced message will be discarded by the MTi 1-s and a (reduced Xbus) error message (data overflow, 0x42 0x01 0x29 0x95) will be added to the Notification Pipe. It is therefore important for the host to read out new messages in time, such that the pipe will not fill up, resulting in lost measurement data or notifications.

For best practices for I2C and SPI communication, please see BASE: Best practices I2C and SPI for MTi 1-series

 

Data flows within MTSSP

 

Data ready signal

The Data Ready Signal (DRDY) is a notification line driven by the module. Its default behavior is to indicate the availability of new data in either the Notification or the Measurement pipe. By default, the line is low when both pipes are empty, and will go high when either pipe contains an item. As soon as the Master has read all pending messages, the DRDY line will go low again.

The Master can change the behaviour of the DRDY signal using the Procotol Configuration. Please refer to the description of the ConfigureProtocol opcode (#List of defined opcodes) for more information.

 

Opcodes

The Master starts each transfer with an opcode. The opcode determines the type of the transfer. The defined opcodes are as listed in the table below. Following the opcode, and depending on whether it is a read or write transfer, the Master either reads or writes one or more data bytes. The specific transfer format depends on the underlying bus protocol (I2C or SPI).

 

For some opcodes, the MTSSP uses reduced Xbus messages. A reduced Xbus message is a regular Xbus message with the preamble and busID fields removed to save bandwidth. These fields correspond to the first two bytes of a regular Xbus message. The calculation of the checksum for a reduced Xbus message still includes the busID and assumes its value to be 0xFF. For an overview of available Xbus messages, refer to the MT Low Level Communication Protocol Documentation.

 

List of defined opcodes

Opcode

Name

Read/Write

Data format

Description

0x01

ProtocolInfo

Read

Opcode defined

Status of the protocol behaviour, protocol version

0x02

ConfigureProtocol

Write

Opcode defined

Tweak the Protocol, e.g. the behaviour of the DRDY pin, behaviour of the pipes

0x03

ControlPipe

Write

Reduced Xbus

Used to send control messages to the module

0x04

PipeStatus

Read

Opcode defined

Provides status information for the read pipes

0x05

NotificationPipe

Read

Reduced Xbus

Used to read non-measurement data: errors, acknowledgements and other notifications from the module

0x06

MeasurementPipe

Read

Reduced Xbus

All measurement data (Xbus: MTData2) generated by the module will be available in the measurement pipe

 

 

ProtocolInfo (0x01)

The ProtocolInfo opcode allows the Master to read the active protocol configuration. The format of the message is as follows (All data is little endian, byte aligned):

 

struct MtsspInfo

{

uint8_t m_version;

uint8_t m_drdyConfig;

};

 

 

m_version:

7

6

5

4

3

2

1

0

VERSION [7:0]

 

 

m_drdyConfig:

Bits 7:4

Reserved for future use

Bit 3

MEVENT: Measurement pipe DRDY event enable

0 : Generation of DRDY event is disabled

1 : Generation of DRDY event is enabled (default)

Bit 2

NEVENT: Notification pipe DRDY event enable

0 : Generation of DRDY event is disabled

1 : Generation of DRDY event is enabled (default)

Bit 1

OTYPE: Output type of DRDY pin

0: Push/pull (default)

1: Open drain

Bit 0

POL: Polarity of DRDY signal

0: Idle low (default)

1: Idle high

 

 

ConfigureProtocol (0x02)

The ProtocolInfo opcode allows the Master to change the active protocol configuration. The format of the message is as follows (All data is little endian, byte aligned):

 

struct MtsspConfiguration

{

uint8_t m_drdyConfig;

};

 

 

m_drdyConfig:

Bits 7:4

Reserved for future use

Bit 3

MEVENT: Measurement pipe DRDY event enable

0 : Generation of DRDY event is disabled

1 : Generation of DRDY event is enabled (default)

Bit 2

NEVENT: Notification pipe DRDY event enable

0 : Generation of DRDY event is disabled

1 : Generation of DRDY event is enabled (default)

Bit 1

OTYPE: Output type of DRDY pin

0: Push/pull (default)

1: Open drain

Bit 0

POL: Polarity of DRDY signal

0: Idle low (default)

1: Idle high

 

Note: Changes made to the DRDY configuration are volatile, e.g. they are lost during a power cycle. Non-default settings should therefore be re-applied after each power-up.

 

ControlPipe (0x03)

The ControlPipe opcode allows the Master to write messages to the Control Pipe. The bytes following the opcode represent a single (reduced) Xbus message.

 

 

PipeStatus (0x04)

The PipeStatus opcode allows the Master to retrieve the status of the module's Notification- and Measurement pipes. The format of the message is as follows (All data is little endian, byte aligned):

 

struct MtsspConfiguration

{

uint16_t m_notificationMessageSize;

uint16_t m_measurementMessageSize;

};

 

 

NotificationPipe (0x05)

The Master uses the NotificationPipe opcode to read from the Notification Pipe. The read data is a single reduced Xbus message.

 

 

MeasurementPipe (0x06)

The Master uses the MeasurementPipe opcode to read from the Measurement Pipe. The read data is a single reduced Xbus message (MTData2).

 

 

I2C

The MTi 1-series module acts as an I2C Slave. The User of the MTi 1-series module is the I2C Master.

 

The user can configure the I2C slave address through the ADD0, ADD1 and ADD2 pins. The module reads the state of these pins at start-up, and configures the slave address according to the table below. The ADD0, ADD1 and ADD2 pins are pulled-up internally, so when left unconnected, the address selection defaults to 0x6B (ADD = 111).

 

List of I2C addresses

I2C address

ADD2

ADD1

ADD0

0x1D

0

0

0

0x1E

0

0

1

0x28

0

1

0

0x29

0

1

1

0x68

1

0

0

0x69

1

0

1

0x6A

1

1

0

0x6B (default)

1

1

1

 

 

Implemented I2C bus protocol features

Feature

Slave Requirement

MTi 1-series

7-bit slave address

Mandatory

Yes

10-bit slave address

Optional

No

Acknowledge

Mandatory

Yes

Arbitration

N/A

N/A

Clock stretching

Optional

Yes#4

Device ID

Optional

No

General Call address

Optional

No

Software Reset

Optional

No

START byte

N/A

N/A

START condition

Mandatory

Yes

STOP condition

Mandatory

Yes

Synchronization

N/A

N/A

 


[4] The MTi-1 module relies on the I2C clock stretching feature to overcome fluctuations in processing time. The Master is required to support this feature.

 


Writing to the MTi 1-s

Write operations consists of a single I2C write transfer. The Master addresses the module and the first byte it sends is the opcode. The bytes that follow are the data bytes. The interpretation of these data bytes depends on the opcode, as described in #MTSSP.

 

The maximum message size a module can receive is 512 bytes. If the Master sends more than 512 bytes, the module will reset its receive-buffer, which reduces the received message to consist only of the excess bytes.

 

The below figure shows the I2C transfer of a write message operation:

 

I2C write message operation

 

 

Reading from the module

To read from the module, the Master first does an I2C write transfer to transmit the opcode. The opcode tells the module what data the Master wants to read. The module then prepares the requested data for transmission. The Master then does an I2C read transfer to retrieve the data. The figure below shows the I2C transfers for the described read method.

 

 

Read message operation with full write transfer and full read transfer (I2C)

 

Alternatively, the user can perform the read operation using an I2C transfer with a repeated start condition. The below figure depicts this read method.

 

Read message transfer using a repeated start condition (I2C)

 

The Master controls how many data bytes it reads. For reading the Notification- and Measurement Pipes, the number of bytes the Master must read depends on the size of the pending message. In order to determine the correct number of bytes, the Master should first read the Pipe Status to obtain the sizes of the pending messages.

 

If the Master reads more bytes than necessary, the module will restart sending the requested data from the beginning.

 

 

SPI

The MTi 1-series module acts as an SPI Slave. The User of the MTi 1-series module is the SPI Master.

 

SPI Configuration

The MTi 1-series supports 4-wire mode SPI. The four lines used are:

 

The module uses SPI mode 3: It captures data on the rising clock edge, and it latches/propagates data on the falling clock edge. (CPOL=1 and CPHA=1). Data is clocked-out MSB first. The module uses an 8-bit data format.

 

Data transfer

The module uses  a single type of SPI transfer for all communications. The below figure depicts this basic transfer.

 

SPI basic transfer

 

The Master starts a transfer by pulling the SPI_nCS low, in order to select the Slave. The Master must keep the SPI_nCS line low for the duration of the transfer. The Slave will interpret the rising edge of the SPI_nCS line as the end of the transfer. The Master places the data it needs to transmit on the SPI_MOSI line. The Slave will place its data on the SPI_MISO line.

 

The Master first transmits the opcode. The opcode determines what kind of data the Master transmits, and what kind of data the Master wants to read from the Slave (see #MTSSP). The second-to-fourth byte the Master transmits are the fill words. These fill words are needed to give the Slave time to select the data it must send for the remainder of the transfer. Both Master and Slave are free to choose the value of the fill words, and the receiving end should ignore their value. However, the first 4 bytes transmitted by the MTi 1-series module (Slave) are always 0xFA, 0xFF, 0xFF, 0xFF.

 

Following the first four words are the actual data of the transfer. It is the responsibility of the Master to determine how many bytes it must transfer. For reading the Notification- and Measurement Pipes, the number of bytes the Master must read depends on the size of the pending message. In order to determine the correct number of bytes, the Master should first read the Pipe Status to obtain the sizes of the pending messages.

 

Timing

The table below and figure specify the timing constraints that apply to the SPI transport layer. The Master must adhere to these constraints.

 

SPI timing

Symbol

Parameter

Unit

Min

Max

T1

Slave select to first complete word delay

μs

4

 

T2

Byte time

μs

4

 

T3

Consecutive SPI transfer guard time

μs

3

 

 

Max SPI bitrate

Mbit

 

2

 


SPI timing

 

 

UART half-duplex

 

The user can configure the MTi 1-series module to communicate over UART in half-duplex mode. The UART frame configuration is 8 data bits, no parity and 1 stop bit (8N1). In addition to the RX and TX pins, the modules use control lines nRE and DE. The modules use these control outputs to drive the TX signal on a shared medium and to drive the signal of the shared medium on the RX signal.

 

A typical use case for this mode is to control an RS485 transceiver where the shared medium is the RS485 signal, and the nRE and DE lines control the buffers inside the transceiver.

 

When the module is transmitting data on its TX pin it will raise both the nRE and DE lines, else it will pull these lines low. The below figure depicts the behaviour of the involved signals.

 

Behaviour of the nRE and DE lines

 

Note that in this mode the UART of the MTi 1-s itself is still operating full duplex.

 

 

UART full duplex with RTS/CTS flow control

 

The user can configure the MTi 1-s module to communicate over UART in full duplex mode with RTS/CTS flow control. The UART frame configuration is 8 data bits, no parity and 1 stop bit (8N1). In addition to the RX and TX signals for data communication, the module uses the RTS and CTS signals for hardware flow control.

 

The CTS signal is an input for the module. The module checks the state of the CTS line at the start of every byte it transmits. If CTS is low, the module transmits the byte. Otherwise, it postpones transmission until CTS is lowered. When, during the transmission of a byte, the user raises the CTS signal, then the module completes transmission of that byte before postponing further output. The module will not retransmit this byte. The figure below shows the behaviour of the TX and CTS lines.

 

Data transmit behaviour under CTS

 

The RTS signal is an output for the module. If the RTS line is high, the module is busy and unable to receive new data. Otherwise, the module’s UART is idle and ready to receive. After receiving a byte, the direct memory access (DMA) controller of the module will transfer the byte to its receive first in first out (FIFO) buffer. The module will raise the RTS signal during this transfer. Therefore, with every byte received, the module raises the RTS line quickly. The figure below shows this behaviour.

 


RTS behaviour under data reception

 

The user can use this communication mode without hardware flow control. In this case, the user must tie the CTS line low (GND) to make the module transmit.

Create your own Knowledge Base