Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Refactored Documentation
Table of Contents
minLevel1
maxLevel2
outlinefalse
stylenonedefault
typelist
printabletrue

Cyclic Data Exchange

...

  • Transfer length:

    • Cyclic only: 73 Bytes

    • Cyclic + RPC data: 128 Bytes

  • Baudrate:

    • at SPI: max. 10 MHz, usually 2 MHz.

  • Delay between cyclic transfer:

    • SPI: 0.5 ms... Heartbeat Timeout (1 second)

  • Minimal round-trip time: 4 ... 6 ms (depending on the used protocol and setup)

...

Serial Peripheral Interface Timing and Settings


Following simplified diagram shows basic SPI timing which must be considered by the application controller.


Figure 3 Basic SPI timing

SPI Speed

The CC supports SPI speed in the range of 29.3 kHz to 10 theretically 20 MHz. Default SPI speed for most of the platforms is 2 MHz.

SPI Setup Time

In Figure 3 Basic SPI timing, the communication scheme between AC and CC is shown. Following time needs to be considered by the Application Controller during communication: the SPI Setup Time - the time between activation of the module using the Slave Select signal and first data - must be at least be 2-3 us, before the module accepts data over SPI.

...

This time is the distance between two consecutive SPI transfers. Between two transfers a minimum time of 250 us must be kept to secure proper processing in the module.

SPI Settings

The module provides a management inferface, where initial configuration can be done. These properties can be stored permanently within the device. Following properties are provided to configure the SPI interface:

Variable

Description

Default value

SPI_TYPE

SPI master/slave configuration

1 = SLAVE

SPI_MODE

SPI timing mode

0 = MODE0*

SPI_UNITWIDTH

SPI single transfer size

0 = 8 BIT

SPI_BITORDER

SPI bit transfer direction

0 = MSB*

SPI_TRANSFERSIZE

SPI packet transfer size

128

* These Values can be modified

Cyclic Frame Structure

The cyclic frame must contain the structure from following table to get accepted by the iRJ45 module/ SoM.

...

Byte 0..1

Byte 2..5

Byte 6 .. x

Byte x+1 .. x+4

Byte x+5..x+8

Byte x+9

Byte x+10

Byte (x+11) .. (x+14)

Static Identifier
0xaa, 0xee

Data Length
fromByte 6 to Flags (included)

Data

Function Id
(little endian)

RPC Id(little endian)

CTC Id

Flags

Fletcher-16
Checksum with
Offset 0x0007
(little endian)

Table 22 RPC Request Structure

Byte 0..1

Byte 2..5

Byte 6 .. x

Byte x+1

Byte x+2

Byte (x+3)..(x+4)

Static Identifier
0xaa, 0xee

Data Length
fromByte 6 to Flags (included)

Response Data

CTC Id

Flags

Fletcher-16
Checksum with
Offset 0x0007
(little endian)

Table 23 RPC Response Structure

Static Identifier

The 2 byte static identifier is used on the iRJ45 module to detect the start of a new RPC request or response. If the identifier is also contained in the data bytes the Fletcher-16 checksum will make sure that it don't gets threaded like an RPC request/response.

...