Main Content

EDSADC

Measure voltage of analog input pin using delta-sigma conversion

Since R2024b

  • EDSADC block

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

Description

The EDSADC block measures the voltage of an analog input pin using delta-sigma conversion.

It outputs the voltage as an unsigned or signed 16-bit count formatted as an N-by-1 array. The delta-sigma conversion process can utilize either the on-chip modulator or the external modulator, which you select in the EDSADC Peripheral Configuration tool. The block provides the conversion results continuously based on the filter parameters that you specify when configuring the EDSADC peripheral in the Hardware Mapping tool.

Ports

Output

expand all

The block outputs the voltage as a 16-bit count formatted as an N-by-1 array, where N varies based on the parameter values, as shown in this table.

Read ModeFIFOTimestampValid FIFO LevelSize of Result
Number of 16-bit data to read: 1 DisableDisableStage 11-by-1
EnableDisableStage 11-by-1
Stage 22-by-1
Stage 33-by-1
Stage 44-by-1
EnableStage 21-by-1
Stage 32-by-1
Stage 43-by-1
Number of 16-bit data to read: 2 EnableDisableStage 22-by-1
Stage 44-by-1
EnableStage 43-by-1

Data Types: uint16 | int16

The block outputs the auxiliary result as a 16-bit value. Use this port to obtain the immediate result of the conversion, bypassing the main filter chain stages during conversion.

Dependencies

To enable this port, select the Auxiliary result parameter.

Data Types: uint16 | int16

The block outputs the current value of the 16-bit timestamp counter.

Dependencies

To enable this port, select the Enable timestamp parameter.

Data Types: uint16

Parameters

expand all

Select this parameter to enable the timestamp output port..

Selecting this parameter also enables options in the Timestamp tab and Timestamp event (under Events tab) in the EDSADC Peripheral Configuration tool.

Note

Configure the trigger signal before selecting the Enable timestamp parameter, since the timestamp is always associated with a trigger signal.

Select this parameter to enable the aux_result output port. The block outputs the auxiliary result as a signed or unsigned 16-bit value.

Selecting this parameter enables the related parameters in the EDSADC Peripheral Configuration tool.

Select this parameter to enable the FIFO register.

Specify the number of 16 bit output data to read.

Specify 2 to fetch the data faster from the FIFO register.

Dependencies

To enable the Number of 16 bit data to read parameter, select the Enable FIFO parameter.

Level of the FIFO register for data transfer.

The option 1 appears if you disable Enable Timestamp

Dependencies

To enable the FIFO level parameter, select the Enable FIFO parameter.

Specify the data type of the output at result port.

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

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

Version History

Introduced in R2024b