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

This port receives message from the interface blocks and the EVADC block converts this message and outputs it at the result port during simulation.

Dependencies

To view this input port, set the Mode parameter to ADC read and select the Enable simulation port parameter and set the port type as SoC Data (Message based).

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

Dependencies

To view this input port, set the Mode parameter to ADC read and select the Enable simulation port parameter and set the port type as Signal.

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 available

  • 1 — Conversion result is not available

Dependencies

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

Data Types: uint8

This port outputs an event message at each trigger to start the conversion during simulation.

Dependencies

To view this port, set the Mode parameter to ADC trigger, select the Enable simulation port parameter, and set the port type to SoC Data (Message based).

This port outputs the data received at trigger input port as a signal during simulation.

Dependencies

To view this port, set the Mode parameter to ADC trigger and select the Enable simulation port parameter, and set the port type to Signal.

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 peripheral simulation capability.

Select this parameter to configure either the SoC message or the Simulink signal based simulation ports to enable peripheral simulation capability.

Dependencies

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

Version History

Introduced in R2024a