Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN4157 Datasheet(PDF) 17 Page - STMicroelectronics

Part # AN4157
Description  STM32F3DISCOVERY peripheral firmware examples
PDF  24 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN4157 Datasheet(HTML) 17 Page - STMicroelectronics

Back Button AN4157 Datasheet HTML 13Page - STMicroelectronics AN4157 Datasheet HTML 14Page - STMicroelectronics AN4157 Datasheet HTML 15Page - STMicroelectronics AN4157 Datasheet HTML 16Page - STMicroelectronics AN4157 Datasheet HTML 17Page - STMicroelectronics AN4157 Datasheet HTML 18Page - STMicroelectronics AN4157 Datasheet HTML 19Page - STMicroelectronics AN4157 Datasheet HTML 20Page - STMicroelectronics AN4157 Datasheet HTML 21Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 17 / 24 page
background image
AN4157
Peripheral firmware examples description
Doc ID 023629 Rev 1
17/24
TIM1 is configured to generate the reference signal used by TIM8 on Channel1:
●
TIM1 generates a PWM signal with a frequency equal to 1.4560 kHz.
●
TIM1 is used as master for TIM8: TIM1 update event resets TIM8 counter to
synchronize the reference signal (TIM1_CH1) and the shifted signal (TIM8_CH2).
TIM1 and TIM8 input clock (TIM18CLK) is set to APB2 clock (PCLK2). TIM1 and TIM8
signals are at frequency of (SystemCoreClock / (Period + 1)).
TIM8 generates a signal with the following characteristics:
Pulse length = (TIM8_CCR1 + TIM8_CCR2) / TIM8_CLK
Phase shift = TIM8_CCR1/TIM8_CLK
where TIM8_CLK = (SystemCoreClock / (Period + 1)), as the prescaler is equal to zero.
Connect the following pins to an oscilloscope to monitor the different waveforms:
●
PA08 (TIM1_CH1)
●
PB08 (TIM8_CH2)
●
PB06 (TIM8_CH1)
Note:
The shift is measured using the TIM1_CH1 as reference signal.
3.20
TIM combined example
3.20.1
Purpose
This example provides a short description of how to configure the TIM1 peripheral to
generate 3 PWM combined signals with TIM1 Channel5.
3.20.2
Description
The TIM1 input clock (TIM1CLK) with prescaler 0 is set to APB2 clock (PCLK2), which is
equal to system clock (SystemCoreClock).
SystemCoreClock is set to 72 MHz for STM32F30x or STM32F31x devices.
The objective is to generate 3 combined PWM signal at 8.78 kHz (in center aligned mode):
TIM1_Period = (SystemCoreClock / (8.78*2)) - 1
●
The channel 1 duty cycle is set to 50%
●
The channel 2 duty cycle is set to 37.5%
●
The channel 3 duty cycle is set to 25%
The Timer pulse is calculated as follows:
ChannelxPulse = DutyCycle * (TIM1_Period - 1) / 100
The channel 5 is used in PWM2 mode with duty cycle set to 6.22%
The 3 resulting signals are made of an AND logical combination of two reference PWMs:
●
Channel 1 and Channel 5
●
Channel 2 and Channel 5
●
Channel 3 and Channel 5



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24


Datasheet Download

Go To PDF Page


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


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
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