EVADC

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.
Examples
Field-Oriented Control of BLDC with Encoder Using Infineon AURIX TC3xx Microcontrollers
Implement the field-oriented control (FOC) technique to control the speed of a three-phase brushless DC (BLDC) motor. The FOC algorithm requires rotor position feedback, which is obtained by using an encoder sensor. For more details about FOC, see Field-Oriented Control (FOC) (Motor Control Blockset).
Ports
Input
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
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 in an
1-by-N
array, where N represents the number of channels
specified in the Number of channels parameter. Each array
element represents status of read operation of individual channel as one of
these values:
0 —
Conversion result is available1 —
Conversion result is not available
Dependencies
To enable this port, set the Mode parameter to
ADC read
and enable the
Status 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
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
See Also
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)