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 BrowserPeripherals
Encoder
. For more, see .Check for conflicts, if any between peripherals.
Open the Encoder Peripheral Configuration
In the Simulink toolstrip, go to Hardware tab and click Hardware Mapping.
Parameters
GPT1 prescaler
— Encoder GPT1 prescaler
8
(default) |
4
|
16
|
32
Select the general purpose timer (GPT) prescaler for GPT1.
GPT12 resolution
— GPT12 resolution
Two-Fold
(default) |
Four-Fold
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.
Encoder resolution
— Resolution of encoder
1000
(default) |
positive scalar integer
Specify the encoder resolution.
Encoder offset (Counts)
— Encoder offset in counts
0
(default) |
positive scalar integer
Specify the encoder offset in counts.
PinA
— Encoder pin A
default varies based on the module
selected
(default) |
P10_4
Select the encoder pin A.
PinB
— Encoder pin B
default varies based on the module
selected
(default) |
P10_7
Select the encoder pin B.
Enable zero signal
— Select zero signal for encoder
on
(default) |
off
Select this parameter if encoder has Z signal.
PinZ
— Encoder pin Z
default varies based on the module
selected
(default) |
P10_8
Select the encoder pin Z.
Dependencies
To enable the PinZ parameter, select the Enable zero signal parameter.
Reverse counter direction
— Enable to reverse counter direction
off
(default) |
on
Select to reverse the counter direction.
Enable slow speed detection
— Select slow speed detection
off
(default) |
on
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.
Speed mode threshold(RPM)
— Speed mode threshold in RPM
2000
(default)
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.
GPT2 overall prescaler
— Encoder GPT2 prescaler
4
(default) |
2
|
8
|
16
|
32
|
64
|
128
|
256
|
512
|
1024
|
2048
Select the general purpose timer (GPT) prescaler for GPT2.
Dependencies
To enable the GPT2 overall prescaler parameter, select the Enable slow speed detection parameter.
Enable interrupt on zero signal
— Enable interrupt on zero signal for encoder
off
(default) |
on
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.
Input mode
— PinA/B/Z input mode
Tri-state
(default) |
Pull up
|
Pull down
Select the input mode for the pinA/B/Z.
Speed
— Pin speed
Speed-1
(default) |
Speed-2
|
Speed-3
Select the pin speed.
Voltage level
— Pin voltage level
Automotive
(default) |
TTL-5V
|
TTL-3.3V
Select the pin voltage level.
Version History
Introduced in R2024a
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)
Asia Pacific
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)