STM32F10x_StdPeriph_Examples/FSMC/SRAM_DataMemory/main.c

Go to the documentation of this file.
00001 /**
00002   ******************************************************************************
00003   * @file    FSMC/SRAM_DataMemory/main.c 
00004   * @author  MCD Application Team
00005   * @version V3.4.0
00006   * @date    10/15/2010
00007   * @brief   Main program body
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 "stm32f10x.h"
00023 
00024 /** @addtogroup STM32F10x_StdPeriph_Examples
00025   * @{
00026   */
00027 
00028 /** @addtogroup FSMC_SRAM_DataMemory
00029   * @{
00030   */ 
00031 
00032 /* Private typedef -----------------------------------------------------------*/
00033 /* Private define ------------------------------------------------------------*/
00034 /* Private macro -------------------------------------------------------------*/
00035 /* Private variables ---------------------------------------------------------*/
00036 uint32_t Tab[1024], Index;
00037 __IO uint32_t TabAddr, MSPValue = 0;
00038 
00039 /* Private function prototypes -----------------------------------------------*/
00040 /* Private functions ---------------------------------------------------------*/
00041 
00042 /**
00043   * @brief   Main program.
00044   * @param  None
00045   * @retval None
00046   */
00047 int main(void)
00048 {
00049   /*!< At this stage the microcontroller clock setting is already configured, 
00050        this is done through SystemInit() function which is called from startup
00051        file (startup_stm32f10x_xx.s) before to branch to application main.
00052        To reconfigure the default setting of SystemInit() function, refer to
00053        system_stm32f10x.c file
00054      */     
00055 
00056   for (Index = 0; Index <1024 ; Index++)
00057   {
00058      Tab[Index] =Index;
00059   }
00060 
00061   TabAddr = (uint32_t)Tab; /* should be 0x680xxxxx */
00062 
00063   /* Get main stack pointer value */
00064   MSPValue = __get_MSP(); /* should be 0x680xxxxx */
00065 
00066   /* Infinite loop */
00067   while (1)
00068   {
00069   }
00070 }
00071 
00072 #ifdef  USE_FULL_ASSERT
00073 
00074 /**
00075   * @brief  Reports the name of the source file and the source line number
00076   *         where the assert_param error has occurred.
00077   * @param  file: pointer to the source file name
00078   * @param  line: assert_param error line source number
00079   * @retval None
00080   */
00081 void assert_failed(uint8_t* file, uint32_t line)
00082 { 
00083   /* User can add his own implementation to report the file name and line number,
00084      ex: printf("Wrong parameters value: file %s on line %d\r\n", file, line) */
00085 
00086   /* Infinite loop */
00087   while (1)
00088   {
00089   }
00090 }
00091 #endif
00092 
00093 /**
00094   * @}
00095   */ 
00096 
00097 /**
00098   * @}
00099   */ 
00100 
00101 /******************* (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