công cụ tìm kiếm bảng dữ liệu linh kiện điện tử
  Vietnamese  ▼
ALLDATASHEET.VN

X  

AN3422 bảng dữ liệu(PDF) 44 Page - STMicroelectronics

tên linh kiện AN3422
Giải thích chi tiết về linh kiện  Migration of microcontroller applications from STM32F1 to STM32L1 series
PDF  52 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
nhà sản xuất  STMICROELECTRONICS [STMicroelectronics]
Trang chủ  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN3422 bảng dữ liệu(HTML) 44 Page - STMicroelectronics

Back Button AN3422 Datasheet HTML 40Page - STMicroelectronics AN3422 Datasheet HTML 41Page - STMicroelectronics AN3422 Datasheet HTML 42Page - STMicroelectronics AN3422 Datasheet HTML 43Page - STMicroelectronics AN3422 Datasheet HTML 44Page - STMicroelectronics AN3422 Datasheet HTML 45Page - STMicroelectronics AN3422 Datasheet HTML 46Page - STMicroelectronics AN3422 Datasheet HTML 47Page - STMicroelectronics AN3422 Datasheet HTML 48Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 44 / 52 page
background image
Firmware migration using the library
AN3422
44/52
Doc ID 018976 Rev 2
5.4
GPIO
This section explains how to update the configuration of the various GPIO modes when
porting the application code from STM32F1 series to STM32L1 series.
5.4.1
Output mode
The example below shows how to configure an I/O in output mode (for example to drive a
led) in STM32F1 series:
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_x;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_xxMHz; /* 2, 10 or 50 MHz */
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_Out_PP;
GPIO_Init(GPIOy, &GPIO_InitStructure);
In L1 series you have to update this code as follows:
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_x;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_OUT;
GPIO_InitStructure.GPIO_OType = GPIO_OType_PP; /* Push-pull or open drain */
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_UP; /* None, Pull-up or pull-down */
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_xxMHz; /* 400 KHz, 2, 10 or 40MHz */
GPIO_Init(GPIOy, &GPIO_InitStructure);
5.4.2
Input mode
The example below shows how to configure an I/O in input mode (for example to be used as
an EXTI line) in STM32F1 series:
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_x;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
GPIO_Init(GPIOy, &GPIO_InitStructure);
In L1 series you have to update this code as follows:
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_x;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL; /* None, Pull-up or pull-down */
GPIO_Init(GPIOy, &GPIO_InitStructure);
5.4.3
Analog mode
The example below shows how to configure an I/O in analog mode (for example an ADC or
DAC channel) in STM32F1 series:
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_x;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AIN;
GPIO_Init(GPIOy, &GPIO_InitStructure);
In L1 series you have to update this code as follows:
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_x ;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AN;
GPIO_InitStructure.GPIO_PuPd = GPIO_PuPd_NOPULL ;
GPIO_Init(GPIOy, &GPIO_InitStructure);



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


bảng dữ liệu tải về

Go To PDF Page


Link URL



Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không?  [ DONATE ] 

Alldatasheet là   |   Quảng cáo   |   Liên lạc với chúng tôi   |   Chính sách bảo mật   |   Liên kết đến bảng dữ liệu    |   Trao đổi link   |   Tìm kiếm theo nhà sản xuất
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