Electronic Components Datasheet Search
  English  ▼

X  

AN3427 Datasheet(PDF) 39 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) 39 Page - STMicroelectronics

Back Button AN3427 Datasheet HTML 35Page - STMicroelectronics AN3427 Datasheet HTML 36Page - STMicroelectronics AN3427 Datasheet HTML 37Page - STMicroelectronics AN3427 Datasheet HTML 38Page - STMicroelectronics AN3427 Datasheet HTML 39Page - STMicroelectronics AN3427 Datasheet HTML 40Page - STMicroelectronics AN3427 Datasheet HTML 41Page - STMicroelectronics AN3427 Datasheet HTML 42Page - STMicroelectronics AN3427 Datasheet HTML 43Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 39 / 52 page
background image
AN3427
Firmware migration using the library
Doc ID 019001 Rev 1
39/52
used to configure the microcontroller system at start-up and before branching to the
main() program.
Note:
For STM32F2xx you can use the clock configuration tool,
STM32F2xx_Clock_Configuration.xls, to generate a customized SystemInit() function
depending on your application requirements. For more information, refer to the application
note AN3362 “Clock configuration tool for STM32F2xx microcontrollers”
2.
Peripheral access configuration: as presented in Section 3.4: RCC you need to call
different functions to [enable/disable] or [enter/exit] the peripheral [clock] or [from reset
mode]. For example, GPIOA is mapped on AHB1 bus on F2 series (APB2 bus on F1
series), to enable its clock you have to use the
RCC_AHB1PeriphClockCmd(RCC_AHB1Periph_GPIOA, ENABLE);
function instead of:
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
in the F1 series. Refer to Table3 on page13 for the peripheral bus mapping changes
between F2 and F1 series.
3.
Peripheral clock configuration
a)
I2S: in STM32 F2 series the I2S clock can be derived either from a specific PLL
(PLLI2S) or from an external clock mapped on the I2S_CKIN pin. Refer to the
code given below, that should be used in both cases:
/******************************************************************************/
/*
PLLI2S used as I2S clock source
*/
/******************************************************************************/
/* Select PLLI2S as I2S clock source */
RCC_I2SCLKConfig(RCC_I2S2CLKSource_PLLI2S);
/* Configure the PLLI2S clock multiplication and division factors
Note: PLLI2S clock source is common with the main PLL (configured in
RCC_PLLConfig function )
*/
RCC_PLLI2SConfig(PLLI2SN, PLLI2SR);
/* Enable PLLI2S */
RCC_PLLI2SCmd(ENABLE);
/* Wait till PLLI2S is ready */
while(RCC_GetFlagStatus(RCC_FLAG_PLLI2SRDY) == 0)
{
}
/* Enable I2Sx’s APB interface clock (I2S2/3 are subset of SPI2/3 peripherals) */
RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPIx, ENABLE);
/******************************************************************************/
/*
External clock used as I2S clock source
*/
/******************************************************************************/
/* Select External clock mapped on the I2S_CKIN pin as I2S clock source */
RCC_I2SCLKConfig(RCC_I2S2CLKSource_Ext);
/* Enable I2Sx’s APB interface clock (I2S2/3 are subset of SPI2/3 peripherals) */
RCC_APB1PeriphClockCmd(RCC_APB1Periph_SPIx, ENABLE);
b)
USB OTG FS and SDIO: in STM32 F2 series the USB OTG FS requires a
frequency of 48 MHz to work correctly, while the SDIO requires a frequency of less



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