поискавой системы для электроныых деталей
  Russian  ▼
ALLDATASHEETRU.COM

X  

AN4228 датащи(PDF) 43 Page - STMicroelectronics

номер детали AN4228
подробное описание детали  Migrating from STM32F1 to STM32F3 microcontrollers
PDF  90 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
производитель  STMICROELECTRONICS [STMicroelectronics]
домашняя страница  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN4228 датащи(HTML) 43 Page - STMicroelectronics

Back Button AN4228 Datasheet HTML 39Page - STMicroelectronics AN4228 Datasheet HTML 40Page - STMicroelectronics AN4228 Datasheet HTML 41Page - STMicroelectronics AN4228 Datasheet HTML 42Page - STMicroelectronics AN4228 Datasheet HTML 43Page - STMicroelectronics AN4228 Datasheet HTML 44Page - STMicroelectronics AN4228 Datasheet HTML 45Page - STMicroelectronics AN4228 Datasheet HTML 46Page - STMicroelectronics AN4228 Datasheet HTML 47Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 43 / 90 page
background image
DocID024110 Rev 5
43/90
AN4228
Firmware migration using the library
89
has a multiplexer with sixteen alternate function inputs (AF0 to AF15) that can be configured
through the GPIO_PinAFConfig () function:
After reset, all I/Os are connected to the system’s alternate function 0 (AF0)
The peripherals’ alternate functions are mapped by configuring AF0 to AF15.
In addition to this flexible I/O multiplexing architecture, each peripheral has alternate
functions mapped onto different I/O pins to optimize the number of peripheral I/O functions
for different device packages; for example, the USART2_RX pin can be mapped on PA3 or
PA15 pin.
The configuration procedure is the following:
1.
Connect the pin to the desired peripherals' Alternate Function (AF) using
GPIO_PinAFConfig() function
2.
Use GPIO_Init() function to configure the I/O pin:
a)
Configure the desired pin in alternate function mode using
GPIO_InitStructure->GPIO_Mode = GPIO_Mode_AF;
b)
Select the type, pull-up/pull-down and output speed via
GPIO_PuPd, GPIO_OType and GPIO_Speed members
The example below shows how to remap USART2 Tx/Rx I/Os on PD5/PD6 pins in
STM32F1 series:
/* Enable APB2 interface clock for GPIOD and AFIO (AFIO peripheral is used
to configure the I/Os software remapping) */
_APB2PeriphClockCmd(_APB2Periph_GPIOD | _APB2Periph_AFIO, ENABLE);
/* Enable USART2 I/Os software remapping [(USART2_Tx,USART2_Rx):(PD5,PD6)]
*/
GPIO_PinRemapConfig(GPIO_Remap_USART2, ENABLE);
/* Configure USART2_Tx as alternate function push-pull */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_5;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_AF_PP;
GPIO_InitStructure.GPIO_Speed = GPIO_Speed_50MHz;
GPIO_Init(GPIOD, &GPIO_InitStructure);
/* Configure USART2_Rx as input floating */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_6;
GPIO_InitStructure.GPIO_Mode = GPIO_Mode_IN_FLOATING;
GPIO_Init(GPIOD, &GPIO_InitStructure);
In STM32F3 series, update this code as follows:
/* Enable GPIOA's AHB interface clock */
_AHBPeriphClockCmd(_AHBPeriph_GPIOA, ENABLE);
/* Select USART2 I/Os mapping on PA14/15 pins
[(USART2_TX,USART2_RX):(PA.14,PA.15)] */
/* Connect PA14 to USART2_Tx */
GPIO_PinAFConfig(GPIOA, GPIO_PinSource14, GPIO_AF_2);
/* Connect PA15 to USART2_Rx*/
GPIO_PinAFConfig(GPIOA, GPIO_PinSource15, GPIO_AF_2);
/* Configure USART2_Tx and USART2_Rx as alternate function */
GPIO_InitStructure.GPIO_Pin = GPIO_Pin_14 | GPIO_Pin_15;



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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90


датащи скачать

Go To PDF Page


ссылки URL



Вашему бизинису помогли Аллдатащит?  [ DONATE ] 

Что такое Аллдатащит   |   реклама   |   контакт   |   Конфиденциальность   |   Ссылка на техническое описание    |   обмен ссыками   |   поиск по производителю
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