Datenblatt-Suchmaschine für elektronische Bauteile
  German  ▼
ALLDATASHEETDE.COM

X  

AN3422 Datenblatt(PDF) 48 Page - STMicroelectronics

Teilenummer AN3422
Bauteilbeschribung  Migration of microcontroller applications from STM32F1 to STM32L1 series
PDF  52 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Hersteller  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN3422 Datenblatt(HTML) 48 Page - STMicroelectronics

Back Button AN3422 Datasheet HTML 44Page - STMicroelectronics AN3422 Datasheet HTML 45Page - STMicroelectronics AN3422 Datasheet HTML 46Page - STMicroelectronics AN3422 Datasheet HTML 47Page - STMicroelectronics AN3422 Datasheet HTML 48Page - STMicroelectronics AN3422 Datasheet HTML 49Page - STMicroelectronics AN3422 Datasheet HTML 50Page - STMicroelectronics AN3422 Datasheet HTML 51Page - STMicroelectronics AN3422 Datasheet HTML 52Page - STMicroelectronics  
Zoom Inzoom in Zoom Outzoom out
 48 / 52 page
background image
Firmware migration using the library
AN3422
48/52
Doc ID 018976 Rev 2
/* Enable ADC1 clock */
RCC_APB2PeriphClockCmd(RCC_APB2Periph_ADC1, ENABLE);
/* Common configuration *****************************************************/
/* ADCCLK = HSI/1 */
ADC_CommonInitStructure.ADC_Prescaler = ADC_Prescaler_Div1;
ADC_CommonInit(&ADC_CommonInitStructure);
/* ADC1 configuration */
ADC_InitStructure.ADC_ScanConvMode = ENABLE;
ADC_InitStructure.ADC_ContinuousConvMode = ENABLE;
ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConvEdge_None;
ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right;
ADC_InitStructure.ADC_NbrOfConversion = 1;
ADC_Init(ADC1, &ADC_InitStructure);
/* ADC1 regular channel14 configuration */
ADC_RegularChannelConfig(ADC1, ADC_Channel_14, 1, ADC_SampleTime_4Cycles);
/* Enable the request after last transfer for DMA Circular mode */
ADC_DMARequestAfterLastTransferCmd(ADC1, ENABLE);
/* Enable ADC1 DMA */
ADC_DMACmd(ADC1, ENABLE);
/* Enable ADC1 */
ADC_Cmd(ADC1, ENABLE);
/* Wait until the ADC1 is ready */
while(ADC_GetFlagStatus(ADC1, ADC_FLAG_ADONS) == RESET)
{
}
/* Start ADC1 Software Conversion */
ADC_SoftwareStartConv(ADC1);
...
The main changes in the source code/procedure in L1 series vs. F1 are described below:
1.
ADC configuration is made through two functions ADC_CommonInit() and ADC_Init():
ADC_CommonInit() function is used to configure the ADC analog clock prescaler.
2.
To enable the generation of DMA requests continuously at the end of the last DMA
transfer, the ADC_DMARequestAfterLastTransferCmd() function should be used.
3.
No calibration is needed
5.7
PWR
The table below presents the PWR driver API correspondence between STM32F10x and
STM32L1xx Libraries. You can easily update your application code by replacing
STM32F10x functions by the corresponding function in STM32L1xx Library.



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 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52


Datenblatt Download

Go To PDF Page


Link URL



War ALLDATASHEET hilfreich?  [ DONATE ] 

Über Alldatasheet   |   Werbung   |   Kontakt   |   Privatsphäre und Datenschutz   |   Link zum Datenblatt    |   Linktausch   |   Hersteller
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