This chapter describes the Xsens Avior OEM series pinout and gives details about the supported communication interfaces.
Below figure shows the pin configuration of the Xsens Avior OEM series.
.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kemY4dnF2MjRlcWhnLmNsb3VkZnJvbnQubmV0L3VzZXJmaWxlcy8yNzc1NC8zNTEzNS9ja2ZpbmRlci9pbWFnZXMvcXUvMjAyNS9pbWFnZSgzKS5wbmciLCJDb25kaXRpb24iOnsiRGF0ZUxlc3NUaGFuIjp7IkFXUzpFcG9jaFRpbWUiOjE3NjU4Mzg2NTB9fX1dfQ__&Signature=MbAMGCz3ztLS4Fcp5OoGL1R2JO4AcBjaL1kxKKp1bjSShC4thBmL1krMHvPsacgW~hYaCBuezGe1bA3lxkGarmMzw4kpbytm6ti3ax~yCvxRGS1dF3v5rduWvt3zhxnp~FPhDXMqd2Piru3RzsmIz1q3BdS38Y5iwpK44-BsW8-B3-GGvfdVZGSXz9qVv~RJ3bhguFPGy7qHC66BjPlmILeNsJFPKAEhcYP5PI1ARKNSQVlzR2b-xtSGEDzh7eiMSAwZiKH0UGVeRRiuDItMWtKG~NBmxaYT2KYSe3QCPCsVav0LryzK0gnvQZN4OsYZmxhDfGGKsrQwCEdAB9zoNQ__&Key-Pair-Id=K2TK3EG287XSFC)
Pin configuration of the Xsens Avior OEM series
Below table shows the pin descriptions of the Xsens Avior OEM series.
Overall Pin functions
|
Pin |
UART FD |
UART HD |
SPI |
I2C |
I/O type |
|
1 |
VDDA (3.3 – 5 V) |
PWR |
|||
|
2 |
GND |
PWR |
|||
|
3 |
VDDIO (1.8 – 3.3 V) |
PWR |
|||
|
4 |
GND |
PWR |
|||
|
5 |
RFU |
O |
|||
|
6 |
- |
- |
DRDY |
DRDY |
I/- |
|
7 |
RFU |
I |
|||
|
8 |
GND |
GND |
VDDIO |
I2C_SCL |
I |
|
9 |
SEC_TX |
SEC_TX |
CAN_TX |
CAN_TX |
O |
|
10 |
GND |
VDDIO |
GND |
I2C_SDA |
I/O |
|
11 |
SEC_RX |
SEC_RX |
CAN_RX |
CAN_RX |
I |
|
12 |
GND |
PWR |
|||
|
13 |
MAIN_TX |
MAIN_TX |
SPI_SCK |
RFU |
I/O |
|
14 |
MAIN_RX |
MAIN_RX |
SPI_NSS |
RFU |
I |
|
15 |
MAIN_RTS |
MAIN_DE |
SPI_MISO |
RFU |
O |
|
16 |
MAIN_CTS |
- |
SPI_MOSI |
RFU |
I |
|
17 |
SYNC_IN1 |
I |
|||
|
18 |
SYNC_IN2 |
I |
|||
|
19 |
RFU |
I |
|||
|
20 |
SYNC_OUT |
O |
|||
Peripheral function selection
|
PSEL0 (pin 8) |
PSEL1 (pin 10) |
Function |
Description |
|
LOW (GND) |
LOW (GND) |
UART FD |
UART with flow control |
|
LOW (GND) |
HIGH (VDDIO) |
UART HD |
UART with half duplex control |
|
HIGH (VDDIO) |
LOW (GND) |
SPI |
SPI slave |
|
HIGH (pull-up) |
HIGH (pull-up) |
I2C |
I2C slave (both PSEL pins pulled to VDDIO with external pull-up resistors) |
Function descriptions
|
Name |
I/O type |
Description |
|
VDDA |
PWR |
Analog power input (3.3 – 5 V) |
|
VDDIO |
PWR |
Digital power input (1.8 – 3.3 V) |
|
GND |
PWR |
Ground |
|
RFU |
I/O |
Reserved for future use (do not connect) |
|
SEC_TX |
O |
Secondary UART transmitter output* |
|
SEC_RX |
I |
Secondary UART receiver input* |
|
MAIN_TX |
O |
Primary UART transmitter output to host |
|
MAIN_RX |
I |
Primary UART receiver input from host |
|
MAIN_RTS |
O |
Primary Ready To Send output to host |
|
MAIN_CTS |
I |
Primary Clear To Send input from host |
|
MAIN_DE |
O |
Primary UART driver enable output (can also be connected to nRE) |
|
CAN_TX |
O |
CAN transmitter output to CAN transceiver |
|
CAN_RX |
I |
CAN receiver input from CAN transceiver |
|
DRDY |
O |
SPI/I2C data ready output to host |
|
SPI_SCK |
I |
SPI serial clock input from host |
|
SPI_NSS |
I |
SPI not chip select input from host |
|
SPI_MISO |
O |
SPI data output to host |
|
SPI_MOSI |
I |
SPI data input from host |
|
I2C_SCL |
I |
Open drain I2C serial clock input from host |
|
I2C_SDA |
I/O |
Open drain I2C data input/output |
|
SYNC_IN1 |
I |
Multifunctional synchronization input 1 |
|
SYNC_IN2 |
I |
Multifunctional synchronization input 2 |
|
SYNC_OUT |
O |
Configurable synchronization output |
* Supported from FW 1.3.0 and later
UART with flow control option
Pin descriptions Avior OEM Host Interface through UART with flow control
|
Pin |
Name |
I/O type |
Description |
|
1 |
VDDA |
PWR |
Analog power input (3.3 – 5 V) |
|
2 |
GND |
PWR |
Ground |
|
3 |
VDDIO |
PWR |
Digital power input (1.8 – 3.3 V) |
|
4 |
GND |
PWR |
Ground |
|
5 |
RFU |
O |
Reserved for future use |
|
6 |
- |
- |
|
|
7 |
RFU |
I |
Reserved for future use |
|
8 |
GND |
I |
Peripheral selection input 0 |
|
9 |
SEC_TX |
O |
Secondary UART transmitter output* |
|
10 |
GND |
I |
Peripheral selection input 1 |
|
11 |
SEC_RX |
I |
Secondary UART receiver input* |
|
12 |
GND |
PWR |
Ground |
|
13 |
MAIN_TX |
O |
Primary UART transmitter output to host |
|
14 |
MAIN_RX |
I |
Primary UART receiver input from host |
|
15 |
MAIN_RTS |
O |
Primary Ready To Send output to host |
|
16 |
MAIN_CTS |
I |
Primary Clear To Send input from host |
|
17 |
SYNC_IN1 |
I |
Multifunctional synchronization input 1 |
|
18 |
SYNC_IN2 |
I |
Multifunctional synchronization input 2 |
|
19 |
RFU |
I |
Reserved for future use |
|
20 |
SYNC_OUT |
O |
Configurable synchronization output |
* Supported from FW 1.3.0 and later
UART with half duplex control option
Pin descriptions Avior OEM Host Interface through UART with half duplex control
|
Pin |
Name |
I/O type |
Description |
|
1 |
VDDA |
PWR |
Analog power input (3.3 – 5 V) |
|
2 |
GND |
PWR |
Ground |
|
3 |
VDDIO |
PWR |
Digital power input (1.8 – 3.3 V) |
|
4 |
GND |
PWR |
Ground |
|
5 |
RFU |
O |
Reserved for future use |
|
6 |
- |
- |
|
|
7 |
RFU |
I |
Reserved for future use |
|
8 |
GND |
I |
Peripheral selection input 0 |
|
9 |
SEC_TX |
O |
Secondary UART transmitter output* |
|
10 |
VDDIO |
I |
Peripheral selection input 1 |
|
11 |
SEC_RX |
I |
Secondary UART receiver input* |
|
12 |
GND |
PWR |
Ground |
|
13 |
MAIN_TX |
O |
Primary UART transmitter output to host |
|
14 |
MAIN_RX |
I |
Primary UART receiver input from host |
|
15 |
MAIN_DE |
O |
Primary UART driver enable output (can also be connected to nRE) |
|
16 |
- |
- |
|
|
17 |
SYNC_IN1 |
I |
Multifunctional synchronization input 1 |
|
18 |
SYNC_IN2 |
I |
Multifunctional synchronization input 2 |
|
19 |
RFU |
I |
Reserved for future use |
|
20 |
SYNC_OUT |
O |
Configurable synchronization output |
* Supported from FW 1.3.0 and later
SPI option
Pin descriptions Avior OEM Host Interface through SPI
|
Pin |
Name |
I/O type |
Description |
|
1 |
VDDA |
PWR |
Analog power input (3.3 – 5 V) |
|
2 |
GND |
PWR |
Ground |
|
3 |
VDDIO |
PWR |
Digital power input (1.8 – 3.3 V) |
|
4 |
GND |
PWR |
Ground |
|
5 |
RFU |
O |
Reserved for future use |
|
6 |
DRDY |
O |
Data ready output to host |
|
7 |
RFU |
I |
Reserved for future use |
|
8 |
VDDIO |
I |
Peripheral selection input 0 |
|
9 |
CAN_TX |
O |
CAN transmitter output to CAN transceiver |
|
10 |
GND |
I |
Peripheral selection input 1 |
|
11 |
CAN_RX |
I |
CAN receiver input from CAN transceiver |
|
12 |
GND |
PWR |
Ground |
|
13 |
SPI_SCK |
I |
SPI serial clock input from host |
|
14 |
SPI_NSS |
I |
SPI not chip select input from host |
|
15 |
SPI_MISO |
O |
SPI data output to host |
|
16 |
SPI_MOSI |
I |
SPI data input from host |
|
17 |
SYNC_IN1 |
I |
Multifunctional synchronization input 1 |
|
18 |
SYNC_IN2 |
I |
Multifunctional synchronization input 2 |
|
19 |
RFU |
I |
Reserved for future use |
|
20 |
SYNC_OUT |
O |
Configurable synchronization output |
I2C option
Pin descriptions Avior OEM Host Interface through I2C
|
Pin |
Name |
I/O type |
Description |
|
1 |
VDDA |
PWR |
Analog power input (3.3 – 5 V) |
|
2 |
GND |
PWR |
Ground |
|
3 |
VDDIO |
PWR |
Digital power input (1.8 – 3.3 V) |
|
4 |
GND |
PWR |
Ground |
|
5 |
RFU |
O |
Reserved for future use |
|
6 |
DRDY |
O |
Data ready output to host |
|
7 |
RFU |
I |
Reserved for future use |
|
8 |
I2C_SCL |
I |
Open drain I2C serial clock input from host |
|
9 |
CAN_TX |
O |
CAN transmitter output to CAN transceiver |
|
10 |
I2C_SDA |
I/O |
Open drain I2C data input/output |
|
11 |
CAN_RX |
I |
CAN receiver input from CAN transceiver |
|
12 |
GND |
PWR |
Ground |
|
13 |
ADDR0 |
I |
I2C address input 0 |
|
14 |
ADDR1 |
I |
I2C address input 1 |
|
15 |
ADDR2 |
I |
I2C address input 2 |
|
16 |
ADDR3 |
I |
I2C address input 3 |
|
17 |
SYNC_IN1 |
I |
Multifunctional synchronization input 1 |
|
18 |
SYNC_IN2 |
I |
Multifunctional synchronization input 2 |
|
19 |
RFU |
I |
Reserved for future use |
|
20 |
SYNC_OUT |
O |
Configurable synchronization output |
The pin mapping depends on the status of the selection pins (pin 8 = SEL0 and pin 10 = SEL1), which will be sampled during the boot sequence of the module. When both of these pins are pulled high (with external pull-ups) these pins are used as I2C pins after boot-up (the user must ensure that no I2C communication is happening during the boot-up sequence). The DRDY signal (pin 6) can then be used to indicate to the host/master that new data is available (for SPI and I2C communication).
|
|
PSEL[0..1] (pin 8/10) |
|||
|
# |
00 UART full duplex |
01 UART half duplex |
10 SPI |
11 I2C |
|
1 |
VIN (3.3 - 5 V) |
|||
|
2 |
GND |
|||
|
3 |
VDDIO_IN (1.8 - 3.3 V) |
|||
|
4 |
GND |
|||
|
5 |
Reserved/DNC |
|||
|
6 |
Reserved/DNC |
DRDY |
||
|
7 |
Reserved/DNC |
|||
|
8 |
SEL0àGND |
SEL0àGND |
SEL0àVDDIO |
SEL0àI2C_SCL (pull-up) |
|
9 |
Secondary UART_TX |
CAN_TX |
||
|
10 |
SEL1àGND |
SEL1àVDDIO |
SEL1àGND |
SEL1àI2C_SDA (pull-up) |
|
11 |
Secondary UART_RX |
CAN_RX |
||
|
12 |
GND |
|||
|
13 |
Primary UART_TX |
SPI_SCK |
I2C_ADDR0 |
|
|
14 |
Primary UART_RX |
SPI_NSS |
I2C_ADDR1 |
|
|
15 |
Primary UART_RTS |
Primary UART_DE |
SPI_MISO |
I2C_ADDR2 |
|
16 |
Primary UART_CTS |
Reserved/DNC |
SPI_MOSI |
Reserved/DNC |
|
17 |
SYNC_IN1 |
|||
|
18 |
SYNC_IN2 |
|||
|
19 |
Reserved/DNC |
|||
|
20 |
SYNC_OUT |
|||
The Avior OEM series supports different peripheral interfaces depending on the peripheral selection inputs. These are all low-level interfaces that need proper transceivers (e.g. RS232 or CAN transceiver) added externally when communicating over a cable. Some peripherals (e.g. SPI or I2C) can also be directly connected to a host MCU.
The Xsens Avior-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
|
Interfaces |
SEL0 |
SEL1 |
|---|---|---|
|
0 |
0 |
|
0 |
1 |
|
1 |
0 |
|
1 |
1 |
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.
.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kemY4dnF2MjRlcWhnLmNsb3VkZnJvbnQubmV0L3VzZXJmaWxlcy8yNzc1NC8zNTEzNS9ja2ZpbmRlci9pbWFnZXMvcXUvaW1hZ2UoNjkpLnBuZyIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc2NTgzODY1MH19fV19&Signature=kDNsbZBeWu2qZg7sWuFm~eg2Ja1AfpJbqT1VjkUA6PKNK1c8xHGHM0dssni6eQkdEGaxwpY5-7DhANBLGucxr5-v7NdQQo-DySIXlMJq62RMcqnmruYQxyPCTfaLMLnRD54aLdq1EYOigiy0FuVWLL~WjamfIXQq~LlmoIrLSaAfq0OXlNVhqLZNvjaanFQZ0K9jb5I4p1uoGty~MBHc6xrJwS3nSXvkl-Zlrhfqtd0PH9gefdZh33tz7aC9N-la9OyUzbd0VVj1gNW3IC9jzg-DKJcvReE2Ph2Kuevk2yDaE65S4Q7lnv6mvw28TuMVHxXo2SGFK~xKx-xjPIupdg__&Key-Pair-Id=K2TK3EG287XSFC)
Communication architecture of Xsens Avior-series module (simplified)
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.
This Section specifies the MTi Synchronous Serial Protocol (MTSSP). The Xsens Avior-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 Xsens Avior-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 Xsens Avior-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 Xsens Avior-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.
For best practices for I2C and SPI communication, please see BASE: Best practices I2C and SPI
.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kemY4dnF2MjRlcWhnLmNsb3VkZnJvbnQubmV0L3VzZXJmaWxlcy8yNzc1NC8zNTEzNS9ja2ZpbmRlci9pbWFnZXMvcXUvaW1hZ2UoNzApLnBuZyIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc2NTgzODY1MH19fV19&Signature=JfXNQKDVAzS~z3jTM0Vfa38kKdNehWF7JfPkbKbmYzKK6uK6jmuKaM3WtPEjEDrK8D6nUZ~RNvTZ-b6rjZdpA7DxHmh41Xbcg1I6n~SFiYKXZdRpoIXMzSBy2Tf8Vi3xUFK9OII9pITY~TJUvEI~wBnFfUR~P3-DgO700V7EHXvcSBH5J0lWO0ZbvGC0WXcRSRMfOOGuvyILlBG7aPRBpROt-8Zte-fj4SMA0sHaEP7cnnsGyNkN2adk2ar4DZDubHQwi2oV9tQGuBtyd6lKhrv~GYGIFrdPvcz2PRfwNRijL4TkM5~c5uEfgMkjNdpfdqSZN4y0voMGcf-2YFF8QA__&Key-Pair-Id=K2TK3EG287XSFC)
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.
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.
|
Opcode |
Name |
Read/Write |
Data format |
Description |
|---|---|---|---|---|
|
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 |
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):
|
|
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).
The Xsens Avior-series module acts as an I2C Slave. The User of the Xsens Avior-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 floating by default, and need to be pulled up (VDDIO) or down (GND) by the user.
|
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 |
1 |
1 |
1 |
|
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#1 |
|
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 |
[1] The Xsens Avior 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 Xsens Avior-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:
.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kemY4dnF2MjRlcWhnLmNsb3VkZnJvbnQubmV0L3VzZXJmaWxlcy8yNzc1NC8zNTEzNS9ja2ZpbmRlci9pbWFnZXMvcXUvaW1hZ2UoNzEpLnBuZyIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc2NTgzODY1MH19fV19&Signature=CvKNShBhF6yk7XEzlUZasNOl9P-B5c17RKjQGyeZf2U4QU5tb1RUUXh-Tv0j8xh-in~O0aVZucW1ElVOd72X7PlfwvSrHsqEDLyNID4wCAD6FRdkggfbeZyy8hRdkxQGcYJpnmDrpW-sMZ8fhHFhLCnxGtbPagZiyKon08eyJSedgo8CHQK46K0vnAhH295XM93arhbXC9n9dImVXg6BvS65lHnoMJ0BKnETHnTChCMF8~bZrHE2Luv0~Mu6MvtiAxM~-X8ECyfExkFV3Z2~l0RxsVCHD-XiHkpLuFuWJ00fn8iqJN~gErVNqalGRoPgXlZi8eDeLjGLTYtndcAPbA__&Key-Pair-Id=K2TK3EG287XSFC)
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.
.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kemY4dnF2MjRlcWhnLmNsb3VkZnJvbnQubmV0L3VzZXJmaWxlcy8yNzc1NC8zNTEzNS9ja2ZpbmRlci9pbWFnZXMvcXUvaW1hZ2UoNzIpLnBuZyIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc2NTgzODY1MH19fV19&Signature=IFjsrr3Eyyz61qilNVVnOJuknJx6hzTQUQwXJLYrd-hyAp-Qi-JORXcNf850zdXwhRgVKKHbJtkswVUMMNCuuOk3FeBxD3hG7lhZHMdlC2QvIp2EKFMEFeggjVAX8TvOlv3DuDoWEju9IB-AX9Cs5qACI7SMJxpJ37zv9qrsfUDWcfVdyb8wxKsfNSyFEA3qywJY6pRBILj4x1VUUA6yhEWp6O8rycYk8dVmG2gIgvC45RHaphzkNpLZyc97Q2SBYXdZSjyK~sythZsryZLY8Ih6JzId3-ypdBzHUfYQc6iScrKuj0GIP6ADSvHYS6jlgicOIq2Kq2Fo1s-sRTvY1g__&Key-Pair-Id=K2TK3EG287XSFC)
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.
.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kemY4dnF2MjRlcWhnLmNsb3VkZnJvbnQubmV0L3VzZXJmaWxlcy8yNzc1NC8zNTEzNS9ja2ZpbmRlci9pbWFnZXMvcXUvaW1hZ2UoNzMpLnBuZyIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc2NTgzODY1MH19fV19&Signature=QTXMVvCSolrCMu1brNW0MGzVBrJ0j6J5wJX-njl0Er7h~sQRzj9pG5as8DVX-QNNEoWR~WHfHMb8Y7PTem4akJH1SiwPTXDXGjs2j095YJIL5JV7tQmBSCw9qYKDTlABJiCp3IQDrV7hnJVbZ3U~sg3Lq4yHzN972oy46qH84vTX0y4v0VidW3DPLNLrMf1XgTYV41-TzBJeu-YIWD8Y7ui6G80NxnH0Amas14mrZ70d0L04~oDpb9W3U9Uzq22k6q4ZhsAIyr4bIrCTkRAL-9eW23VUP0d-lAuGMlVqj~GEszFOKlV0rFef1n6J2gEGNuSi~dTVNrRIQGz4h5AIGw__&Key-Pair-Id=K2TK3EG287XSFC)
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.
The Xsens Avior-series module acts as an SPI Slave. The User of the Xsens Avior-series module is the SPI Master.
SPI Configuration
The Xsens Avior-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.
.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kemY4dnF2MjRlcWhnLmNsb3VkZnJvbnQubmV0L3VzZXJmaWxlcy8yNzc1NC8zNTEzNS9ja2ZpbmRlci9pbWFnZXMvcXUvaW1hZ2UoNzQpLnBuZyIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc2NTgzODY1MH19fV19&Signature=gGfNP5AiuldMOBRsdC98HRJQkmUyON0oBlHbvC-7eTU3tcK8Q-Frwj40HQsaQv9DzFiASImqUlvKtBGw6bhwczWjDw9cUMkVT5mKWvmYfdf2VgZDrrmuknmke0pusciGBCiq9I0OeUOHTFS7diJGt3GPmoK4ztMS1K-S4Z2yoxEMCeY7Mv7TluQvmLyaFiC8XY-0-8vDojdBAb7vhw5bPX7htB5HM~V0ucbqk5VsnkYq3RCAhDZaEz4BnCGGihe8U930kQGb~bUGoeaXROkOTt9zV4-VVGQKxMRODqDFTk9Sm4eGyado-qklD9y0OKM0yH89l4SwFZsqD1buQOzRBQ__&Key-Pair-Id=K2TK3EG287XSFC)
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 |
.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kemY4dnF2MjRlcWhnLmNsb3VkZnJvbnQubmV0L3VzZXJmaWxlcy8yNzc1NC8zNTEzNS9ja2ZpbmRlci9pbWFnZXMvcXUvaW1hZ2UoNzUpLnBuZyIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc2NTgzODY1MH19fV19&Signature=jJ9l8fYcyjXxsfRtPxZw6ql9d38VUOcfBWujIkdA3OJyVmZQWbtCceP8gXey~TQf0fmHgizHjsUWS~BUOoFhQSrAGlQuB5hYOzp8-cajgljXoy25OWDNY8VeVHuKRRdQRLWHNWap8PFq35udaT9iaQu-6xeKfiNjK7CeCF5K8nghe2wloq3d6~KBXn9X2n5huvJCMIYHQlZZaQ~GskJ4To8aPtJTsZfw-I3Z-BbZ5LRSg-f0coMw0rdCvQgQtNZ7uCGkRt53Y6BpuuN9f-jGZy5YHdUf6l8rzVpsdCZji0G5fMYvWHlfl~4-Cf6h-CPxvdwtmaQcUodGBf0DAmLBBg__&Key-Pair-Id=K2TK3EG287XSFC)
SPI timing
The user can configure the Xsens Avior-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 line DE. There is no nRE line available on the Xsens Avior-series. However, as you can see from the image “Behaviour of the nRE and DE lines” below, the user can simply use the DE line also as the nRE line. We intend to raise/lower those two lines at the same time anyway. 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 DE line controls the buffers inside the transceiver.
When the module is transmitting data on its TX pin, it will raise the DE line, else it will pull it low. The figure below depicts the behaviour of the involved signals.
.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kemY4dnF2MjRlcWhnLmNsb3VkZnJvbnQubmV0L3VzZXJmaWxlcy8yNzc1NC8zNTEzNS9ja2ZpbmRlci9pbWFnZXMvcXUvaW1hZ2UoNzYpLnBuZyIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc2NTgzODY1MH19fV19&Signature=mJGQaUiu0futKMX0d4dRTXzabtv8Er9ptDf6VYIo-L4VFrY-M0tFd-w9LbW9KsWQaUM9zIrsAZQaW6RrhGIQJJCvxEKCzRovEcVvq01aR8vTAAQ~jzoTj0J2rKrzItdDFMuVtt2fjDkL8Poj1kulpEK~2PHGdpmxhVzXevoJTKdjEZuSLEtzYNiC2eKe9AVuAIKMMytpcdCQXLgiZpi~hHDPKtpXjms5KDD0KXWXLO5ioZ1V6c96fqh7p2NAtssfI7h-qHmF~lgIe0~J~zNBiD63yJDjcs8uaq1v2i~IYUBkEHHNdVM9P0FS-nD-sF1oNiVd4I1gFMHThPiXx31nDw__&Key-Pair-Id=K2TK3EG287XSFC)
Behaviour of the nRE and DE lines
Note that in this mode the UART of the Xsens Avior-s itself is still operating full duplex.
The user can configure the Xsens Avior-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.
.png?Policy=eyJTdGF0ZW1lbnQiOlt7IlJlc291cmNlIjoiaHR0cHM6Ly9kemY4dnF2MjRlcWhnLmNsb3VkZnJvbnQubmV0L3VzZXJmaWxlcy8yNzc1NC8zNTEzNS9ja2ZpbmRlci9pbWFnZXMvcXUvaW1hZ2UoNzcpLnBuZyIsIkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiQVdTOkVwb2NoVGltZSI6MTc2NTgzODY1MH19fV19&Signature=h-sItYbcepFnSjsMWHRhw2Mh9dsEPyD5TSEPAGvuuZgsys0rrf5w-VhuIYvJq5bSkLfEAK0W8Hli-NOJh8Lej4uSK0Xyq0TqcPDuuUKPQz8fUex9Ex4qwKfCr4ZWTsT05v3gx2tm3YCv9xTbUuvbMNAIFl3ndE5u3Y4OGe88MhyK~Qg3pfgUcgld5KGXBbIk1ZnOI5yZhAfUFJ4oHP6IS4hlxpYpDxsMl~9sPXR6R03rgAqnX4z60qAeRsdyYIz2GHcsSWZOUTumh401svayP2za8dypnyNy9vhUTeGo1y8QNEqtgezDKHMG3Ox9qotDMgFBkZiNjkKVqCs8SXKw9A__&Key-Pair-Id=K2TK3EG287XSFC)
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 not pull up the RTS signal during this transfer.
Only in the following cases the RTS is pulled up:
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.
A Controller Area Network (CAN bus) is a robust standard designed to allow communication between devices in applications without a host computer. The Xsens Avior module provides raw CAN_Rx and CAN_Tx lines which can be combined with a CAN transceiver and termination resistance (if needed). The CAN interface of the Avior series does not have a termination resistor. It can be used in a CAN bus that already incorporates the required termination. If used in a single device connection or when placed at the end of a CAN bus, a 120 Ω termination resistor needs to be added between CAN_H and CAN_L pins. The user can choose between regular CAN 2.0 A/B or CAN-FD, as long as the connected CAN transceiver chip supports this. For more information, refer to the Hardware Integration Manual and MT CAN Protocol Documentation.