EasyManuals Logo

ST STM32G473 User Manual

ST STM32G473
2126 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #1275 background imageLoading...
Page #1275 background image
RM0440 Rev 4 1275/2126
RM0440 General-purpose timers (TIM2/TIM3/TIM4/TIM5)
1343
A quadrature encoder can be connected directly to the MCU without external interface logic.
However, comparators are normally be used to convert the encoder’s differential outputs to
digital signals. This greatly increases noise immunity. The third encoder output which
indicate the mechanical zero position, may be connected to the external trigger input and
trigger a counter reset.
Figure 405 gives an example of counter operation, showing count signal generation and
direction control. It also shows how input jitter is compensated where both edges are
selected. This might occur if the sensor is positioned near to one of the switching points. For
this example we assume that the configuration is the following:
CC1S= 01 (TIMx_CCMR1 register, tim_ti1fp1 mapped on tim_ti1)
CC2S= 01 (TIMx_CCMR2 register, tim_ti2fp2 mapped on tim_ti2)
CC1P and CC1NP = ‘0’ (TIMx_CCER register, tim_ti1fp1 noninverted,
tim_ti1fp1=tim_ti1)
CC2P and CC2NP = ‘0’ (TIMx_CCER register, tim_ti2fp2 noninverted,
tim_ti2fp2=tim_ti2)
SMS= 011 (TIMx_SMCR register, both inputs are active on both rising and falling
edges)
CEN= 1 (TIMx_CR1 register, Counter is enabled)
Table 279. Counting direction versus encoder signals(CC1P = CC2P = 0)
Active edge SMS[3:0]
Level on opposite
signal (tim_ti1fp1
for tim_ti2,
tim_ti2fp2 for
tim_ti1)
tim_ti1fp1 signal tim_ti2fp2 signal
Rising Falling Rising Falling
Counting on
tim_ti1 only
x1 mode
1110
High Down Up No count No count
Low No count No count No count No count
Counting on
tim_ti2 only
x1 mode
1111
High No count No count Up Down
Low No count No count No count No count
Counting on
tim_ti1 only
x2 mode
0001
High Down Up No count No count
Low Up Down No count Down
Counting on
tim_ti2 only
x2 mode
0010
High No count No count Up Down
Low No count No count Down Up
Counting on
tim_ti1 and
tim_ti2
x4 mode
0011
High Down Up Up Down
Low Up Down Down Up

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the ST STM32G473 and is the answer not in the manual?

ST STM32G473 Specifications

General IconGeneral
BrandST
ModelSTM32G473
CategoryMicrocontrollers
LanguageEnglish

Related product manuals