数据搜索系统,热门电子元器件搜索
  Chinese  ▼
ALLDATASHEETCN.COM

X  

AN3422 数据表(PDF) 39 Page - STMicroelectronics

部件名 AN3422
功能描述  Migration of microcontroller applications from STM32F1 to STM32L1 series
PDF  52 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
制造商  STMICROELECTRONICS [STMicroelectronics]
网页  http://www.st.com
标志 STMICROELECTRONICS - STMicroelectronics

AN3422 数据表(HTML) 39 Page - STMicroelectronics

Back Button AN3422 Datasheet HTML 35Page - STMicroelectronics AN3422 Datasheet HTML 36Page - STMicroelectronics AN3422 Datasheet HTML 37Page - STMicroelectronics AN3422 Datasheet HTML 38Page - STMicroelectronics AN3422 Datasheet HTML 39Page - STMicroelectronics AN3422 Datasheet HTML 40Page - STMicroelectronics AN3422 Datasheet HTML 41Page - STMicroelectronics AN3422 Datasheet HTML 42Page - STMicroelectronics AN3422 Datasheet HTML 43Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 39 / 52 page
background image
AN3422
Firmware migration using the library
Doc ID 018976 Rev 2
39/52
implementation of SystemInit() function used to configure the microcontroller system at
start-up and before branching to the main() program.
Note:
For STM32L1xx you can use the clock configuration tool,
STM32L1xx_Clock_Configuration.xls, to generate a customized SystemInit() function
depending on your application requirements. For more information, refer to AN3309 “Clock
configuration tool for STM32L1xx microcontrollers”
2.
Peripheral access configuration: as presented in section 4.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 AHB bus on L1 series (APB2 bus on F1
series), to enable its clock you have to use the
RCC_AHBPeriphClockCmd(RCC_AHBPeriph_GPIOA, ENABLE);
function instead of:
RCC_APB2PeriphClockCmd(RCC_APB2Periph_GPIOA, ENABLE);
in the F1 series. Refer to Table4 on page15 for the peripheral bus mapping changes
between L1 and F1 series.
3.
Peripheral clock configuration
a)
USB FS Device: in STM32L1 series the USB FS Device require a frequency of 48
MHz to work correctly. The following is an example of the main PLL configuration
to obtain 32 MHz as system clock frequency and 48 MHz for the USB FS Device.
/* PLL_VCO = HSE_VALUE * PLL_MUL = 96 MHz */
/* USBCLK = PLL_VCO / 2= 48 MHz */
/* SYSCLK = PLL_VCO * PLL_DIV = 32 MHz */
RCC->CFGR |= (uint32_t)(RCC_CFGR_PLLSRC_HSE | RCC_CFGR_PLLMUL12 | RCC_CFGR_PLLDIV3);
/* Enable PLL */
RCC->CR |= RCC_CR_PLLON;
/* Wait till PLL is ready */
while((RCC->CR & RCC_CR_PLLRDY) == 0)
{
}
/* Select PLL as system clock source */
RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW));
RCC->CFGR |= (uint32_t)RCC_CFGR_SW_PLL;
/* Wait till PLL is used as system clock source */
while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS) != (uint32_t)RCC_CFGR_SWS_PLL)
{
}
...
/* Enable USB FS Device's APB1 interface clock */
RCC_APB1PeriphClockCmd(RCC_APB1Periph_USB, ENABLE);
b)
ADC: in STM32L1 series the ADC features two clock schemes:
Clock for the analog circuitry: ADCCLK. This clock is generated always from the
HSI clock divided by a programmable prescaler that allows the ADC to work at
fHSI/1, /2 or /4. This configuration is done using the ADC registers.
Clock for the digital interface (used for register read/write access). This clock is
equal to the APB2 clock. The digital interface clock can be enabled/disabled
through the RCC APB2 peripheral clock enable register (RCC_APB2ENR).



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


数据表 下载

Go To PDF Page


链接网址



ALLDATASHEET是否为您带来帮助?  [ DONATE ] 

关于 Alldatasheet   |   广告服务   |   联系我们   |   隐私政策   |   数据表链接    |   链接交换   |   制造商名单
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