MX Foundation 4
|
The following attributes are available for all devices supporting a HDLC interface
The KMXF_HDLC_CLOCK_SOURCE
attribute holds the actual clock source for each RX and TX channels. Usually, the RX channel clock source is external and the TX channel clock source is internal. When the internal loopback is enabled, this attribute becomes read-only. This attribute is not available when KMXF_HDLC_DATA_ENCODING is set to VMXF_HDLC_ENCODING_MANCHESTER_NOCLK.
The supported values are:
Constant | Value |
---|---|
VMXF_HDLC_CLOCK_SOURCE_EXTERNAL | The clock source is external (from the channel point of view, the clock source is an input). (default for RX channel) |
VMXF_HDLC_CLOCK_SOURCE_INTERNAL | The clock source is internal (from the channel point of view, the clock source is an output). (default for TX channel) |
The KMXF_HDLC_INTERNAL_CLOCK_FREQ
attribute holds the internal clock frequency for each RX and TX channels, in Hz. Used by all encodings except VMXF_HDLC_ENCODING_MANCHESTER_NOCLK.
The supported range is:
Module | Range (bps) | Default (bps) | Note |
---|---|---|---|
MXF_MODULE_MULTI_EH | 490 - 4000000 | 1000000 | Frequency = 108 / n with 25 ≤ n ≤ 204080 |
MXF_MODULE_MULTI | 490 - 4000000 | 1000000 | Frequency = 4000000 / n with 1 ≤ n ≤ 16328 |
MXF_MODULE_FLEXSMP | 200 - 4000000 | 1000000 | Frequency = 100000000 / n with 25 ≤ n ≤ 500000 |
The KMXF_HDLC_SPEED
attribute holds the speed for each RX and TX channels, in Bps. Used only with VMXF_HDLC_ENCODING_MANCHESTER_NOCLK encoding.
The supported range is:
Module | Range (bps) | Default (bps) | Note |
---|---|---|---|
MXF_MODULE_MULTI | 490 - 4000000 | 1000000 | Frequency = 4000000 / n with 1 ≤ n ≤ 16328 |
MXF_MODULE_FLEXSMP | 200 - 4000000 | 1000000 | Frequency = 100000000 / n with 25 ≤ n ≤ 500000 |
The KMXF_HDLC_TX_INTERFRAME_TIME_FILL
attribute holds the inter-frame time fill option.
The supported values are:
Constant | Value |
---|---|
VMXF_HDLC_TX_INTERFRAME_TIME_FILL_NONE | No flags will be sent between transmission (idle time). Allows other stations on the bus to transmit. |
VMXF_HDLC_TX_INTERFRAME_TIME_FILL_FLAGS | Flags will be sent between transmission. No other stations on the bus are allowed to transmit. (default) |
KMXF_HDLC_TX_INTERFRAME_TIME_FILL
attribute to VMXF_HDLC_TX_INTERFRAME_TIME_FILL_NONE
. MAXT_ERROR_TRANSMITTER_ENABLED error will be returned when trying to modify some transmission properties even if there is no transmission queued. The transmitter needs to be disabled with VMXF_HDLC_TX_INTERFRAME_TIME_FILL_NONE
(even if it's already set to VMXF_HDLC_TX_INTERFRAME_TIME_FILL_NONE
).
The KMXF_HDLC_DATA_ENCODING
attribute defines the transmission/reception data encoding.
Clock frequency for all encoding except VMXF_HDLC_ENCODING_MANCHESTER_NOCLK is set with KMXF_HDLC_INTERNAL_CLOCK_FREQ. Speed of VMXF_HDLC_ENCODING_MANCHESTER_NOCLK is set with KMXF_HDLC_SPEED.
The supported values are:
Constant | Value |
---|---|
VMXF_HDLC_ENCODING_NRZ | NRZ encoding used (default) |
VMXF_HDLC_ENCODING_NRZI | NRZI (NRZ-S) encoding used |
VMXF_HDLC_ENCODING_FM1 | FM1 encoding used |
VMXF_HDLC_ENCODING_FM0 | FM0 encoding used |
VMXF_HDLC_ENCODING_MANCHESTER | Manchester encoding used |
VMXF_HDLC_ENCODING_MANCHESTER_NOCLK | Manchester no clock encoding used (IPM-MULTI rev B2 and later, FlexMulti 629/1553 with package revision 1.1.16 and later with MXF 4.6.6 and later, FlexMulti 429/664 with package revision 1.1.18 and later with MXF 4.6.6 and later and IO-FLEXSMP module) |
The KMXF_HDLC_FRAME_SIZE_ENABLE
attribute holds the Frame Size word enabled state.
The supported values are:
Constant | Value |
---|---|
VMXF_ENABLE | A Frame Size value will be placed at the end of the frame (last word of the frame if FCS is not enabled, the word before FCS if enabled). The frame size value is 16-bit and it represents the total number of bytes in the frame. The frame must be at least two bytes long if FCS is not enabled or 4 bytes long if FCS is enabled. In transmission, if the message spans over more than one data record, use MXF_HDLC_TX_REC_CTRL_FRAMESIZE_NOT_SEND control bit in data record that must not have the frame size field. |
VMXF_DISABLE | No Frame Size value will be sent. |
The KMXF_HDLC_FCS_TYPE
attribute holds the Frame Check Sequence type.
In transmission, if the message spans over more than one data record, use MXF_HDLC_TX_REC_CTRL_FCS_NOT_SEND control bit in data record that must not have the FCS field.
The supported values are:
Constant | Value |
---|---|
VMXF_HDLC_TX_RX_FCS_NONE | In transmission, no FCS value will be sent. In Reception, no FCS value will be checked. |
VMXF_HDLC_TX_RX_FCS_CCITT (default) | In transmission, FCS value using CRC-16-CCITT will be sent at the location of the last word of the frame. In Reception, FCS value (last word of the frame) using CRC-16-CCITT will be checked and MXF_HDLC_RX_REC_CTRL_FCS_ERROR bit set in MXF_HDLC_DATAREC.control field if does not match. This FCS is also known as CRC-CCITT, CRC-16/X-25, CRC-16/IBM-SDLC or CRC-16/ISO-HDLC. |
VMXF_HDLC_TX_RX_FCS_16 | In transmission, FCS value using CRC-16-IBM will be sent at the location of the last word of the frame. In Reception, FCS value (last word of the frame) using CRC-16-IBM will be checked and MXF_HDLC_RX_REC_CTRL_FCS_ERROR bit set in MXF_HDLC_DATAREC.control field if does not match. This FCS is also known as CRC-16 or CRC-16/USB. |
Parameters | Value |
---|---|
Polynomial | 0x1021 (x16 + x12 + x5 + 1) |
Initial value | 0xffff |
Output XOR | 0xffff |
Input | reflected |
Output | reflected |
Parameters | Value |
---|---|
Polynomial | 0x8005 (x16 + x15 + x2 + 1) |
Initial value | 0xffff |
Output XOR | 0xffff |
Input | reflected |
Output | reflected |
The KMXF_HDLC_TX_RX_TEST_LB
attribute holds the TX-to-RX loopback state for the receiver channel. When the loopback mode is enabled, the received data comes from the corresponding internal transmitter instead of the default configuration where the received data come from the RX line circuit. This feature is intended for a demo application or for testing purposes. When enabled, the module's first RX channel receives data transmitted on the first TX channel; the second RX channel receives data from the second TX channel, and so on. When internal loopback is enabled, the KMXF_HDLC_CLOCK_SOURCE attribute becomes read-only.
The supported values are:
Constant | Value |
---|---|
VMXF_ENABLE | Enable loopback |
VMXF_DISABLE | Disable loopback (default) |
The KMXF_HDLC_EDGE_DETECTION
attribute defines the edge selection for the channel.
This attribute is not available when KMXF_HDLC_DATA_ENCODING is set to VMXF_HDLC_ENCODING_MANCHESTER_NOCLK.
The supported values are:
Constant | Value |
---|---|
VMXF_HDLC_EDGE_DETECTION_FALLING | Falling edge (default Rx) |
VMXF_HDLC_EDGE_DETECTION_RISING | Rising edge (default Tx) |
The KMXF_HDLC_ELECTRICAL_INTERFACE
attribute defines the electrical interface for the Tx channel.
The supported values are:
Constant | Value |
---|---|
VMXF_HDLC_ELECTRICAL_INTERFACE_RS422 | RS-422 |
VMXF_HDLC_ELECTRICAL_INTERFACE_RS485 | RS-485 (default) |
The KMXF_HDLC_TERMINATION
attribute holds the actual channel termination resistor state.
Only supported on MXF_MODULE_FLEXSMP.
Constant | Value |
---|---|
VMXF_HDLC_TERMINATION_NONE | No termination resistor (default) |
VMXF_HDLC_TERMINATION_120OHM | 120 ohm termination resistor enabled |
The KMXF_HDLC_ELECTRICAL_SELECTION
attribute holds the actual channel electrical selection. When the electrical selection is set to default, all electrical attributes below are set to a default value and are read only. To modify any of these attributes, set the KMXF_HDLC_ELECTRICAL_SELECTION
attribute to VMXF_HDLC_TX_SLEW_RATE_SELECT_CUSTOM.
Not supported on MXF_MODULE_FLEXSMP.
Electrical attributes:
The supported values are:
Constant | Value |
---|---|
VMXF_HDLC_ELECTRICAL_SELECT_DEFAULT | Select default electrical parameters (default) |
VMXF_HDLC_ELECTRICAL_SELECT_CUSTOM | Select custom electrical parameters |
The KMXF_HDLC_RX_DIFF_VOLTAGE_THRESHOLD
attribute defines the RX differential voltage threshold. This is a floating point attribute. To modify this attribute value, the KMXF_HDLC_ELECTRICAL_SELECTION attribute must be set to VMXF_HDLC_ELECTRICAL_SELECT_CUSTOM
.
Not supported on MXF_MODULE_FLEXSMP.
The supported range is:
Constant | Value (Volt) |
---|---|
Minimum | 0.0 |
Maximum | 25.0 |
Resolution: ≈0.05 volt Default value: 0.21.
The KMXF_HDLC_TX_SLEW_RATE_SELECTION
attribute defines the TX slew rate selection. MX Foundation automatically calculates the default slew rate based on the channel speed, high and low differential voltage and voltage offset value. When the default option (VMXF_HDLC_TX_SLEW_RATE_SELECT_DEFAULT
) is selected, the KMXF_HDLC_TX_SLEW_RATE attribute will be read only. Otherwise, the custom option (VMXF_HDLC_TX_SLEW_RATE_SELECT_CUSTOM
) allows specifying the slew rate using the KMXF_HDLC_TX_SLEW_RATE
attribute.
Not supported on MXF_MODULE_FLEXSMP.
The supported values are:
Constant | Value |
---|---|
VMXF_HDLC_TX_SLEW_RATE_SELECT_DEFAULT | Select default slew rate parameters (default) |
VMXF_HDLC_TX_SLEW_RATE_SELECT_CUSTOM | Select custom slew rate parameters |
The KMXF_HDLC_TX_SLEW_RATE
attribute defines the TX slew rate value. The KMXF_HDLC_ELECTRICAL_SELECTION attribute must be set to VMXF_HDLC_TX_SLEW_RATE_SELECT_CUSTOM
in order to specify the slew rate using this attribute. This is a floating point attribute. Value will be rounded to closest supported step.
The supported range is:
Module | Range (nsec/volt) | Default (nsec/volt) | Formula |
---|---|---|---|
MXF_MODULE_MULTI_EH | 2.0 - 13429.5 | 2.0 | (204800/1.22) / (n*3.125) with 4 ≤ n ≤ 26856 |
MXF_MODULE_MULTI | 25.0 - 25600.0 | 25.0 | 102400/n with 4096 ≤ n ≤ 51200 |
The KMXF_HDLC_TX_DIFF_VOLTAGE_HIGH
attribute defines the high TX differential voltage value. To modify this attribute value, the KMXF_HDLC_ELECTRICAL_SELECTION attribute must be set to VMXF_HDLC_TX_SLEW_RATE_SELECT_CUSTOM
. This is a floating point attribute.
The supported range is:
Module | Range (Volt) | Default (Volt) |
---|---|---|
MXF_MODULE_MULTI_EH | see table below | 2.5 |
MXF_MODULE_MULTI | -9.16 – +9.16 | 1.9 |
MXF_MODULE_MULTI_EH
Device Type | Revision | MXF Version | Range (Volt) |
---|---|---|---|
FlexMulti 629 | Up to 2.4 | Up to 4.2.5 | -5.0 – +5.0 |
4.3.0 to 4.4.1 | -6.0 – +6.0 | ||
4.4.2 and later | -6.1 – +6.1 | ||
2.5 and later | Up to 4.2.5 | -5.0 – +5.0 | |
4.3.0 to 4.4.1 | -6.0 – +6.0 | ||
4.4.2 and later | -6.5 – +6.5 | ||
FlexMulti 1553 | Up to 3.2 | Up to 4.2.5 | -5.0 – +5.0 |
4.3.0 to 4.4.1 | -6.0 – +6.0 | ||
4.4.2 and later | -6.1 – +6.1 | ||
3.3 and later | Up to 4.2.5 | -5.0 – +5.0 | |
4.3.0 to 4.4.1 | -6.0 – +6.0 | ||
4.4.2 and later | -6.5 – +6.5 | ||
FlexMulti 429 FlexMulti 664 FlexMulti | Up to 3.0 | Up to 4.2.5 | -5.0 – +5.0 |
4.3.0 to 4.4.1 | -6.0 – +6.0 | ||
4.4.2 and later | -6.1 – +6.1 | ||
3.1 and later | Up to 4.2.5 | -5.0 – +5.0 | |
4.3.0 to 4.4.1 | -6.0 – +6.0 | ||
4.4.2 and later | -6.5 – +6.5 |
The KMXF_HDLC_TX_DIFF_VOLTAGE_LOW
attribute defines the low TX differential voltage value. To modify this attribute value, the KMXF_HDLC_ELECTRICAL_SELECTION attribute must be set to VMXF_HDLC_TX_SLEW_RATE_SELECT_CUSTOM
. This is a floating point attribute.
The supported range is:
Module | Range (Volt) | Default (Volt) |
---|---|---|
MXF_MODULE_MULTI_EH | see table below | -2.5 |
MXF_MODULE_MULTI | -9.16 – +9.16 | -1.9 |
MXF_MODULE_MULTI_EH
Device Type | Revision | MXF Version | Range (Volt) |
---|---|---|---|
FlexMulti 629 | Up to 2.4 | Up to 4.2.5 | -5.0 – +5.0 |
4.3.0 to 4.4.1 | -6.0 – +6.0 | ||
4.4.2 and later | -6.1 – +6.1 | ||
2.5 and later | Up to 4.2.5 | -5.0 – +5.0 | |
4.3.0 to 4.4.1 | -6.0 – +6.0 | ||
4.4.2 and later | -6.5 – +6.5 | ||
FlexMulti 1553 | Up to 3.2 | Up to 4.2.5 | -5.0 – +5.0 |
4.3.0 to 4.4.1 | -6.0 – +6.0 | ||
4.4.2 and later | -6.1 – +6.1 | ||
3.3 and later | Up to 4.2.5 | -5.0 – +5.0 | |
4.3.0 to 4.4.1 | -6.0 – +6.0 | ||
4.4.2 and later | -6.5 – +6.5 | ||
FlexMulti 429 FlexMulti 664 FlexMulti | Up to 3.0 | Up to 4.2.5 | -5.0 – +5.0 |
4.3.0 to 4.4.1 | -6.0 – +6.0 | ||
4.4.2 and later | -6.1 – +6.1 | ||
3.1 and later | Up to 4.2.5 | -5.0 – +5.0 | |
4.3.0 to 4.4.1 | -6.0 – +6.0 | ||
4.4.2 and later | -6.5 – +6.5 |
The KMXF_HDLC_TX_VOLTAGE_OFFSET
attribute defines the TX voltage offset. To modify this attribute value, the KMXF_HDLC_ELECTRICAL_SELECTION attribute must be set to VMXF_HDLC_TX_SLEW_RATE_SELECT_CUSTOM
. This is a floating point attribute.
Not supported on MXF_MODULE_FLEXSMP.
The supported range is:
Module | Range (Volt) | Default (Volt) |
---|---|---|
MXF_MODULE_MULTI_EH | see table below | 2.5 |
MXF_MODULE_MULTI | -10.0 – +10.0 | 1.9 |
MXF_MODULE_MULTI_EH
Device Type | Revision | MXF Version | Range (Volt) |
---|---|---|---|
FlexMulti 629 | Up to 2.4 | Up to 4.2.5 | -5.0 – +5.0 |
4.3.0 to 4.4.1 | -6.0 – +6.0 | ||
4.4.2 and later | -6.1 – +6.1 | ||
2.5 and later | Up to 4.2.5 | -5.0 – +5.0 | |
4.3.0 to 4.4.1 | -6.0 – +6.0 | ||
4.4.2 and later | -6.5 – +6.5 | ||
FlexMulti 1553 | Up to 3.2 | Up to 4.2.5 | -5.0 – +5.0 |
4.3.0 to 4.4.1 | -6.0 – +6.0 | ||
4.4.2 and later | -6.1 – +6.1 | ||
3.3 and later | Up to 4.2.5 | -5.0 – +5.0 | |
4.3.0 to 4.4.1 | -6.0 – +6.0 | ||
4.4.2 and later | -6.5 – +6.5 | ||
FlexMulti 429 FlexMulti 664 FlexMulti | Up to 3.0 | Up to 4.2.5 | -5.0 – +5.0 |
4.3.0 to 4.4.1 | -6.0 – +6.0 | ||
4.4.2 and later | -6.1 – +6.1 | ||
3.1 and later | Up to 4.2.5 | -5.0 – +5.0 | |
4.3.0 to 4.4.1 | -6.0 – +6.0 | ||
4.4.2 and later | -6.5 – +6.5 |
The KMXF_HDLC_MODULE_RX_FIFO_AGING
attribute defines the FIFO aging timeout value for a receiver channel. It defines the longest delay that a received word can wait in the hardware FIFO before a receive interrupt is generated. The attribute value resolution is based on the timebase resolution. A RX FIFO Aging Timeout value of 0 disables the aging timeout. The attribute value is rounded down to step of 128 microseconds.
The supported range is:
Module | Range (microsecond) | Default (microsecond) | Note |
---|---|---|---|
MXF_MODULE_MULTI_EH | 0 - 32640 | 8192 | Value is rounded down to step of 128 microseconds |
MXF_MODULE_MULTI | 0 - 32640 | 8192 | Value is rounded down to step of 128 microseconds |
MXF_MODULE_FLEXSMP | 0 - 25000 | 8000 | Value is rounded down to step of 100 microseconds |
The KMXF_HDLC_MODULE_RX_FIFO_AF
attribute holds the almost full threshold for a receiver channel. This attribute value determines the number of received words that must be accumulated in the receive hardware FIFO before an interrupt is generated.
The supported range is:
Module | Range | Default |
---|---|---|
MXF_MODULE_MULTI_EH | 1 - 255 (16-bit word) | 32 |
MXF_MODULE_MULTI | 1 - 255 (16-bit word) | 16 |
MXF_MODULE_FLEXSMP | 1 - 511 (64-bit word) | 128 |
The KMXF_HDLC_MODULE_TX_FIFO_AF
attribute holds the almost full threshold for a transmitter channel. The attribute value determines the maximum number of transmit words that are queued in the transmit hardware FIFO. The transmit interrupt will be cleared automatically once this threshold is reached.
The supported range is:
Module | Range | Default |
---|---|---|
MXF_MODULE_MULTI_EH | 2 - 255 (16-bit word) | 128 |
MXF_MODULE_MULTI | 2 - 255 (16-bit word) | 128 |
MXF_MODULE_FLEXSMP | 2 - 256 (64-bit word) | 256 |
The KMXF_HDLC_MODULE_TX_FIFO_AE
attribute holds the almost empty threshold for a transmitter channel. The attribute value determines when the transmit interrupt will be generated. The transmit interrupt will be generated whenever the number of word remaining in the transmit hardware FIFO is less than or equal to the value specified through this attribute. The software embedded process, will then be able to react and fill in the transmit FIFO.
The supported range is:
Module | Range | Default |
---|---|---|
MXF_MODULE_MULTI_EH | 1 - 254 (16-bit word) | 64 |
MXF_MODULE_MULTI | 1 - 254 (16-bit word) | 64 |
MXF_MODULE_FLEXSMP | 1 - 255 (64-bit word) | 64 |
The KMXF_HDLC_MODULE_RX_TIMETAG_ENABLE
attribute defines the RX time tag enable state. When the time tag reception is disabled, the timeTag field of MXF_HDLC_DATAREC will always be 0. Disabling the time tag can result in a small gain in performance, because less data are transferred between the module and the reception buffer.
Not supported on MXF_MODULE_FLEXSMP.
The supported values are:
Constant | Value |
---|---|
VMXF_ENABLE | Enable time tag reception (default) |
VMXF_DISABLE | Disable time tag reception |