| 전자부품 데이터시트 검색엔진 |
|
AN4013 데이터시트(PDF) 16 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4013 데이터시트(HTML) 16 Page - STMicroelectronics |
|
16 / 37 page ![]() General-purpose timer modes AN4013 16/37 DocID022500 Rev 4 2.6 Timer one pulse mode One pulse mode (OPM) is a particular case of the input capture mode and the output compare mode. It allows the counter to be started in response to a stimulus and to generate a pulse with a programmable length after a programmable delay. To configure the timer this mode: 1. Configure the input pin and mode: a) Select the TIxFPx trigger to be used by writing CCxS bits in CCMRx register. b) Select the polarity of the input pin by writing CCxP and CCxNP bits in CCER register. c) Configure the TIxFPx trigger for the slave mode trigger by writing TS bits in SMCR register. d) Select the trigger mode for the slave mode by writing SMS = 110 in SMCR register. 2. Configure the output pin and mode: a) Select the output polarity by writing CCyP bit in CCER register. b) Select the output compare mode by writing OCyM bits in CCMRy register (PWM1 or PWM2 mode). c) Set the delay value by writing in CCRy register. d) Set the auto reload value to have the desired pulse: pulse = TIMy_ARR - TIMy_CCRy. 3. Select the one pulse mode by setting the OPM bit in CR1 register, if only one pulse is to be generated. Otherwise this bit should be reset. Delay = CCRy/(TIMx_CLK/(PSC + 1)) Pulse-Length = (ARR - CCRy)/(TIMx_CLK/(PSC + 1)) For more details on using the timer in this mode, refer to the examples provided in the STM32xx standard peripheral libraries, in the /Project/STM32xx_StdPeriph_Examples/ TIM/OnePulse folder. 2.7 Timer Asymmetric PWM mode available for STM32F30x and STM32F3x8 lines The asymmetric mode allows generating a center-aligned PWM signals with a programmable phase shift. For a dedicated channel, the phase shift and the pulse length are programmed using the two TIMx_CCRx register (TIMx_CCR1 and TIMx_CCR2 or TIMx_CCR3 and TIMx_CCR4), the frequency is determined by the value of the TIMx_ARR register. So the asymmetric PWM mode can be selected independently on two channels by programming the OCxM bits in TIMx_CCMRx register: OCxM = 1110 to use the Asymmetric PWM1, in this mode the output reference has the same behavior as in PWM1 mode. When the counter is counting up the output reference is identical to OC1/3REF, when the counter is down counting, the output reference is identical to OC2/4REF OCxM = 1111 to use the Asymmetric PWM2, in this mode the output reference has the same behavior as in PWM2 mode. When the counter is counting up the output reference is identical to OC1/3REF, when the counter is down counting, the output reference is identical to OC2/4REF |
|
링크 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 |