Main Content

configureADCThresholdSettings

Configure threshold settings for ADCs in real time

Since R2022b

Description

configureADCThresholdSettings(rfDataConverter,tileId,channelId,threshold1Mode,threshold2Mode,threshold1,threshold2) configures the threshold modes and values for analog-to-digital converters (ADCs) while the design is running on the SoC device. Use this function to enable the threshold monitoring circuit, which compares the ADC sampled data with the specified threshold values.

configureADCThresholdSettings(rfDataConverter,tileId,channelId,threshold1Mode,threshold2Mode,threshold1,threshold2,numSamplesBelowThreshold1,numSamplesBelowThreshold2) configures the threshold settings for ADCs with arguments that specify the number of samples below the threshold value.

Input Arguments

collapse all

RF data converter, specified as an soc.RFDataConverter object. Via Ethernet, this object connects the host computer to the RF data converter on the connected SoC device. Use the object functions and properties of this object to configure the RF data converter.

Identifier of the RF-ADC tile connected to the programmable logic, specified as 0, 1, 2, or 3. Available options for the RF-ADC tile ID vary according to the specified RFSoC device. A tile contains several ADCs, accessible as channels, and several shared timing units, including a clock and PLL.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Channel identifier for the selected ADC tile, specified as 0, 1, 2, or 3. Available options for the channel ID vary according to the specified RFSoC device.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Threshold mode for the first threshold, specified as one of these values:

  • 'Sticky over' — Set the threshold status signal to High when the ADC sampled data exceeds the threshold value that you specify in the threshold1 argument.

  • 'Sticky under' — Set the threshold status signal to High when the ADC sampled data remains below the threshold value, which you specify in the threshold1 argument, for the number of samples that you specify in the numSamplesBelowThreshold1 argument.

  • 'Hysteresis' — Set the threshold status signal to High when the ADC sampled data exceeds the upper threshold value. Set the threshold status signal to Low when the ADC sampled data remains below the lower threshold value for the number of samples that you specify in the numSamplesBelowThreshold1 argument.

Data Types: char | string

Threshold mode for the second threshold, specified as one of these values:

  • 'Sticky over' — Set the threshold status signal to High when the ADC sampled data exceeds the threshold value that you specify in the threshold2 argument.

  • 'Sticky under' — Set the threshold status signal to High when the ADC sampled data remains below the threshold value, which you specify in the threshold2 argument, for the number of samples that you specify in the numSamplesBelowThreshold2 argument.

  • 'Hysteresis' — Set the threshold status signal to High when the ADC sampled data exceeds the upper threshold value. Set the threshold status signal to Low when the ADC sampled data remains below the lower threshold value for the number of samples that you specify in the numSamplesBelowThreshold2 argument.

Data Types: char | string

First threshold value, specified as one of these values:

  • An integer in the range [0, 16383] for the sticky over or sticky under threshold mode. For the sticky over threshold mode, this value is the upper threshold value. For the sticky under threshold mode, this value is the lower threshold value.

  • A row vector of integers in the range [0, 16383] in the format [Tlower Tupper] for the hysteresis threshold mode. Tlower is the lower threshold value and Tupper is the upper threshold value.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Second threshold value, specified as one of these values:

  • An integer in the range [0, 16383] for the sticky over or sticky under threshold mode. For the sticky over threshold mode, this value is the upper threshold value. For the sticky under threshold mode, this value is the lower threshold value.

  • A row vector of integers in the range [0, 16383] in the format [Tlower Tupper] for the hysteresis threshold mode. Tlower is the lower threshold value and Tupper is the upper threshold value.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Number of samples below the first threshold value, specified as a positive integer. The configureADCThresholdSettings function ignores this value when you specify the threshold1Mode argument as 'Sticky over'.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Number of samples below the second threshold value, specified as a positive integer. The configureADCThresholdSettings function ignores this value when you specify the threshold2Mode argument as 'Sticky over'.

Data Types: single | double | int8 | int16 | int32 | int64 | uint8 | uint16 | uint32 | uint64

Version History

Introduced in R2022b