MX Foundation 4
Attributes Reference

The following attributes are available for the devices supporting dedicated discrete interface.

Number of Ports

The KMXF_FLEXDIO_NUMPORT read only attribute specify the number of digital I/O ports supported by a channel.


Sampling Period

The KMXF_FLEXDIO_RX_SAMP_PERIOD attribute defines the RX FIFO sampling period value, expressed in the active time base resolution (the effective precision is 10 ns).

The sampling period starts at the next microsecond boundary following the write to this attribute.
When KMXF_FLEXDIO_RX_FIFO_MODE is set to VMXF_FLEXDIO_RX_FIFO_MODE_EDGE or VMXF_FLEXDIO_RX_FIFO_MODE_EDGE_INTER, this attribute is useful to limit the number of transitions written in the RX FIFO. The edge detection is performed at 100 MHz but the module accumulates all transitions and writes maximum one at each sampling period. The precision of the time tag is equal to the sampling period value.

When KMXF_FLEXDIO_RX_FIFO_MODE is set to VMXF_FLEXDIO_RX_FIFO_MODE_SAMPLING, one record will be written in the RX FIFO at each sampling period. The precision of the time tag is equal to the sampling period value. If multiple channels need to be synchronized, mxfFlexDIORxSamplingSync() function can be used.

The supported range is:

Mode Range (ns)
VMXF_FLEXDIO_RX_FIFO_MODE_EDGE 10 - 1000000000
VMXF_FLEXDIO_RX_FIFO_MODE_EDGE_INTER 10 - 1000000000
VMXF_FLEXDIO_RX_FIFO_MODE_SAMPLING 1000000 - 1000000000

Default value: 10000000 ns

RX FIFO Mode

The KMXF_FLEXDIO_RX_FIFO_MODE attribute defines the RX FIFO mode value.

When KMXF_FLEXDIO_RX_FIFO_MODE is set to VMXF_FLEXDIO_RX_FIFO_MODE_EDGE or VMXF_FLEXDIO_RX_FIFO_MODE_EDGE_INTER, the records are generated according to specified discrete input transitions.

When KMXF_FLEXDIO_RX_FIFO_MODE is set to VMXF_FLEXDIO_RX_FIFO_MODE_SAMPLING, one record will be written in the RX FIFO at each sampling period.

The supported modes are:

Mode Description
VMXF_FLEXDIO_RX_FIFO_MODE_EDGE Write one record in the RX FIFO if the value of at least one pin changed between this sampling point and the previous.
The sampling period is defined with KMXF_FLEXDIO_RX_SAMP_PERIOD. The edge detection can be set on falling edge, rising edge or both with KMXF_FLEXDIO_RX_EDGE_FALLING and KMXF_FLEXDIO_RX_EDGE_RISING.
VMXF_FLEXDIO_RX_FIFO_MODE_EDGE_INTER Like VMXF_FLEXDIO_RX_FIFO_MODE_EDGE except that edges are also detected between sampling points. The edge detection is performed at 100 MHz but the module accumulates all transitions and writes maximum one record at each sampling period. The precision of the time tag is equal to the sampling period value.
VMXF_FLEXDIO_RX_FIFO_MODE_SAMPLING Write one record in the RX FIFO at each sampling period with the current pin state. No edge detection is performed.

Default value: VMXF_FLEXDIO_RX_FIFO_MODE_EDGE

Falling Edge

The KMXF_FLEXDIO_RX_EDGE_FALLING attribute holds the edge falling attribute.

This attribute holds the falling edge capture bit mask. Each bit allows capturing the discrete input port value when a falling edge is detected on the bits set to “1” in this attribute mask.

Only used when KMXF_FLEXDIO_RX_FIFO_MODE is set to VMXF_FLEXDIO_RX_FIFO_MODE_EDGE or VMXF_FLEXDIO_RX_FIFO_MODE_EDGE_INTER.

Default value: Falling edge capture enabled for each port.

Rising Edge

The KMXF_FLEXDIO_RX_EDGE_RISING attribute holds the edge rising attribute.

This attribute holds the rising edge capture bit mask. Each bit allows capturing the discrete input value when a rising edge is detected on the bits set to “1” in this attribute mask.

