Main Content

EVADC

Measure voltage of an analog input pin

Since R2024a

  • EVADC block

Libraries:
Embedded Coder Support Package for Infineon AURIX TC3x Microcontrollers / AURIX TC3x

Description

Measure the voltage of an analog input pin.

The Enhanced Versatile Analog to Digital Converter (EVADC) block outputs the voltage of the input signal as a 12-bit value in an N-by-1 array, where N is defined based on the number of channels selected.

Note

If you add the same pin in multiple channels of single EVADC block, then some channels fail to capture the converted result in external mode and Synopsys Virtualizer Studio.

Ports

Input

expand all

Triggers the EVADC input pin for conversion via software trigger.

Dependencies

To enable this port, set the Mode parameter to ADC trigger.

Data Types: double | int8 | int16 | int32 | uint8 | uint16 | uint32 | Boolean

The simulation-only Simulink® signal input port acts as a pass-through for the output of the EVADC block during simulation.

Dependencies

To enable this port, select the Enable simulation port parameter.

Output

expand all

The block outputs the input voltage as a 12-bit value in an N-by-1 array, where N is defined based on the number of channels specified in the Number of channels parameter.

Data Types: uint16

The block outputs the status of read operation at this port as one of these values:

  • 0 — Conversion result is not available

  • 1 — Conversion result is available

Dependencies

To enable this port, set the Mode parameter to Read results only and select the Enable status port parameter.

Data Types: double

Parameters

expand all

Select one of these operation modes:

  • ADC read — Select this option for the block to read the result at the selected channel. This option enables the output port result. Selection of this mode enables options in the Input # tab and Group select tab in the EVADC Peripheral Configuration.

  • ADC trigger — Select this option to trigger the selected channel via a software trigger. This option enables the input port trigger. Selection of this mode enables options Group select tab in the EVADC Peripheral Configuration.

    Note

    As the block does not show the conversion results in this mode, you must use another EVADC block with the Mode parameter set to ADC read to display the conversion results.

Select the required number of channels ranging between 1 through 16.

When you select this parameter, the block configures the status output port to output the status of the conversion result.

Dependencies

To enable this port, set the Mode parameter to ADC read.

Specify in seconds how often the block must read the analog pin(s).

When you set this parameter to -1, Simulink determines the best sample time for the block based on the block context within the model.

Dependencies

To enable the Sample time parameter, set the Mode parameter to ADC read.

Select this parameter to enable the peripheral simulation capability.

Note

If you do not have a SoC Blockset™ license, you cannot enable the Enable simulation port parameter.

Version History

Introduced in R2024a