lib_dbg.c

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    Lib_DEBUG/lib_dbg.c 
00004   * @author  MCD Application Team
00005   * @version V3.4.0
00006   * @date    10/15/2010
00007   * @brief   This file provides all peripherals pointers initialization.
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 /* Includes ------------------------------------------------------------------*/
00022 #include "lib_dbg.h"
00023 
00024 /** @addtogroup STM32F10x_StdPeriph_Examples
00025   * @{
00026   */
00027 
00028 /** @addtogroup Lib_DEBUG
00029   * @{
00030   */ 
00031 
00032 /* Private typedef -----------------------------------------------------------*/
00033 /* Private define ------------------------------------------------------------*/
00034 /* Private macro -------------------------------------------------------------*/
00035 /* Private variables ---------------------------------------------------------*/
00036 TIM_TypeDef             *TIM2_DBG;
00037 TIM_TypeDef             *TIM3_DBG;
00038 TIM_TypeDef             *TIM4_DBG;
00039 TIM_TypeDef             *TIM5_DBG;
00040 TIM_TypeDef             *TIM6_DBG;
00041 TIM_TypeDef             *TIM7_DBG;
00042 RTC_TypeDef             *RTC_DBG;
00043 WWDG_TypeDef            *WWDG_DBG;
00044 IWDG_TypeDef            *IWDG_DBG;
00045 SPI_TypeDef             *SPI2_DBG;
00046 SPI_TypeDef             *SPI3_DBG;
00047 USART_TypeDef           *USART2_DBG;
00048 USART_TypeDef           *USART3_DBG;
00049 USART_TypeDef           *UART4_DBG;
00050 USART_TypeDef           *UART5_DBG;
00051 I2C_TypeDef             *I2C1_DBG;
00052 I2C_TypeDef             *I2C2_DBG;
00053 CAN_TypeDef             *CAN1_DBG;
00054 BKP_TypeDef             *BKP_DBG;
00055 PWR_TypeDef             *PWR_DBG;
00056 DAC_TypeDef             *DAC_DBG;
00057 CEC_TypeDef             *CEC_DBG;
00058 AFIO_TypeDef            *AFIO_DBG;
00059 EXTI_TypeDef            *EXTI_DBG;
00060 GPIO_TypeDef            *GPIOA_DBG;
00061 GPIO_TypeDef            *GPIOB_DBG;
00062 GPIO_TypeDef            *GPIOC_DBG;
00063 GPIO_TypeDef            *GPIOD_DBG;
00064 GPIO_TypeDef            *GPIOE_DBG;
00065 GPIO_TypeDef            *GPIOF_DBG;
00066 GPIO_TypeDef            *GPIOG_DBG;
00067 ADC_TypeDef             *ADC1_DBG;
00068 ADC_TypeDef             *ADC2_DBG;
00069 TIM_TypeDef             *TIM1_DBG;
00070 SPI_TypeDef             *SPI1_DBG;
00071 TIM_TypeDef             *TIM8_DBG;
00072 USART_TypeDef           *USART1_DBG;
00073 ADC_TypeDef             *ADC3_DBG;
00074 TIM_TypeDef             *TIM15_DBG;
00075 TIM_TypeDef             *TIM16_DBG;
00076 TIM_TypeDef             *TIM17_DBG;
00077 SDIO_TypeDef            *SDIO_DBG;
00078 DMA_TypeDef             *DMA1_DBG;
00079 DMA_TypeDef             *DMA2_DBG;
00080 DMA_Channel_TypeDef     *DMA1_Channel1_DBG;
00081 DMA_Channel_TypeDef     *DMA1_Channel2_DBG;
00082 DMA_Channel_TypeDef     *DMA1_Channel3_DBG;
00083 DMA_Channel_TypeDef     *DMA1_Channel4_DBG;
00084 DMA_Channel_TypeDef     *DMA1_Channel5_DBG;
00085 DMA_Channel_TypeDef     *DMA1_Channel6_DBG;
00086 DMA_Channel_TypeDef     *DMA1_Channel7_DBG;
00087 DMA_Channel_TypeDef     *DMA2_Channel1_DBG;
00088 DMA_Channel_TypeDef     *DMA2_Channel2_DBG;
00089 DMA_Channel_TypeDef     *DMA2_Channel3_DBG;
00090 DMA_Channel_TypeDef     *DMA2_Channel4_DBG;
00091 DMA_Channel_TypeDef     *DMA2_Channel5_DBG;
00092 RCC_TypeDef             *RCC_DBG;
00093 CRC_TypeDef             *CRC_DBG;
00094 FLASH_TypeDef           *FLASH_DBG;
00095 OB_TypeDef              *OB_DBG;  
00096 FSMC_Bank1_TypeDef      *FSMC_Bank1_DBG;
00097 FSMC_Bank1E_TypeDef     *FSMC_Bank1E_DBG;
00098 FSMC_Bank2_TypeDef      *FSMC_Bank2_DBG;
00099 FSMC_Bank3_TypeDef      *FSMC_Bank3_DBG;
00100 FSMC_Bank4_TypeDef      *FSMC_Bank4_DBG;
00101 DBGMCU_TypeDef          *DBGMCU_DBG;
00102 SysTick_Type            *SysTick_DBG;
00103 NVIC_Type               *NVIC_DBG;
00104 SCB_Type                *SCB_DBG;
00105 
00106 /* Private function prototypes -----------------------------------------------*/
00107 /* Private functions ---------------------------------------------------------*/
00108 
00109 /**
00110   * @brief  This function initialize peripherals pointers.
00111   * @param  None
00112   * @retval None
00113   */
00114 void debug(void)
00115 {
00116 /************************************* ADC ************************************/
00117   ADC1_DBG = (ADC_TypeDef *)  ADC1_BASE;
00118 
00119   ADC2_DBG = (ADC_TypeDef *)  ADC2_BASE;
00120 
00121   ADC3_DBG = (ADC_TypeDef *)  ADC3_BASE;
00122 
00123 /************************************* BKP ************************************/
00124   BKP_DBG = (BKP_TypeDef *)  BKP_BASE;
00125 
00126 /************************************* CAN ************************************/                        
00127   CAN1_DBG = (CAN_TypeDef *)  CAN1_BASE;                        
00128 
00129 /************************************* CEC ************************************/                        
00130   CEC_DBG = (CEC_TypeDef *)  CEC_BASE;  
00131   
00132 /************************************* CRC ************************************/
00133   CRC_DBG = (CRC_TypeDef *)  CRC_BASE;
00134 
00135 /************************************* DAC ************************************/
00136   DAC_DBG = (DAC_TypeDef *)  DAC_BASE;
00137 
00138 /************************************* DBGMCU**********************************/
00139   DBGMCU_DBG = (DBGMCU_TypeDef *)  DBGMCU_BASE;
00140 
00141 
00142 /************************************* DMA ************************************/
00143   DMA1_DBG = (DMA_TypeDef *)  DMA1_BASE;
00144   DMA2_DBG = (DMA_TypeDef *)  DMA2_BASE;
00145 
00146   DMA1_Channel1_DBG = (DMA_Channel_TypeDef *)  DMA1_Channel1_BASE;
00147 
00148   DMA1_Channel2_DBG = (DMA_Channel_TypeDef *)  DMA1_Channel2_BASE;
00149 
00150   DMA1_Channel3_DBG = (DMA_Channel_TypeDef *)  DMA1_Channel3_BASE;
00151 
00152   DMA1_Channel4_DBG = (DMA_Channel_TypeDef *)  DMA1_Channel4_BASE;
00153 
00154   DMA1_Channel5_DBG = (DMA_Channel_TypeDef *)  DMA1_Channel5_BASE;
00155 
00156   DMA1_Channel6_DBG = (DMA_Channel_TypeDef *)  DMA1_Channel6_BASE;
00157 
00158   DMA1_Channel7_DBG = (DMA_Channel_TypeDef *)  DMA1_Channel7_BASE;
00159 
00160   DMA2_Channel1_DBG = (DMA_Channel_TypeDef *)  DMA2_Channel1_BASE;
00161 
00162   DMA2_Channel2_DBG = (DMA_Channel_TypeDef *)  DMA2_Channel2_BASE;
00163 
00164   DMA2_Channel3_DBG = (DMA_Channel_TypeDef *)  DMA2_Channel3_BASE;
00165 
00166   DMA2_Channel4_DBG = (DMA_Channel_TypeDef *)  DMA2_Channel4_BASE;
00167 
00168   DMA2_Channel5_DBG = (DMA_Channel_TypeDef *)  DMA2_Channel5_BASE;
00169 
00170 /************************************* EXTI ***********************************/
00171   EXTI_DBG = (EXTI_TypeDef *)  EXTI_BASE;
00172 
00173 /************************************* FLASH and Option Bytes *****************/
00174   FLASH_DBG = (FLASH_TypeDef *)  FLASH_R_BASE;
00175   OB_DBG = (OB_TypeDef *)        OB_BASE;
00176 
00177 /************************************* FSMC ***********************************/
00178   FSMC_Bank1_DBG = (FSMC_Bank1_TypeDef *)    FSMC_Bank1_R_BASE;
00179   FSMC_Bank1E_DBG = (FSMC_Bank1E_TypeDef *)  FSMC_Bank1E_R_BASE;  
00180   FSMC_Bank2_DBG = (FSMC_Bank2_TypeDef *)    FSMC_Bank2_R_BASE; 
00181   FSMC_Bank3_DBG = (FSMC_Bank3_TypeDef *)    FSMC_Bank3_R_BASE;
00182   FSMC_Bank4_DBG = (FSMC_Bank4_TypeDef *)    FSMC_Bank4_R_BASE;
00183 
00184 /************************************* GPIO ***********************************/
00185   GPIOA_DBG = (GPIO_TypeDef *)  GPIOA_BASE;
00186 
00187   GPIOB_DBG = (GPIO_TypeDef *)  GPIOB_BASE;
00188 
00189   GPIOC_DBG = (GPIO_TypeDef *)  GPIOC_BASE;
00190 
00191   GPIOD_DBG = (GPIO_TypeDef *)  GPIOD_BASE;
00192 
00193   GPIOE_DBG = (GPIO_TypeDef *)  GPIOE_BASE;
00194 
00195   GPIOF_DBG = (GPIO_TypeDef *)  GPIOF_BASE;
00196 
00197   GPIOG_DBG = (GPIO_TypeDef *)  GPIOG_BASE;
00198   
00199   AFIO_DBG = (AFIO_TypeDef *)  AFIO_BASE;
00200 
00201 /************************************* I2C ************************************/
00202   I2C1_DBG = (I2C_TypeDef *)  I2C1_BASE;
00203 
00204   I2C2_DBG = (I2C_TypeDef *)  I2C2_BASE;
00205 
00206 /************************************* IWDG ***********************************/
00207   IWDG_DBG = (IWDG_TypeDef *) IWDG_BASE;
00208 
00209 /************************************* NVIC ***********************************/
00210   NVIC_DBG = (NVIC_Type *)  NVIC_BASE;
00211   SCB_DBG = (SCB_Type *)  SCB_BASE;
00212 
00213 /************************************* PWR ************************************/
00214   PWR_DBG = (PWR_TypeDef *)  PWR_BASE;
00215 
00216 /************************************* RCC ************************************/
00217   RCC_DBG = (RCC_TypeDef *)  RCC_BASE;
00218 
00219 /************************************* RTC ************************************/
00220   RTC_DBG = (RTC_TypeDef *)  RTC_BASE;
00221 
00222 /************************************* SDIO ***********************************/
00223   SDIO_DBG = (SDIO_TypeDef *)  SDIO_BASE;
00224 
00225 /************************************* SPI ************************************/
00226   SPI1_DBG = (SPI_TypeDef *)  SPI1_BASE;
00227 
00228   SPI2_DBG = (SPI_TypeDef *)  SPI2_BASE;
00229 
00230   SPI3_DBG = (SPI_TypeDef *)  SPI3_BASE;
00231 
00232 /************************************* SysTick ********************************/
00233   SysTick_DBG = (SysTick_Type *)  SysTick_BASE;
00234 
00235 /************************************* TIM ************************************/
00236   TIM1_DBG = (TIM_TypeDef *)  TIM1_BASE;
00237 
00238   TIM2_DBG = (TIM_TypeDef *)  TIM2_BASE;
00239 
00240   TIM3_DBG = (TIM_TypeDef *)  TIM3_BASE;
00241 
00242   TIM4_DBG = (TIM_TypeDef *)  TIM4_BASE;
00243 
00244   TIM5_DBG = (TIM_TypeDef *)  TIM5_BASE;
00245 
00246   TIM6_DBG = (TIM_TypeDef *)  TIM6_BASE;
00247 
00248   TIM7_DBG = (TIM_TypeDef *)  TIM7_BASE;
00249 
00250   TIM8_DBG = (TIM_TypeDef *)  TIM8_BASE;
00251   
00252   TIM15_DBG = (TIM_TypeDef *)  TIM15_BASE;
00253 
00254   TIM16_DBG = (TIM_TypeDef *)  TIM16_BASE;
00255 
00256   TIM17_DBG = (TIM_TypeDef *)  TIM17_BASE;      
00257 
00258 /************************************* USART **********************************/
00259   USART1_DBG = (USART_TypeDef *) USART1_BASE;
00260 
00261   USART2_DBG = (USART_TypeDef *) USART2_BASE;
00262 
00263   USART3_DBG = (USART_TypeDef *) USART3_BASE;
00264 
00265   UART4_DBG = (USART_TypeDef *) UART4_BASE;
00266 
00267   UART5_DBG = (USART_TypeDef *) UART5_BASE;
00268 
00269 /************************************* WWDG ***********************************/
00270   WWDG_DBG = (WWDG_TypeDef *)  WWDG_BASE;
00271 }
00272 
00273 /**
00274   * @}
00275   */
00276 
00277 /**
00278   * @}
00279   */
00280   
00281 /******************* (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