Only used when KMXF_FLEXDIO_RX_FIFO_MODE is set to VMXF_FLEXDIO_RX_FIFO_MODE_EDGE or VMXF_FLEXDIO_RX_FIFO_MODE_EDGE_INTER.

Default value: Rising edge capture enabled for each port.

Pulse Width Filter

The KMXF_FLEXDIO_RX_EDGE_PULSE_WIDTH_FILTER attribute defines the minimum pulse width value needed for the transition to be valid (the effective precision is 10 ns, the value is truncated to multiple of 10 ns). It is useful to filter transitions that are caused by line bouncing or glitch.

The time at which the data is written in the RX FIFO is delayed by this value. It is recommended to wait this delay after having changed the attribute before enabling the RX FIFO (when an acquisition is started).
Only used when KMXF_FLEXDIO_RX_FIFO_MODE is set to VMXF_FLEXDIO_RX_FIFO_MODE_EDGE or VMXF_FLEXDIO_RX_FIFO_MODE_EDGE_INTER.

The supported range is:

Range Value
(ns)
Minimum 0
Maximum 1000000000
Note
Hardware line sampling is 100 MHz (10 ns). If the line transition is faster than this value, the transition will not be detected.

Default value: 0 ns


RX Timetag Enable

The KMXF_FLEXDIO_MODULE_RX_TIMETAG_ENABLE attribute defines the RX time tag enable state.

The supported values are:

Constant Value
VMXF_ENABLE The reception time tag is returned in the records based on the active timebase. (default)
VMXF_DISABLE No time tag is returned (value zero is returned)



RX FIFO Aging Timeout

The KMXF_FLEXDIO_MODULE_RX_FIFO_AGING attribute defines the FIFO aging time-out value.

It defines the longest delay that a received word can wait in the hardware FIFO before a receive interrupt is generated to the firmware. The attribute value resolution is based on the timebase resolution. A RX FIFO Aging Timeout value of 0 disables the aging timeout.

The supported range is:

Range (microsecond) Default (microsecond) Note
0 - 25500 8000 Value is rounded down to step of 100 nanoseconds
Note
MX Foundation takes care of initializing this attribute using the optimal value. It is not recommended to change to this attribute unless told to do so by a MAX Technologies support engineer.

RX FIFO Almost Full Treshold

The KMXF_FLEXDIO_MODULE_RX_FIFO_AF attribute holds the almost full threshold for a receiver channel. This attribute value determines the number of received records that must be accumulated in the receive hardware FIFO before an interrupt is generated.

The supported range is:

Range Default
1 - 1023 10
Note
MX Foundation takes care of initializing this attribute using the optimal value. It is not recommended to change to this attribute unless told to do so by a MAX Technologies support engineer.

TX FIFO Almost Full Threshold

The KMXF_FLEXDIO_MODULE_TX_FIFO_AF attribute holds the almost full threshold for a transmitter channel. This attribute value determines the number of transmit quad-words that are to be queued in the transmit hardware FIFO. The transmit interrupt will be cleared automatically once this threshold is reached.

The supported range is:

Range Default
2 - 511 100
Note
MX Foundation takes care of initializing this attribute using the optimal value. It is not recommended to change to this attribute unless told to do so by a MAX Technologies support engineer.

TX FIFO Almost Empty Threshold

The KMXF_FLEXDIO_MODULE_TX_FIFO_AE attribute holds the almost empty threshold for a transmitter channel. The transmit interrupt is generated whenever the number of quad-words remaining in the transmit hardware FIFO is less or equal to the value specified by this attribute. The software embedded process will then be able to react and fill in the transmit FIFO.

The supported range is:

Range Default
1 - 510 50
Note
MX Foundation takes care of initializing this attribute using the optimal value. It is not recommended to change to this attribute unless told to do so by a MAX Technologies support engineer.

RX Single Ended Threshold

The KMXF_FLEXDIO_MODULE_RX_THRESHOLD attribute holds the Rx threshold value for input signals. This is a floating point attribute. The hysteresis is around 1.6V.
The supported range is:

Range (volt) Default (volt)
1.0 - 28.0 8.5
Updated 10/23/2023