system_stm32f4xx.c 21 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  1. /*
  2. ******************************************************************************
  3. * @file system_stm32f4xx.c
  4. * @author MCD Application Team
  5. * @version V1.0.2
  6. * @date 05-March-2012
  7. * @brief CMSIS Cortex-M4 Device Peripheral Access Layer System Source File.
  8. * This file contains the system clock configuration for STM32F4xx devices,
  9. * and is generated by the clock configuration tool
  10. * stm32f4xx_Clock_Configuration_V1.0.1.xls
  11. *
  12. * 1. This file provides two functions and one global variable to be called from
  13. * user application:
  14. * - SystemInit(): Setups the system clock (System clock source, PLL Multiplier
  15. * and Divider factors, AHB/APBx prescalers and Flash settings),
  16. * depending on the configuration made in the clock xls tool.
  17. * This function is called at startup just after reset and
  18. * before branch to main program. This call is made inside
  19. * the "startup_stm32f4xx.s" file.
  20. *
  21. * - SystemCoreClock variable: Contains the core clock (HCLK), it can be used
  22. * by the user application to setup the SysTick
  23. * timer or configure other parameters.
  24. *
  25. * - SystemCoreClockUpdate(): Updates the variable SystemCoreClock and must
  26. * be called whenever the core clock is changed
  27. * during program execution.
  28. *
  29. * 2. After each device reset the HSI (16 MHz) is used as system clock source.
  30. * Then SystemInit() function is called, in "startup_stm32f4xx.s" file, to
  31. * configure the system clock before to branch to main program.
  32. *
  33. * 3. If the system clock source selected by user fails to startup, the SystemInit()
  34. * function will do nothing and HSI still used as system clock source. User can
  35. * add some code to deal with this issue inside the SetSysClock() function.
  36. *
  37. * 4. The default value of HSE crystal is set to 25MHz, refer to "HSE_VALUE" define
  38. * in "stm32f4xx.h" file. When HSE is used as system clock source, directly or
  39. * through PLL, and you are using different crystal you have to adapt the HSE
  40. * value to your own configuration.
  41. *
  42. * 5. This file configures the system clock as follows:
  43. *=============================================================================
  44. *=============================================================================
  45. * Supported STM32F4xx device revision | Rev A
  46. *-----------------------------------------------------------------------------
  47. * System Clock source | PLL (HSE)
  48. *-----------------------------------------------------------------------------
  49. * SYSCLK(Hz) | 168000000
  50. *-----------------------------------------------------------------------------
  51. * HCLK(Hz) | 168000000
  52. *-----------------------------------------------------------------------------
  53. * AHB Prescaler | 1
  54. *-----------------------------------------------------------------------------
  55. * APB1 Prescaler | 4
  56. *-----------------------------------------------------------------------------
  57. * APB2 Prescaler | 2
  58. *-----------------------------------------------------------------------------
  59. * HSE Frequency(Hz) | 25000000
  60. *-----------------------------------------------------------------------------
  61. * PLL_M | 25
  62. *-----------------------------------------------------------------------------
  63. * PLL_N | 336
  64. *-----------------------------------------------------------------------------
  65. * PLL_P | 2
  66. *-----------------------------------------------------------------------------
  67. * PLL_Q | 7
  68. *-----------------------------------------------------------------------------
  69. * PLLI2S_N | NA
  70. *-----------------------------------------------------------------------------
  71. * PLLI2S_R | NA
  72. *-----------------------------------------------------------------------------
  73. * I2S input clock | NA
  74. *-----------------------------------------------------------------------------
  75. * VDD(V) | 3.3
  76. *-----------------------------------------------------------------------------
  77. * Main regulator output voltage | Scale1 mode
  78. *-----------------------------------------------------------------------------
  79. * Flash Latency(WS) | 5
  80. *-----------------------------------------------------------------------------
  81. * Prefetch Buffer | OFF
  82. *-----------------------------------------------------------------------------
  83. * Instruction cache | ON
  84. *-----------------------------------------------------------------------------
  85. * Data cache | ON
  86. *-----------------------------------------------------------------------------
  87. * Require 48MHz for USB OTG FS, | Enabled
  88. * SDIO and RNG clock |
  89. *-----------------------------------------------------------------------------
  90. *=============================================================================
  91. ******************************************************************************
  92. * @attention
  93. *
  94. * <h2><center>&copy; COPYRIGHT 2012 STMicroelectronics</center></h2>
  95. *
  96. * Licensed under MCD-ST Liberty SW License Agreement V2, (the "License");
  97. * You may not use this file except in compliance with the License.
  98. * You may obtain a copy of the License at:
  99. *
  100. * http://www.st.com/software_license_agreement_liberty_v2
  101. *
  102. * Unless required by applicable law or agreed to in writing, software
  103. * distributed under the License is distributed on an "AS IS" BASIS,
  104. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  105. * See the License for the specific language governing permissions and
  106. * limitations under the License.
  107. *
  108. ******************************************************************************
  109. */
  110. /** @addtogroup CMSIS
  111. * @{
  112. */
  113. /** @addtogroup stm32f4xx_system
  114. * @{
  115. */
  116. /** @addtogroup STM32F4xx_System_Private_Includes
  117. * @{
  118. */
  119. #include "stm32f4xx.h"
  120. /**
  121. * @}
  122. */
  123. /** @addtogroup STM32F4xx_System_Private_TypesDefinitions
  124. * @{
  125. */
  126. /**
  127. * @}
  128. */
  129. /** @addtogroup STM32F4xx_System_Private_Defines
  130. * @{
  131. */
  132. /************************* Miscellaneous Configuration ************************/
  133. /*!< Uncomment the following line if you need to use external SRAM mounted
  134. on STM324xG_EVAL board as data memory */
  135. /* #define DATA_IN_ExtSRAM */
  136. /*!< Uncomment the following line if you need to relocate your vector Table in
  137. Internal SRAM. */
  138. /* #define VECT_TAB_SRAM */
  139. #define VECT_TAB_OFFSET 0x00 /*!< Vector Table base offset field.
  140. This value must be a multiple of 0x200. */
  141. /******************************************************************************/
  142. /************************* PLL Parameters *************************************/
  143. /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N */
  144. #define PLL_M 25
  145. #define PLL_N 336
  146. /* SYSCLK = PLL_VCO / PLL_P */
  147. #define PLL_P 2
  148. /* USB OTG FS, SDIO and RNG Clock = PLL_VCO / PLLQ */
  149. #define PLL_Q 7
  150. /******************************************************************************/
  151. /**
  152. * @}
  153. */
  154. /** @addtogroup STM32F4xx_System_Private_Macros
  155. * @{
  156. */
  157. /**
  158. * @}
  159. */
  160. /** @addtogroup STM32F4xx_System_Private_Variables
  161. * @{
  162. */
  163. uint32_t SystemCoreClock = 168000000;
  164. __I uint8_t AHBPrescTable[16] = {0, 0, 0, 0, 0, 0, 0, 0, 1, 2, 3, 4, 6, 7, 8, 9};
  165. /**
  166. * @}
  167. */
  168. /** @addtogroup STM32F4xx_System_Private_FunctionPrototypes
  169. * @{
  170. */
  171. static void SetSysClock(void);
  172. #ifdef DATA_IN_ExtSRAM
  173. static void SystemInit_ExtMemCtl(void);
  174. #endif /* DATA_IN_ExtSRAM */
  175. /**
  176. * @}
  177. */
  178. /** @addtogroup STM32F4xx_System_Private_Functions
  179. * @{
  180. */
  181. /**
  182. * @brief Setup the microcontroller system
  183. * Initialize the Embedded Flash Interface, the PLL and update the
  184. * SystemFrequency variable.
  185. * @param None
  186. * @retval None
  187. */
  188. void SystemInit(void)
  189. {
  190. /* FPU settings ------------------------------------------------------------*/
  191. #if (__FPU_PRESENT == 1) && (__FPU_USED == 1)
  192. SCB->CPACR |= ((3UL << 10*2)|(3UL << 11*2)); /* set CP10 and CP11 Full Access */
  193. #endif
  194. /* Reset the RCC clock configuration to the default reset state ------------*/
  195. /* Set HSION bit */
  196. RCC->CR |= (uint32_t)0x00000001;
  197. /* Reset CFGR register */
  198. RCC->CFGR = 0x00000000;
  199. /* Reset HSEON, CSSON and PLLON bits */
  200. RCC->CR &= (uint32_t)0xFEF6FFFF;
  201. /* Reset PLLCFGR register */
  202. RCC->PLLCFGR = 0x24003010;
  203. /* Reset HSEBYP bit */
  204. RCC->CR &= (uint32_t)0xFFFBFFFF;
  205. /* Disable all interrupts */
  206. RCC->CIR = 0x00000000;
  207. #ifdef DATA_IN_ExtSRAM
  208. SystemInit_ExtMemCtl();
  209. #endif /* DATA_IN_ExtSRAM */
  210. /* Configure the System clock source, PLL Multiplier and Divider factors,
  211. AHB/APBx prescalers and Flash settings ----------------------------------*/
  212. SetSysClock();
  213. /* Configure the Vector Table location add offset address ------------------*/
  214. #ifdef VECT_TAB_SRAM
  215. SCB->VTOR = SRAM_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal SRAM */
  216. #else
  217. SCB->VTOR = FLASH_BASE | VECT_TAB_OFFSET; /* Vector Table Relocation in Internal FLASH */
  218. #endif
  219. }
  220. /**
  221. * @brief Update SystemCoreClock variable according to Clock Register Values.
  222. * The SystemCoreClock variable contains the core clock (HCLK), it can
  223. * be used by the user application to setup the SysTick timer or configure
  224. * other parameters.
  225. *
  226. * @note Each time the core clock (HCLK) changes, this function must be called
  227. * to update SystemCoreClock variable value. Otherwise, any configuration
  228. * based on this variable will be incorrect.
  229. *
  230. * @note - The system frequency computed by this function is not the real
  231. * frequency in the chip. It is calculated based on the predefined
  232. * constant and the selected clock source:
  233. *
  234. * - If SYSCLK source is HSI, SystemCoreClock will contain the HSI_VALUE(*)
  235. *
  236. * - If SYSCLK source is HSE, SystemCoreClock will contain the HSE_VALUE(**)
  237. *
  238. * - If SYSCLK source is PLL, SystemCoreClock will contain the HSE_VALUE(**)
  239. * or HSI_VALUE(*) multiplied/divided by the PLL factors.
  240. *
  241. * (*) HSI_VALUE is a constant defined in stm32f4xx.h file (default value
  242. * 16 MHz) but the real value may vary depending on the variations
  243. * in voltage and temperature.
  244. *
  245. * (**) HSE_VALUE is a constant defined in stm32f4xx.h file (default value
  246. * 25 MHz), user has to ensure that HSE_VALUE is same as the real
  247. * frequency of the crystal used. Otherwise, this function may
  248. * have wrong result.
  249. *
  250. * - The result of this function could be not correct when using fractional
  251. * value for HSE crystal.
  252. *
  253. * @param None
  254. * @retval None
  255. */
  256. void SystemCoreClockUpdate(void)
  257. {
  258. uint32_t tmp = 0, pllvco = 0, pllp = 2, pllsource = 0, pllm = 2;
  259. /* Get SYSCLK source -------------------------------------------------------*/
  260. tmp = RCC->CFGR & RCC_CFGR_SWS;
  261. switch (tmp)
  262. {
  263. case 0x00: /* HSI used as system clock source */
  264. SystemCoreClock = HSI_VALUE;
  265. break;
  266. case 0x04: /* HSE used as system clock source */
  267. SystemCoreClock = HSE_VALUE;
  268. break;
  269. case 0x08: /* PLL used as system clock source */
  270. /* PLL_VCO = (HSE_VALUE or HSI_VALUE / PLL_M) * PLL_N
  271. SYSCLK = PLL_VCO / PLL_P
  272. */
  273. pllsource = (RCC->PLLCFGR & RCC_PLLCFGR_PLLSRC) >> 22;
  274. pllm = RCC->PLLCFGR & RCC_PLLCFGR_PLLM;
  275. if (pllsource != 0)
  276. {
  277. /* HSE used as PLL clock source */
  278. pllvco = (HSE_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6);
  279. }
  280. else
  281. {
  282. /* HSI used as PLL clock source */
  283. pllvco = (HSI_VALUE / pllm) * ((RCC->PLLCFGR & RCC_PLLCFGR_PLLN) >> 6);
  284. }
  285. pllp = (((RCC->PLLCFGR & RCC_PLLCFGR_PLLP) >>16) + 1 ) *2;
  286. SystemCoreClock = pllvco/pllp;
  287. break;
  288. default:
  289. SystemCoreClock = HSI_VALUE;
  290. break;
  291. }
  292. /* Compute HCLK frequency --------------------------------------------------*/
  293. /* Get HCLK prescaler */
  294. tmp = AHBPrescTable[((RCC->CFGR & RCC_CFGR_HPRE) >> 4)];
  295. /* HCLK frequency */
  296. SystemCoreClock >>= tmp;
  297. }
  298. /**
  299. * @brief Configures the System clock source, PLL Multiplier and Divider factors,
  300. * AHB/APBx prescalers and Flash settings
  301. * @Note This function should be called only once the RCC clock configuration
  302. * is reset to the default reset state (done in SystemInit() function).
  303. * @param None
  304. * @retval None
  305. */
  306. static void SetSysClock(void)
  307. {
  308. /******************************************************************************/
  309. /* PLL (clocked by HSE) used as System clock source */
  310. /******************************************************************************/
  311. __IO uint32_t StartUpCounter = 0, HSEStatus = 0;
  312. /* Enable HSE */
  313. RCC->CR |= ((uint32_t)RCC_CR_HSEON);
  314. /* Wait till HSE is ready and if Time out is reached exit */
  315. do
  316. {
  317. HSEStatus = RCC->CR & RCC_CR_HSERDY;
  318. StartUpCounter++;
  319. } while((HSEStatus == 0) && (StartUpCounter != HSE_STARTUP_TIMEOUT));
  320. if ((RCC->CR & RCC_CR_HSERDY) != RESET)
  321. {
  322. HSEStatus = (uint32_t)0x01;
  323. }
  324. else
  325. {
  326. HSEStatus = (uint32_t)0x00;
  327. }
  328. if (HSEStatus == (uint32_t)0x01)
  329. {
  330. /* Select regulator voltage output Scale 1 mode, System frequency up to 168 MHz */
  331. RCC->APB1ENR |= RCC_APB1ENR_PWREN;
  332. PWR->CR |= PWR_CR_VOS;
  333. /* HCLK = SYSCLK / 1*/
  334. RCC->CFGR |= RCC_CFGR_HPRE_DIV1;
  335. /* PCLK2 = HCLK / 2*/
  336. RCC->CFGR |= RCC_CFGR_PPRE2_DIV2;
  337. /* PCLK1 = HCLK / 4*/
  338. RCC->CFGR |= RCC_CFGR_PPRE1_DIV4;
  339. /* Configure the main PLL */
  340. RCC->PLLCFGR = PLL_M | (PLL_N << 6) | (((PLL_P >> 1) -1) << 16) |
  341. (RCC_PLLCFGR_PLLSRC_HSE) | (PLL_Q << 24);
  342. /* Enable the main PLL */
  343. RCC->CR |= RCC_CR_PLLON;
  344. /* Wait till the main PLL is ready */
  345. while((RCC->CR & RCC_CR_PLLRDY) == 0)
  346. {
  347. }
  348. /* Configure Flash prefetch, Instruction cache, Data cache and wait state */
  349. FLASH->ACR = FLASH_ACR_ICEN |FLASH_ACR_DCEN |FLASH_ACR_LATENCY_5WS;
  350. /* Select the main PLL as system clock source */
  351. RCC->CFGR &= (uint32_t)((uint32_t)~(RCC_CFGR_SW));
  352. RCC->CFGR |= RCC_CFGR_SW_PLL;
  353. /* Wait till the main PLL is used as system clock source */
  354. while ((RCC->CFGR & (uint32_t)RCC_CFGR_SWS ) != RCC_CFGR_SWS_PLL);
  355. {
  356. }
  357. /* Добавил переход на внутренний генератор в случае отказа HSE */
  358. RCC->CR|=RCC_CR_CSSON;
  359. }
  360. else
  361. { /* If HSE fails to start-up, the application will have wrong clock
  362. configuration. User can add here some code to deal with this error */
  363. }
  364. }
  365. /**
  366. * @brief Setup the external memory controller. Called in startup_stm32f4xx.s
  367. * before jump to __main
  368. * @param None
  369. * @retval None
  370. */
  371. #ifdef DATA_IN_ExtSRAM
  372. /**
  373. * @brief Setup the external memory controller.
  374. * Called in startup_stm32f4xx.s before jump to main.
  375. * This function configures the external SRAM mounted on STM324xG_EVAL board
  376. * This SRAM will be used as program data memory (including heap and stack).
  377. * @param None
  378. * @retval None
  379. */
  380. void SystemInit_ExtMemCtl(void)
  381. {
  382. /*-- GPIOs Configuration -----------------------------------------------------*/
  383. /*
  384. +-------------------+--------------------+------------------+------------------+
  385. + SRAM pins assignment +
  386. +-------------------+--------------------+------------------+------------------+
  387. | PD0 <-> FSMC_D2 | PE0 <-> FSMC_NBL0 | PF0 <-> FSMC_A0 | PG0 <-> FSMC_A10 |
  388. | PD1 <-> FSMC_D3 | PE1 <-> FSMC_NBL1 | PF1 <-> FSMC_A1 | PG1 <-> FSMC_A11 |
  389. | PD4 <-> FSMC_NOE | PE3 <-> FSMC_A19 | PF2 <-> FSMC_A2 | PG2 <-> FSMC_A12 |
  390. | PD5 <-> FSMC_NWE | PE4 <-> FSMC_A20 | PF3 <-> FSMC_A3 | PG3 <-> FSMC_A13 |
  391. | PD8 <-> FSMC_D13 | PE7 <-> FSMC_D4 | PF4 <-> FSMC_A4 | PG4 <-> FSMC_A14 |
  392. | PD9 <-> FSMC_D14 | PE8 <-> FSMC_D5 | PF5 <-> FSMC_A5 | PG5 <-> FSMC_A15 |
  393. | PD10 <-> FSMC_D15 | PE9 <-> FSMC_D6 | PF12 <-> FSMC_A6 | PG9 <-> FSMC_NE2 |
  394. | PD11 <-> FSMC_A16 | PE10 <-> FSMC_D7 | PF13 <-> FSMC_A7 |------------------+
  395. | PD12 <-> FSMC_A17 | PE11 <-> FSMC_D8 | PF14 <-> FSMC_A8 |
  396. | PD13 <-> FSMC_A18 | PE12 <-> FSMC_D9 | PF15 <-> FSMC_A9 |
  397. | PD14 <-> FSMC_D0 | PE13 <-> FSMC_D10 |------------------+
  398. | PD15 <-> FSMC_D1 | PE14 <-> FSMC_D11 |
  399. | | PE15 <-> FSMC_D12 |
  400. +-------------------+--------------------+
  401. */
  402. /* Enable GPIOD, GPIOE, GPIOF and GPIOG interface clock */
  403. RCC->AHB1ENR = 0x00000078;
  404. /* Connect PDx pins to FSMC Alternate function */
  405. GPIOD->AFR[0] = 0x00cc00cc;
  406. GPIOD->AFR[1] = 0xcc0ccccc;
  407. /* Configure PDx pins in Alternate function mode */
  408. GPIOD->MODER = 0xaaaa0a0a;
  409. /* Configure PDx pins speed to 100 MHz */
  410. GPIOD->OSPEEDR = 0xffff0f0f;
  411. /* Configure PDx pins Output type to push-pull */
  412. GPIOD->OTYPER = 0x00000000;
  413. /* No pull-up, pull-down for PDx pins */
  414. GPIOD->PUPDR = 0x00000000;
  415. /* Connect PEx pins to FSMC Alternate function */
  416. GPIOE->AFR[0] = 0xc00cc0cc;
  417. GPIOE->AFR[1] = 0xcccccccc;
  418. /* Configure PEx pins in Alternate function mode */
  419. GPIOE->MODER = 0xaaaa828a;
  420. /* Configure PEx pins speed to 100 MHz */
  421. GPIOE->OSPEEDR = 0xffffc3cf;
  422. /* Configure PEx pins Output type to push-pull */
  423. GPIOE->OTYPER = 0x00000000;
  424. /* No pull-up, pull-down for PEx pins */
  425. GPIOE->PUPDR = 0x00000000;
  426. /* Connect PFx pins to FSMC Alternate function */
  427. GPIOF->AFR[0] = 0x00cccccc;
  428. GPIOF->AFR[1] = 0xcccc0000;
  429. /* Configure PFx pins in Alternate function mode */
  430. GPIOF->MODER = 0xaa000aaa;
  431. /* Configure PFx pins speed to 100 MHz */
  432. GPIOF->OSPEEDR = 0xff000fff;
  433. /* Configure PFx pins Output type to push-pull */
  434. GPIOF->OTYPER = 0x00000000;
  435. /* No pull-up, pull-down for PFx pins */
  436. GPIOF->PUPDR = 0x00000000;
  437. /* Connect PGx pins to FSMC Alternate function */
  438. GPIOG->AFR[0] = 0x00cccccc;
  439. GPIOG->AFR[1] = 0x000000c0;
  440. /* Configure PGx pins in Alternate function mode */
  441. GPIOG->MODER = 0x00080aaa;
  442. /* Configure PGx pins speed to 100 MHz */
  443. GPIOG->OSPEEDR = 0x000c0fff;
  444. /* Configure PGx pins Output type to push-pull */
  445. GPIOG->OTYPER = 0x00000000;
  446. /* No pull-up, pull-down for PGx pins */
  447. GPIOG->PUPDR = 0x00000000;
  448. /*-- FSMC Configuration ------------------------------------------------------*/
  449. /* Enable the FSMC interface clock */
  450. RCC->AHB3ENR = 0x00000001;
  451. /* Configure and enable Bank1_SRAM2 */
  452. FSMC_Bank1->BTCR[2] = 0x00001015;
  453. FSMC_Bank1->BTCR[3] = 0x00010603;
  454. FSMC_Bank1E->BWTR[2] = 0x0fffffff;
  455. /*
  456. Bank1_SRAM2 is configured as follow:
  457. p.FSMC_AddressSetupTime = 3;
  458. p.FSMC_AddressHoldTime = 0;
  459. p.FSMC_DataSetupTime = 6;
  460. p.FSMC_BusTurnAroundDuration = 1;
  461. p.FSMC_CLKDivision = 0;
  462. p.FSMC_DataLatency = 0;
  463. p.FSMC_AccessMode = FSMC_AccessMode_A;
  464. FSMC_NORSRAMInitStructure.FSMC_Bank = FSMC_Bank1_NORSRAM2;
  465. FSMC_NORSRAMInitStructure.FSMC_DataAddressMux = FSMC_DataAddressMux_Disable;
  466. FSMC_NORSRAMInitStructure.FSMC_MemoryType = FSMC_MemoryType_PSRAM;
  467. FSMC_NORSRAMInitStructure.FSMC_MemoryDataWidth = FSMC_MemoryDataWidth_16b;
  468. FSMC_NORSRAMInitStructure.FSMC_BurstAccessMode = FSMC_BurstAccessMode_Disable;
  469. FSMC_NORSRAMInitStructure.FSMC_AsynchronousWait = FSMC_AsynchronousWait_Disable;
  470. FSMC_NORSRAMInitStructure.FSMC_WaitSignalPolarity = FSMC_WaitSignalPolarity_Low;
  471. FSMC_NORSRAMInitStructure.FSMC_WrapMode = FSMC_WrapMode_Disable;
  472. FSMC_NORSRAMInitStructure.FSMC_WaitSignalActive = FSMC_WaitSignalActive_BeforeWaitState;
  473. FSMC_NORSRAMInitStructure.FSMC_WriteOperation = FSMC_WriteOperation_Enable;
  474. FSMC_NORSRAMInitStructure.FSMC_WaitSignal = FSMC_WaitSignal_Disable;
  475. FSMC_NORSRAMInitStructure.FSMC_ExtendedMode = FSMC_ExtendedMode_Disable;
  476. FSMC_NORSRAMInitStructure.FSMC_WriteBurst = FSMC_WriteBurst_Disable;
  477. FSMC_NORSRAMInitStructure.FSMC_ReadWriteTimingStruct = &p;
  478. FSMC_NORSRAMInitStructure.FSMC_WriteTimingStruct = &p;
  479. */
  480. }
  481. #endif /* DATA_IN_ExtSRAM */
  482. /**
  483. * @}
  484. */
  485. /**
  486. * @}
  487. */
  488. /**
  489. * @}
  490. */
  491. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/