Electronic Components Datasheet Search
  English  ▼

X  

AN2776 Datasheet(PDF) 13 Page - STMicroelectronics

Part # AN2776
Description  The purpose of this application note is to explain
PDF  20 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Manufacturer  STMICROELECTRONICS [STMicroelectronics]
Direct Link  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2776 Datasheet(HTML) 13 Page - STMicroelectronics

Back Button AN2776 Datasheet HTML 9Page - STMicroelectronics AN2776 Datasheet HTML 10Page - STMicroelectronics AN2776 Datasheet HTML 11Page - STMicroelectronics AN2776 Datasheet HTML 12Page - STMicroelectronics AN2776 Datasheet HTML 13Page - STMicroelectronics AN2776 Datasheet HTML 14Page - STMicroelectronics AN2776 Datasheet HTML 15Page - STMicroelectronics AN2776 Datasheet HTML 16Page - STMicroelectronics AN2776 Datasheet HTML 17Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 13 / 20 page
background image
AN2776
FWLib V1.0 to V2.0 migration steps
13/20
2.2.4
DMA
In FWLib V1.0, the stm32f10x_dma.c/stm32f10x_dma.h driver is used to cover the
functionality of the DMA controller and its seven channels. The function format in this driver
is as follows:
DMA_FunctionName(DMA_Channelx, param1, param2,...)
e.g.: DMA_ITConfig(DMA_Channel_TypeDef* DMA_Channelx, u32 DMA_IT, FunctionalState
NewState)
In FWLib V2.0, this driver was updated to support the new DMA2 controller and the five
associated channels present in High-density devices. The function names are unchanged
compared to FWLib V1.0, only the passed parameter has been updated to cover the DMA1
(DMA in Medium-density devices) and DMA2 controllers. This gives the following function
format:
DMA_FunctionName(DMA
y_Channelx, param1, param2,...)
e.g.: DMA_ITConfig(DMA_Channel_TypeDef* DMA
y_Channelx, u32 DMA_IT, FunctionalState
NewState)
As a result, in code based on FWLib V1.0, only the DMA_Channel_TypeDef parameter
name needs updating.
Example: Typical code for DMA enable and interrupt configuration based on FWLib V1.0:
DMA_Cmd(DMA_Channel5, ENABLE)
DMA_ITConfig(DMA_Channel6, DMA_IT_TC, ENABLE)
Using FWLib V2.0, this code is:
DMA_Cmd(DMA
1_Channel5, ENABLE)
DMA_ITConfig(DMA
1_Channel6, DMA_IT_TC, ENABLE)
Example: Typical code to check whether DMA Channel6 flag is set, based on FWLib V1.0:
/* Test if DMA Channel6 transfer complete flag is set or not */
FlagStatus Status;
Status = DMA_GetFlagStatus(DMA_FLAG_TC6);
Using FWLib V2.0, this code is:
/* Test if DMA1 Channel6 transfer complete flag is set or not */
FlagStatus Status;
Status = DMA_GetFlagStatus(DMA1_FLAG_TC6);
2.2.5
USART
In FWLib V1.0, the stm32f10x_usart.c/stm32f10x_usart.h driver is used to cover
the functionality of the USART1, USART2 and USART3 peripherals. In this driver, the
USART is configured through the USART_Init function, which takes the
USART_InitTypeDef structure as a parameter. It is the structure that contains the
configuration information:
USART_Init(USART_TypeDef* USARTx, USART_InitTypeDef* USART_InitStruct)
The USART_InitTypeDef structure is defined as shown below:
typedef struct
{
u32 USART_BaudRate;
u16 USART_WordLength;
u16 USART_StopBits;
u16 USART_Parity;
u16 USART_HardwareFlowControl;
u16 USART_Mode;
u16 USART_Clock;
u16 USART_CPOL;
u16 USART_CPHA;
u16 USART_LastBit;



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20


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