Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN2776 Datasheet(PDF) 8 Page - STMicroelectronics

Part # AN2776
Description  The purpose of this application note is to explain
PDF  20 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2776 Datasheet(HTML) 8 Page - STMicroelectronics

Back Button AN2776 Datasheet HTML 4Page - STMicroelectronics AN2776 Datasheet HTML 5Page - STMicroelectronics AN2776 Datasheet HTML 6Page - STMicroelectronics AN2776 Datasheet HTML 7Page - STMicroelectronics AN2776 Datasheet HTML 8Page - STMicroelectronics AN2776 Datasheet HTML 9Page - STMicroelectronics AN2776 Datasheet HTML 10Page - STMicroelectronics AN2776 Datasheet HTML 11Page - STMicroelectronics AN2776 Datasheet HTML 12Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 8 / 20 page
background image
FWLib V1.0 to V2.0 migration steps
AN2776
8/20
ADCs
In the same way, Medium-density devices feature two ADCs (ADC1 and ADC2) that share
the same IRQ channel. High-density devices have an additional ADC (ADC3) with a
separate IRQ channel.
For this reason, the ADC1 and ADC2 IRQ channel names were modified in
stm32f10x_nvic.c
/stm32f10x_nvic.h, as detailed in Table 2 below.
The example below shows how to configure and enable the ADC1 (or ADC2) IRQ channel
using FWLib V1.0:
/* Configure and enable ADC1 IRQ channel */
NVIC_InitStructure.NVIC_IRQChannel = ADC_IRQChannel;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
In V2.0, you simply need to change “ADC_IRQChannel” by “ADC1_2_IRQChannel”.
/* Configure and enable ADC1 IRQ channel */
NVIC_InitStructure.NVIC_IRQChannel = ADC1_2_IRQChannel;
NVIC_InitStructure.NVIC_IRQChannelPreemptionPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelSubPriority = 0;
NVIC_InitStructure.NVIC_IRQChannelCmd = ENABLE;
NVIC_Init(&NVIC_InitStructure);
Note:
The corresponding DMA and ADC ISR names have also been modified in
stm32f10_it.c
/.stm32f10_it.h.
2.2.2
TIM
In FWLib V1.0 the timer peripherals are covered by two drivers:
●
stm32f10x_tim.c
/stm32f10x_tim.h: they cover the functionality of general-
purpose timers (TIM2, TIM3 and TIM4). The function format in this driver is as follows:
TIM_FunctionName(TIMx, param1, param2,...)
e.g.: TIM_ITConfig(TIM_TypeDef* TIMx, u16 TIM_IT, FunctionalState NewState)
●
stm32f10x_tim1.c
/stm32f10x_tim1.h: they cover the functionality of the
advanced-control timer (TIM1). This driver provides the same set of functions as
stm32f10x_tim.c
/stm32f10x_tim.h plus dedicated functions to cover addtional
TIM1 features (PWMI mode, complementary PWM with dead-time insertion, etc.). The
function format in this driver is as follows:
TIM1_FunctionName(param1, param2,...)
e.g.: TIM1_ITConfig(u16 TIM1_IT, FunctionalState NewState)
In FWLib V2.0, these two drivers have been merged into a single driver,
stm32f10x_tim.c
/stm32f10x_tim.h, that covers all the timers available in High-
density and Medium-density devices: general-purpose timers (TIM2, TIM3, TIM4 and TIM5),
advanced-control timers (TIM1 and TIM8) and basic timers (TIM6&7).
This change affects only application code based on the
stm32f10x_tim1.c
/stm32f10x_tim1.h driver. The set of functions for TIM1 are the
Table 2.
ADC1 and ADC2 IRQ channel name update
FWLib V1.0
FWLib V2.0
ADC_IRQChannel
ADC1_2_IRQChannel



Html Pages

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


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