| 전자부품 데이터시트 검색엔진 |
|
AN4013 데이터시트(PDF) 31 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4013 데이터시트(HTML) 31 Page - STMicroelectronics |
|
31 / 37 page ![]() DocID022500 Rev 4 31/37 AN4013 Advanced features for motor control 36 Figure 8. Position at X2 resolution Note: The counter in case of resolution X2 can also be incremented on the TI1 edge. In STM32 timer encoder interface mode, the encoder mode3 corresponds to resolution X4. In this mode, the counter counts up/down on both TI1 and TI2 edges. The resolution X2 is selected when encoder mode 1 or mode 2 is selected, that is, the counter counts up/down on TI2 edge depending on the TI1 level, or the counter counts up/down on TI1 edge depending on TI2 level. How to use the encoder interface An external incremental encoder can be connected directly to the MCU without external interface logic. The third encoder output (index) which indicates the mechanical zero position, may be connected to an external interrupt input and trigger a counter reset. The output signal of the incremental encoder is filtered by the STM32 timer input filter block to reject all noise sources that typically occur in motor systems. This filter is used as described in Section 2.3: Timer input capture mode. TIM configuration in encoder mode 1. Select and configure the timer input: Input selection: – TI1 connected to TI1FP1 CC1S='01' in CCMR1 register – TI2 connected to TI2FP2 CC2S='01' in CCMR1 register Input polarity: – CC1P='0' and CC1NP='0'(CCER register, TI1FP1 non-inverted, TI1FP1=TI1). – CC2P='0' and CC2NP='0'(CCER register, TI1FP2 non-inverted, TI1FP2= TI2). 2. Select the encoder mode Encoder mode1 (resolution X2 on TI2): SMS=’001’ in SMCR register. Encoder mode2 (resolution X2 on TI1): SMS=’010' in SMCR register. Encoder mode3 (resolution X4 on TI1 and TI2): SMS=’011’ in SMCR register. 3. Enable the timer counter Set the counter enable bit, CEN='1' in CR1 register. |
|
링크 URL |
| ALLDATASHEET 가 귀하에 도움이 되셨나요? [ DONATE ] |
Alldatasheet는? | 광고문의 | 운영자에게 연락하기 | 개인정보취급방침 | 링크 투 데이터시트 | 링크교환 | 제조사별 검색 All Rights Reserved©Alldatasheet.com |
| Russian : Alldatasheetru.com | Korean : Alldatasheet.co.kr | Spanish : Alldatasheet.es | French : Alldatasheet.fr | Italian : Alldatasheetit.com Portuguese : Alldatasheetpt.com | Polish : Alldatasheet.pl | Vietnamese : Alldatasheet.vn Indian : Alldatasheet.in | Mexican : Alldatasheet.com.mx | British : Alldatasheet.co.uk | New Zealand : Alldatasheet.co.nz |
|
Family Site : ic2ic.com |
icmetro.com |