Engee documentation

BA-IS-XX SPI

SPI operation with usage of the RITMeX BA-IS-XX I/O module.

blockType: CFunction

Path in the library:

/RITM/RITMeX BA-IS-XX/BA-IS-XX SPI/BA-IS-XX SPI

Description

The block BA-IS-XX SPI is used for SPI operation with usage of the RITMeX BA-IS-XX I/O module.

The diagram below shows the SPI operation modes with different phases.

Ports

Input

# TX — data to be sent via SPI
vector

Details

Can be an array depending on the value of the Number of words parameter.

Data types

UInt8.

Complex numbers support

No

Output

# RX — data received via SPI
vector

Details

Can be an array depending on the value of the Number of words parameter.

Data types

UInt8.

Complex numbers support

No

Parameters

Параметры

# Номер модуля: — unique module identification
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8

Details

Used to uniquely identify a module when more than one I/O module of the same type is installed in the real-time machine.

Module numbers are signed on the RITM housing.

Values

1 | 2 | 3 | 4 | 5 | 6 | 7 | 8

Default value

1

Program usage name

m_module_idx

Tunable

No

Evaluatable

Yes

# Номер канала: — SPI channel number
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8

Details
Values

1 | 2 | 3 | 4 | 5 | 6 | 7 | 8

Default value

1

Program usage name

m_channel

Tunable

No

Evaluatable

Yes

# Режим: — SPI operating mode
Master | Slave

Details
Values

Master | Slave

Default value

Master

Program usage name

m_work_mode

Tunable

No

Evaluatable

Yes

# Полярность: — SCK line polarity
Active-High | Active-Low

Details
Values

Active-High | Active-Low

Default value

Active-High

Program usage name

m_polarity

Tunable

No

Evaluatable

Yes

# Фаза: — phase value for data transmission
Фаза 1 | Фаза 2

Details
Values

Фаза 1 | Фаза 2

Default value

Фаза 1

Program usage name

m_phase

Tunable

No

Evaluatable

Yes

# Количество слов: — number of words to send and receive via SPI
1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32

Details
Values

1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32

Default value

1

Program usage name

m_num_words

Tunable

No

Evaluatable

Yes

# Делитель частоты SPI: — frequency value of SCK signal in Master mode (from 100 kHz to `5 MHz)
`1
| 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50

Details
Values

1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50

Default value

2

Program usage name

m_divider

Tunable

No

Evaluatable

Yes

# Частота SPI, МГц: — SPI frequency value in MHz

Details
Default value

5.0

Program usage name

prt_spi_freq

Tunable

No

Evaluatable

Yes

# Шаг расчёта, с: — calculation step in seconds with which SPI data is exchanged

Details
Default value

-1

Program usage name

m_sample_time

Tunable

No

Evaluatable

Yes