Electronic Components Datasheet Search
  English  ▼
ALLDATASHEET.NET

X  

AN3427 Datasheet(PDF) 47 Page - STMicroelectronics

Part # AN3427
Description  Migrating a microcontroller application from STM32F1 to STM32F2 series
PDF  52 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN3427 Datasheet(HTML) 47 Page - STMicroelectronics

Back Button AN3427 Datasheet HTML 43Page - STMicroelectronics AN3427 Datasheet HTML 44Page - STMicroelectronics AN3427 Datasheet HTML 45Page - STMicroelectronics AN3427 Datasheet HTML 46Page - STMicroelectronics AN3427 Datasheet HTML 47Page - STMicroelectronics AN3427 Datasheet HTML 48Page - STMicroelectronics AN3427 Datasheet HTML 49Page - STMicroelectronics AN3427 Datasheet HTML 50Page - STMicroelectronics AN3427 Datasheet HTML 51Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 47 / 52 page
background image
AN3427
Firmware migration using the library
Doc ID 019001 Rev 1
47/52
DMA_Cmd(DMA2_Stream0, ENABLE);
The source code changes in DMA_InitStructure members are indicated in Bold and
BoldItalic:
1.
The structure members indicated in Bold were added vs. STM32 F1 series and used to
configure the DMA FIFO mode and its Threshold, Burst mode for source and/or
destination.
2.
The name of the structure members indicated in BoldItalic were changed vs. STM32
F1 series
a)
In STM32F2xx Library the name of “DMA_MemoryBaseAddr” member was
changed to “DMA_Memory0BaseAddr”, since the DMA is able to manage two
buffers for data transfer:
–
“DMA_Memory0BaseAddr”: specifies the memory base address for DMAy
Streamx, it’s the default memory used when double buffer mode is not enabled.
–
“DMA_Memory1BaseAddr”: specifies the base address of the second buffer, when
buffer mode is enabled.
b)
In STM32F2xx Library the possible values of “DMA_DIR” member were changed
to “DMA_DIR_PeripheralToMemory”, “DMA_DIR_MemoryToPeripheral” and
“DMA_DIR_MemoryToMemory”.
4.7
ADC
This section gives an example of how to port existing code from STM32 F1 series to F2
series.
The example below shows how to configure the ADC1 to continuously convert channel14 in
STM32 F1 series:
...
/* ADCCLK = PCLK2/4 */
RCC_ADCCLKConfig(RCC_PCLK2_Div4);
/* Enable ADC's APB interface clock */
RCC_APB2PeriphClockCmd(RCC_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));



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


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