| Electronic Components Datasheet Search |
|
AN3427 Datasheet(PDF) 39 Page - STMicroelectronics |
|
|
|||||||||||||||||||||||||||||
AN3427 Datasheet(HTML) 39 Page - STMicroelectronics |
|
39 / 52 page ![]() 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 |
|
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 |
| 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 |