DSADC
Libraries:
Embedded Coder Support Package for Infineon AURIX TC4x
Microcontrollers /
AURIX TC4x
Description
The DSADC 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 DSADC Peripheral Configuration tool. The block provides the conversion results continuously based on the filter parameters that you specify when configuring the DSADC peripheral in the Hardware Mapping tool.
Ports
Output
result — Voltage of analog input pin
scalar
|
vector
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 Mode | FIFO | Timestamp | Valid FIFO Level | Size of Result |
---|---|---|---|---|
Number of 16-bit data to read: 1 | Disable | Disable | Stage 1 | 1-by-1 |
Enable | Disable | Stage 1 | 1-by-1 | |
Stage 2 | 2-by-1 | |||
Stage 3 | 3-by-1 | |||
Stage 4 | 4-by-1 | |||
Enable | Stage 2 | 1-by-1 | ||
Stage 3 | 2-by-1 | |||
Stage 4 | 3-by-1 | |||
Number of 16-bit data to read: 2 | Enable | Disable | Stage 2 | 2-by-1 |
Stage 4 | 4-by-1 | |||
Enable | Stage 4 | 3-by-1 |
Data Types: uint16
| int16
aux_result — Auxiliary result as signed or unsigned 16-bit value
scalar
The block outputs the auxiliary result as a 16-bit value. Use this port to obtain to obtain immediate result of conversion, bypassing the offset and integrator filter stages during conversion.
Dependencies
To enable this port, select the Auxiliary Result parameter.
Data Types: uint16
timestamp — Timestamp of 16-bit counter value
scalar
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
| int16
Parameters
Auxiliary Result — Enable the auxiliary result as additional output
off
(default) |
on
Select this parameter to enable the aux_result output port. The block outputs the auxiliary result as a signed or unsigned 16-bit value.
Selection of this parameter enables the related parameters in the DSADC Peripheral Configuration.
Enable timestamp — Option to enable timestamp output
off
(default) |
on
Select to enable the timestamp.
When you select the Enable timestamp
parameter, the block
configures an additional output port, timestamp.
Selection of this parameter enables options in the Timestamp tab and Timestamp event (under Events tab) in the DSADC Peripheral Configuration.
Note
Configure the trigger signal before selecting the Enable timestamp parameter, since the timestamp is always associated with a trigger signal. Otherwise, the FIFO functionality does not work, as timestamp is flushed into FIFO first and then to the result registers.
Enable FIFO — Option to enable FIFO register
off
(default) |
on
Select this parameter to enable the FIFO register.
Enabling this parameter results in the addition of two new parameters – Number of 16 bit data to read and FIFO Level.
Number of 16 bit data to read — Number of 16 bit data to read
1
(default) |
2
Number of 16 bit data to read.
Specify 2
to fetch the data faster from the FIFO
register.
FIFO Level — Level of FIFO
4
(default) | 3
|
2
|
1
Level of the FIFO register for data transfer.
The option 1
appears if you disable Enable
Timestamp
Sample time — Frequency at which block reads input analog pin(s)
-1
(default) |
scalar
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.
Data type — Data type of the result
int16
(default) |
uint16
Specify the data type of the output at result port.
Version History
Introduced in R2023b
See Also
MATLAB コマンド
次の MATLAB コマンドに対応するリンクがクリックされました。
コマンドを MATLAB コマンド ウィンドウに入力して実行してください。Web ブラウザーは MATLAB コマンドをサポートしていません。
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)