Motor de Búsqueda de Datasheet de Componentes Electrónicos
  Mexican  ▼
ALLDATASHEET.COM.MX

X  

AN4228 Datasheet(PDF) 56 Page - STMicroelectronics

No. de pieza AN4228
Descripción Electrónicos  Migrating from STM32F1 to STM32F3 microcontrollers
PDF  90 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Fabricante Electrónico  STMICROELECTRONICS [STMicroelectronics]
Página de inicio  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN4228 Datasheet(HTML) 56 Page - STMicroelectronics

Back Button AN4228 Datasheet HTML 52Page - STMicroelectronics AN4228 Datasheet HTML 53Page - STMicroelectronics AN4228 Datasheet HTML 54Page - STMicroelectronics AN4228 Datasheet HTML 55Page - STMicroelectronics AN4228 Datasheet HTML 56Page - STMicroelectronics AN4228 Datasheet HTML 57Page - STMicroelectronics AN4228 Datasheet HTML 58Page - STMicroelectronics AN4228 Datasheet HTML 59Page - STMicroelectronics AN4228 Datasheet HTML 60Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 56 / 90 page
background image
Firmware migration using the library
AN4228
56/90
DocID024110 Rev 5
This section gives an example of how to port existing code from STM32F1 series to
STM32F3 series.
The example below shows how to configure the ADC1 to convert continuously channel 14 in
STM32F1 series:
/* ADCCLK = PCLK2/4 */
_ADCCLKConfig(_PCLK2_Div4);
/* Enable ADC's APB interface clock */
_APB2PeriphClockCmd(_APB2Periph_ADC1, ENABLE);
/* Configure ADC1 to convert continously channel14 */
ADC_InitStructure.ADC_Mode = ADC_Mode_Independent;
ADC_InitStructure.ADC_ScanConvMode = ENABLE;
ADC_InitStructure.ADC_ContinuousConvMode = ENABLE;
ADC_InitStructure.ADC_ExternalTrigConv = ADC_ExternalTrigConv_None;
ADC_InitStructure.ADC_DataAlign = ADC_DataAlign_Right;
ADC_InitStructure.ADC_NbrOfChannel = 1;
ADC_Init(ADC1, &ADC_InitStructure);
/* ADC1 regular channel14 configuration */
ADC_RegularChannelConfig(ADC1, ADC_Channel_14, 1,
ADC_SampleTime_55Cycles5);
/* Enable ADC1's DMA interface */
ADC_DMACmd(ADC1, ENABLE);
/* Enable ADC1 */
ADC_Cmd(ADC1, ENABLE);
/* Enable ADC1 reset calibration register */
ADC_ResetCalibration(ADC1);
/* Check the end of ADC1 reset calibration register */
while(ADC_GetResetCalibrationStatus(ADC1));
/* Start ADC1 calibration */
ADC_StartCalibration(ADC1);
/* Check the end of ADC1 calibration */
while(ADC_GetCalibrationStatus(ADC1));
/* Start ADC1 Software Conversion */
ADC_SoftwareStartConvCmd(ADC1, ENABLE);
...
In F30 series, you have to update this code as follows:
...
/* Configure the ADC clock */



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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90


Datasheet Descarga

Go To PDF Page


Enlace URL



¿ALLDATASHEET es útil para Ud.?  [ DONATE ] 

Todo acerca de Alldatasheet   |   Publicidad   |   Contáctenos   |   Política de Privacidad   |   Enlace a la hoja de datos    |   Intercambio de Enlaces   |   Lista de Fabricantes
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