MX Foundation 4
Flow control

MX Foundation provides two flow control modes for ASYNC transmission


Hardware flow control (RTS/CTS)

The “hardware Flow control” attribute KMXF_ASYNCEH_HANDSHAKE_MODE is available on the ASYNC transmitter and receiver channels. Each transmitter set to the ASYNC channel class may use an associated RX (input) handshake channel. Each receiver set to the ASYNC channel class may use an associated TX (output) handshake channel. The RX/TX channels of a ASYNC module may be set to the HANDSHAKE channel class.

When transmitting with hardware handshake enabled, it is not recommended to transmit using time tags. Since the receiver can halt the transmission, when the transmission is resumed by the receiver, the time tags can be late and in this case, an error condition is set.

Refer to the hardware attributes list for details on how to set the channels with the mxfAttributeUint64Set() function.

Examples

async_flow_control_hw.c

Software flow control (XON-XOFF)

The “XON/XOFF flow control” is available on the ASYNC transmitter and receiver channels. Many attributes are provided to control the XON/XOFF behavior. These attributes program the registers and all the flow control mechanism that will be done by the module. Another layer of flow control has been added to the firmware of MX Foundation. In that layer, if the acquisition buffer count reaches 75% of its maximum queue size, the firmware will force the module to transmit an XOFF character. When the acquisition buffer count will go below 25% of its queue size (by reading the data with the mxfASYNCEHRxAcqRead() functions or by calling the mxfRxAcqClear() function) or when the acquisition process is stopped (with the mxfRxAcqStop() function), the firmware will tell the module to transmit an XON character. Note that mxfRxAcqStart() never sends an XON character, so restarting a running acquisition process with mxfRxAcqStart() without stopping it first with mxfRxAcqStop() will not send an XON character. This two stage flow control mechanism (firmware and module) will ensure the good operation of the transfer in the case where the host application does not read fast enough the acquisition queue (firmware flow control) or if the firmware does not read the data from the module fast enough (module flow control).

When transmitting with XON/XOFF flow control enabled, it is not recommended to transmit using time tags. Since the receiver can halt the transmission, when the transmission is resumed by the receiver, the time tags can be late and in this case, an error condition is set.

Refer to the xon-xoff attributes list for details on how to set the channels with the mxfAttributeUint64Set() function.

Examples

async_flow_control_sw.c

Updated 10/23/2023