Main Content

Digital Port Read

Read GPIO pin(s) status

Since R2022b

  • Digital Port Read Block

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

Description

Read the logical status of a GPIO port pin for the Infineon AURIX TC4x Microcontrollers.

Ports

Input

expand all

This port receives the SoC Blockset™ message from the interface blocks and the Digital Port Read block converts the msg into data to be emitted at the output port during simulation.

Dependencies

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

The simulation-only signal input port acts as pass-through with the output of the Digital Port Read block during simulation.

Dependencies

To view this port, select the Enable simulation port parameter and set the port type as Signal.

Output

expand all

The port outputs the status of the digital pin you select in the Port number and Pin number parameter from Digital Port Read Peripheral Configuration.

The port outputs the status as a logical scalar if the pin number is 1 or as a logical vector if it is greater than 1.

Data Types: Boolean

Parameters

expand all

Select the number of pins (1 to 16) whose output you want to configure in the block.

Specify in seconds how often the block should read the pin value.

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

Select this parameter to enable peripheral simulation capability.

Select this parameter to configure either the SoC compatible 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 R2022b