| Electronic Components Datasheet Search |
|
AN4157 Datasheet(PDF) 18 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN4157 Datasheet(HTML) 18 Page - STMicroelectronics |
|
18 / 24 page ![]() Peripheral firmware examples description AN4157 18/24 Doc ID 023629 Rev 1 The TIM1 waveform can be displayed using an oscilloscope. Connect the following pins to an oscilloscope to monitor the different waveforms: ● PA08 (TIM1_CH1) ● PA09 (TIM2_CH2) ● PA10 (TIM2_CH3) 3.21 TIM complementary signals example 3.21.1 Purpose This example shows how to perform the following operations using TIM1 timer: ● Configure TIM1 to generate three complementary signals ● Insert a defined dead time value ● Use the break feature ● Lock the desired parameters 3.21.2 Description TIM1CLK is SystemCoreClock, and TIM1 Prescaler is set to 0.As a result, the TIM1 counter clock is SystemCoreClock (72 MHz). The objective is to generate a PWM signal at 17.57 kHz: TIM1_Period = (SystemCoreClock / 17570) - 1 The three Duty cycles are computed as follows: ● The channel 1 duty cycle is set to 50% so channel 1N is set to 50%. ● The channel 2 duty cycle is set to 25% so channel 2N is set to 75%. ● The channel 3 duty cycle is set to 12.5% so channel 3N is set to 87.5%. The Timer pulse is calculated as follows: ChannelxPulse = DutyCycle * (TIM1_Period - 1) / 100 A dead time equal to 11/SystemCoreClock is inserted between the different complementary signals, and the Lock level 1 is selected.The break Polarity is set to high level. The TIM1 waveform can be displayed using an oscilloscope. ● Connect the TIM1 pins to an oscilloscope to monitor the different waveforms: – TIM1_CH1 pin (PA08) – TIM1_CH1N pin (PA07) – TIM1_CH2 pin (PA9) – TIM1_CH2N pin (PB00) – TIM1_CH3 pin (PA10) – TIM1_CH3N pin (PB01) Note: Connect the TIM1 break pin TIM1_BKIN pin (PB12) to the GND. To generate a break event, switch this pin level from 0V to 3.3V. |
|
|
Link URL |
| Does ALLDATASHEET help your business so far? [ DONATE ] |
About Alldatasheet | Advertisement | Contact us | Privacy Policy | Link to Datasheet | Link Exchange | Manufacturer List 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 |