USART/DMA_Polling/platform_config.h

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    USART/DMA_Polling/platform_config.h 
00004   * @author  MCD Application Team
00005   * @version V3.4.0
00006   * @date    10/15/2010
00007   * @brief   Evaluation board specific configuration file.
00008   ******************************************************************************
00009   * @copy
00010   *
00011   * THE PRESENT FIRMWARE WHICH IS FOR GUIDANCE ONLY AIMS AT PROVIDING CUSTOMERS
00012   * WITH CODING INFORMATION REGARDING THEIR PRODUCTS IN ORDER FOR THEM TO SAVE
00013   * TIME. AS A RESULT, STMICROELECTRONICS SHALL NOT BE HELD LIABLE FOR ANY
00014   * DIRECT, INDIRECT OR CONSEQUENTIAL DAMAGES WITH RESPECT TO ANY CLAIMS ARISING
00015   * FROM THE CONTENT OF SUCH FIRMWARE AND/OR THE USE MADE BY CUSTOMERS OF THE
00016   * CODING INFORMATION CONTAINED HEREIN IN CONNECTION WITH THEIR PRODUCTS.
00017   *
00018   * <h2><center>&copy; COPYRIGHT 2010 STMicroelectronics</center></h2>
00019   */ 
00020 
00021 /* Define to prevent recursive inclusion -------------------------------------*/
00022 #ifndef __PLATFORM_CONFIG_H
00023 #define __PLATFORM_CONFIG_H
00024 
00025 /* Includes ------------------------------------------------------------------*/
00026 
00027 /* Exported types ------------------------------------------------------------*/
00028 /* Exported constants --------------------------------------------------------*/
00029 /* Uncomment the line corresponding to the STMicroelectronics evaluation board
00030    used to run the example */
00031 #if !defined (USE_STM32100B_EVAL) && !defined (USE_STM3210B_EVAL) &&  !defined (USE_STM3210E_EVAL) &&  !defined (USE_STM3210C_EVAL) &&  !defined (USE_STM32100E_EVAL)
00032  //#define USE_STM32100B_EVAL
00033  //#define USE_STM3210B_EVAL
00034  //#define USE_STM3210E_EVAL
00035  //#define USE_STM32100E_EVAL
00036  #define USE_STM3210C_EVAL 
00037 #endif
00038 
00039 /* Define the STM32F10x hardware depending on the used evaluation board */
00040 #if defined(USE_STM3210B_EVAL) || defined(USE_STM32100B_EVAL)
00041 
00042   #define USARTy                   USART1
00043   #define USARTy_GPIO              GPIOA
00044   #define USARTy_CLK               RCC_APB2Periph_USART1
00045   #define USARTy_GPIO_CLK          RCC_APB2Periph_GPIOA
00046   #define USARTy_RxPin             GPIO_Pin_10
00047   #define USARTy_TxPin             GPIO_Pin_9
00048   #define USARTy_Tx_DMA_Channel    DMA1_Channel4
00049   #define USARTy_Tx_DMA_FLAG       DMA1_FLAG_TC4
00050   #define USARTy_Rx_DMA_Channel    DMA1_Channel5
00051   #define USARTy_Rx_DMA_FLAG       DMA1_FLAG_TC5  
00052   #define USARTy_DR_Base           0x40013804
00053 
00054   #define USARTz                   USART2
00055   #define USARTz_GPIO              GPIOD
00056   #define USARTz_CLK               RCC_APB1Periph_USART2
00057   #define USARTz_GPIO_CLK          RCC_APB2Periph_GPIOD
00058   #define USARTz_RxPin             GPIO_Pin_6
00059   #define USARTz_TxPin             GPIO_Pin_5
00060   #define USARTz_Tx_DMA_Channel    DMA1_Channel7
00061   #define USARTz_Tx_DMA_FLAG       DMA1_FLAG_TC7
00062   #define USARTz_Rx_DMA_Channel    DMA1_Channel6
00063   #define USARTz_Rx_DMA_FLAG       DMA1_FLAG_TC6 
00064   #define USARTz_DR_Base           0x40004404
00065 
00066 #elif defined USE_STM3210E_EVAL || defined(USE_STM32100E_EVAL)
00067 
00068   #define USARTy                   USART1
00069   #define USARTy_GPIO              GPIOA
00070   #define USARTy_CLK               RCC_APB2Periph_USART1
00071   #define USARTy_GPIO_CLK          RCC_APB2Periph_GPIOA
00072   #define USARTy_RxPin             GPIO_Pin_10
00073   #define USARTy_TxPin             GPIO_Pin_9
00074   #define USARTy_Tx_DMA_Channel    DMA1_Channel4
00075   #define USARTy_Tx_DMA_FLAG       DMA1_FLAG_TC4
00076   #define USARTy_Rx_DMA_Channel    DMA1_Channel5
00077   #define USARTy_Rx_DMA_FLAG       DMA1_FLAG_TC5  
00078   #define USARTy_DR_Base           0x40013804
00079 
00080   #define USARTz                   USART2
00081   #define USARTz_GPIO              GPIOA
00082   #define USARTz_CLK               RCC_APB1Periph_USART2
00083   #define USARTz_GPIO_CLK          RCC_APB2Periph_GPIOA
00084   #define USARTz_RxPin             GPIO_Pin_3
00085   #define USARTz_TxPin             GPIO_Pin_2
00086   #define USARTz_Tx_DMA_Channel    DMA1_Channel7
00087   #define USARTz_Tx_DMA_FLAG       DMA1_FLAG_TC7
00088   #define USARTz_Rx_DMA_Channel    DMA1_Channel6
00089   #define USARTz_Rx_DMA_FLAG       DMA1_FLAG_TC6  
00090   #define USARTz_DR_Base           0x40004404
00091 
00092 #elif defined USE_STM3210C_EVAL
00093 
00094   #define USARTy                   USART2
00095   #define USARTy_GPIO              GPIOD
00096   #define USARTy_CLK               RCC_APB1Periph_USART2
00097   #define USARTy_GPIO_CLK          RCC_APB2Periph_GPIOD
00098   #define USARTy_RxPin             GPIO_Pin_6
00099   #define USARTy_TxPin             GPIO_Pin_5
00100   #define USARTy_Tx_DMA_Channel    DMA1_Channel7
00101   #define USARTy_Tx_DMA_FLAG       DMA1_FLAG_TC7
00102   #define USARTy_Rx_DMA_Channel    DMA1_Channel6
00103   #define USARTy_Rx_DMA_FLAG       DMA1_FLAG_TC6  
00104   #define USARTy_DR_Base           0x40004404
00105 
00106   #define USARTz                   USART3
00107   #define USARTz_GPIO              GPIOC
00108   #define USARTz_CLK               RCC_APB1Periph_USART3
00109   #define USARTz_GPIO_CLK          RCC_APB2Periph_GPIOC
00110   #define USARTz_RxPin             GPIO_Pin_11
00111   #define USARTz_TxPin             GPIO_Pin_10
00112   #define USARTz_Tx_DMA_Channel    DMA1_Channel2
00113   #define USARTz_Tx_DMA_FLAG       DMA1_FLAG_TC2
00114   #define USARTz_Rx_DMA_Channel    DMA1_Channel3
00115   #define USARTz_Rx_DMA_FLAG       DMA1_FLAG_TC3  
00116   #define USARTz_DR_Base           0x40004804
00117   
00118 #endif /* USE_STM3210B_EVAL */
00119 
00120 /* Exported macro ------------------------------------------------------------*/
00121 /* Exported functions ------------------------------------------------------- */
00122 
00123 #endif /* __PLATFORM_CONFIG_H */
00124 
00125 /******************* (C) COPYRIGHT 2010 STMicroelectronics *****END OF FILE****/
STM32F10x Standard Peripherals Library: Footer

 

 

 

      For complete documentation on STM32(CORTEX M3) 32-bit Microcontrollers platform visit  www.st.com/STM32