Main Content

Encoder Peripheral Configuration

Map encoder peripherals in the Infineon AURIX model to peripheral registers in the MCU

Since R2024a

Description

View and edit the map of peripherals in the Infineon® AURIX™ model to the hardware peripherals.

Encoder block is developed based on GPT12 (general purpose timer) module available in the AURIX TC3x devices.

Using the Peripheral Configuration tool, you can:

  • View and edit the configuration parameters for the Encoder peripheral block.

  • Configure the module specific parameters in Browser > Peripherals > Encoder . For more, see Hardware Mapping.

  • Check for conflicts, if any between peripherals.

Encoder Peripheral

Open the Encoder Peripheral Configuration

  • In the Simulink toolstrip, go to Hardware tab and click Hardware Mapping.

    Hardware Mapping

Parameters

expand all

Global parameters

Select the general purpose timer (GPT) prescaler for GPT1.

GPT12

Select the GPT12 resolution.

  • Two-Fold - Considers two edges of encoder sensor signal A.

  • Four-Fold - Considers both the edges of both encoder sensor signals A and B.

GPT12 > Encoder specification

Specify the encoder resolution.

Specify the encoder offset in counts .

GPT12 > Pins

Select the encoder pin A.

Select the encoder pin B.

Select this parameter if encoder has Z signal.

Select the encoder pin Z.

Dependencies

To enable the PinZ parameter, select the Enable zero signal parameter.

GPT12 > Misc

Select to reverse the counter direction.

Enable this parameter to measure slower speeds.

Note

Enable this parameter, if the application requires to measure the speed of the encoder at a rate faster than the encoder signals.

Slow speed threshold calculation is enabled when the threshold goes below the default value.

Dependencies

To enable the Speed mode threshold(RPM) parameter, select the Enable slow speed detection parameter.

Select the general purpose timer (GPT) prescaler for GPT2.

Dependencies

To enable the GPT2 overall prescaler parameter, select the Enable slow speed detection parameter.

Select this parameter to enable the interrupt on zero signal.

Enabling this parameter, will enable the event source name. The event source name is displayed and can be mapped in the tasks(CPU1)

Dependencies

To enable the Enable interrupt on zero signal parameter, select the Enable zero signal parameter.

GPT12 > Common pin configuration for PinA/B/Z

Select the input mode for the pinA/B/Z.

Select the pin speed.

Select the pin voltage level.

Version History

Introduced in R2024a