1
0

stm32f7xx_hal_msp.c 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * File Name : stm32f7xx_hal_msp.c
  5. * Description : This file provides code for the MSP Initialization
  6. * and de-Initialization codes.
  7. ******************************************************************************
  8. ** This notice applies to any and all portions of this file
  9. * that are not between comment pairs USER CODE BEGIN and
  10. * USER CODE END. Other portions of this file, whether
  11. * inserted by the user or by software development tools
  12. * are owned by their respective copyright owners.
  13. *
  14. * COPYRIGHT(c) 2018 STMicroelectronics
  15. *
  16. * Redistribution and use in source and binary forms, with or without modification,
  17. * are permitted provided that the following conditions are met:
  18. * 1. Redistributions of source code must retain the above copyright notice,
  19. * this list of conditions and the following disclaimer.
  20. * 2. Redistributions in binary form must reproduce the above copyright notice,
  21. * this list of conditions and the following disclaimer in the documentation
  22. * and/or other materials provided with the distribution.
  23. * 3. Neither the name of STMicroelectronics nor the names of its contributors
  24. * may be used to endorse or promote products derived from this software
  25. * without specific prior written permission.
  26. *
  27. * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
  28. * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  29. * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
  30. * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
  31. * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  32. * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
  33. * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
  34. * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
  35. * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
  36. * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  37. *
  38. ******************************************************************************
  39. */
  40. /* USER CODE END Header */
  41. /* Includes ------------------------------------------------------------------*/
  42. #include "main.h"
  43. /* USER CODE BEGIN Includes */
  44. /* USER CODE END Includes */
  45. /* Private typedef -----------------------------------------------------------*/
  46. /* USER CODE BEGIN TD */
  47. /* USER CODE END TD */
  48. /* Private define ------------------------------------------------------------*/
  49. /* USER CODE BEGIN Define */
  50. /* USER CODE END Define */
  51. /* Private macro -------------------------------------------------------------*/
  52. /* USER CODE BEGIN Macro */
  53. /* USER CODE END Macro */
  54. /* Private variables ---------------------------------------------------------*/
  55. /* USER CODE BEGIN PV */
  56. /* USER CODE END PV */
  57. /* Private function prototypes -----------------------------------------------*/
  58. /* USER CODE BEGIN PFP */
  59. /* USER CODE END PFP */
  60. /* External functions --------------------------------------------------------*/
  61. /* USER CODE BEGIN ExternalFunctions */
  62. /* USER CODE END ExternalFunctions */
  63. /* USER CODE BEGIN 0 */
  64. /* USER CODE END 0 */
  65. /**
  66. * Initializes the Global MSP.
  67. */
  68. void HAL_MspInit(void)
  69. {
  70. /* USER CODE BEGIN MspInit 0 */
  71. /* USER CODE END MspInit 0 */
  72. __HAL_RCC_PWR_CLK_ENABLE();
  73. __HAL_RCC_SYSCFG_CLK_ENABLE();
  74. /* System interrupt init*/
  75. /* USER CODE BEGIN MspInit 1 */
  76. /* USER CODE END MspInit 1 */
  77. }
  78. /**
  79. * @brief ADC MSP Initialization
  80. * This function configures the hardware resources used in this example
  81. * @param hadc: ADC handle pointer
  82. * @retval None
  83. */
  84. void HAL_ADC_MspInit(ADC_HandleTypeDef* hadc)
  85. {
  86. GPIO_InitTypeDef GPIO_InitStruct = {0};
  87. if(hadc->Instance==ADC1)
  88. {
  89. /* USER CODE BEGIN ADC1_MspInit 0 */
  90. /* USER CODE END ADC1_MspInit 0 */
  91. /* Peripheral clock enable */
  92. __HAL_RCC_ADC1_CLK_ENABLE();
  93. __HAL_RCC_GPIOA_CLK_ENABLE();
  94. /**ADC1 GPIO Configuration
  95. PA5 ------> ADC1_IN5
  96. */
  97. GPIO_InitStruct.Pin = GPIO_PIN_5;
  98. GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
  99. GPIO_InitStruct.Pull = GPIO_NOPULL;
  100. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  101. /* USER CODE BEGIN ADC1_MspInit 1 */
  102. /* USER CODE END ADC1_MspInit 1 */
  103. }
  104. }
  105. /**
  106. * @brief ADC MSP De-Initialization
  107. * This function freeze the hardware resources used in this example
  108. * @param hadc: ADC handle pointer
  109. * @retval None
  110. */
  111. void HAL_ADC_MspDeInit(ADC_HandleTypeDef* hadc)
  112. {
  113. if(hadc->Instance==ADC1)
  114. {
  115. /* USER CODE BEGIN ADC1_MspDeInit 0 */
  116. /* USER CODE END ADC1_MspDeInit 0 */
  117. /* Peripheral clock disable */
  118. __HAL_RCC_ADC1_CLK_DISABLE();
  119. /**ADC1 GPIO Configuration
  120. PA5 ------> ADC1_IN5
  121. */
  122. HAL_GPIO_DeInit(GPIOA, GPIO_PIN_5);
  123. /* USER CODE BEGIN ADC1_MspDeInit 1 */
  124. /* USER CODE END ADC1_MspDeInit 1 */
  125. }
  126. }
  127. /**
  128. * @brief DMA2D MSP Initialization
  129. * This function configures the hardware resources used in this example
  130. * @param hdma2d: DMA2D handle pointer
  131. * @retval None
  132. */
  133. void HAL_DMA2D_MspInit(DMA2D_HandleTypeDef* hdma2d)
  134. {
  135. if(hdma2d->Instance==DMA2D)
  136. {
  137. /* USER CODE BEGIN DMA2D_MspInit 0 */
  138. /* USER CODE END DMA2D_MspInit 0 */
  139. /* Peripheral clock enable */
  140. __HAL_RCC_DMA2D_CLK_ENABLE();
  141. /* USER CODE BEGIN DMA2D_MspInit 1 */
  142. /* USER CODE END DMA2D_MspInit 1 */
  143. }
  144. }
  145. /**
  146. * @brief DMA2D MSP De-Initialization
  147. * This function freeze the hardware resources used in this example
  148. * @param hdma2d: DMA2D handle pointer
  149. * @retval None
  150. */
  151. void HAL_DMA2D_MspDeInit(DMA2D_HandleTypeDef* hdma2d)
  152. {
  153. if(hdma2d->Instance==DMA2D)
  154. {
  155. /* USER CODE BEGIN DMA2D_MspDeInit 0 */
  156. /* USER CODE END DMA2D_MspDeInit 0 */
  157. /* Peripheral clock disable */
  158. __HAL_RCC_DMA2D_CLK_DISABLE();
  159. /* USER CODE BEGIN DMA2D_MspDeInit 1 */
  160. /* USER CODE END DMA2D_MspDeInit 1 */
  161. }
  162. }
  163. /**
  164. * @brief ETH MSP Initialization
  165. * This function configures the hardware resources used in this example
  166. * @param heth: ETH handle pointer
  167. * @retval None
  168. */
  169. void HAL_ETH_MspInit(ETH_HandleTypeDef* heth)
  170. {
  171. GPIO_InitTypeDef GPIO_InitStruct = {0};
  172. if(heth->Instance==ETH)
  173. {
  174. /* USER CODE BEGIN ETH_MspInit 0 */
  175. /* USER CODE END ETH_MspInit 0 */
  176. /* Peripheral clock enable */
  177. __HAL_RCC_ETH_CLK_ENABLE();
  178. __HAL_RCC_GPIOC_CLK_ENABLE();
  179. __HAL_RCC_GPIOA_CLK_ENABLE();
  180. __HAL_RCC_GPIOB_CLK_ENABLE();
  181. /**ETH GPIO Configuration
  182. PC1 ------> ETH_MDC
  183. PA1 ------> ETH_REF_CLK
  184. PA2 ------> ETH_MDIO
  185. PA7 ------> ETH_CRS_DV
  186. PC4 ------> ETH_RXD0
  187. PC5 ------> ETH_RXD1
  188. PB11 ------> ETH_TX_EN
  189. PB12 ------> ETH_TXD0
  190. PB13 ------> ETH_TXD1
  191. */
  192. GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_4|GPIO_PIN_5;
  193. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  194. GPIO_InitStruct.Pull = GPIO_NOPULL;
  195. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  196. GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
  197. HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  198. GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_7;
  199. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  200. GPIO_InitStruct.Pull = GPIO_NOPULL;
  201. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  202. GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
  203. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  204. GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_13;
  205. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  206. GPIO_InitStruct.Pull = GPIO_NOPULL;
  207. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  208. GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
  209. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  210. /* USER CODE BEGIN ETH_MspInit 1 */
  211. /* USER CODE END ETH_MspInit 1 */
  212. }
  213. }
  214. /**
  215. * @brief ETH MSP De-Initialization
  216. * This function freeze the hardware resources used in this example
  217. * @param heth: ETH handle pointer
  218. * @retval None
  219. */
  220. void HAL_ETH_MspDeInit(ETH_HandleTypeDef* heth)
  221. {
  222. if(heth->Instance==ETH)
  223. {
  224. /* USER CODE BEGIN ETH_MspDeInit 0 */
  225. /* USER CODE END ETH_MspDeInit 0 */
  226. /* Peripheral clock disable */
  227. __HAL_RCC_ETH_CLK_DISABLE();
  228. /**ETH GPIO Configuration
  229. PC1 ------> ETH_MDC
  230. PA1 ------> ETH_REF_CLK
  231. PA2 ------> ETH_MDIO
  232. PA7 ------> ETH_CRS_DV
  233. PC4 ------> ETH_RXD0
  234. PC5 ------> ETH_RXD1
  235. PB11 ------> ETH_TX_EN
  236. PB12 ------> ETH_TXD0
  237. PB13 ------> ETH_TXD1
  238. */
  239. HAL_GPIO_DeInit(GPIOC, GPIO_PIN_1|GPIO_PIN_4|GPIO_PIN_5);
  240. HAL_GPIO_DeInit(GPIOA, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_7);
  241. HAL_GPIO_DeInit(GPIOB, GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_13);
  242. /* USER CODE BEGIN ETH_MspDeInit 1 */
  243. /* USER CODE END ETH_MspDeInit 1 */
  244. }
  245. }
  246. /**
  247. * @brief LTDC MSP Initialization
  248. * This function configures the hardware resources used in this example
  249. * @param hltdc: LTDC handle pointer
  250. * @retval None
  251. */
  252. void HAL_LTDC_MspInit(LTDC_HandleTypeDef* hltdc)
  253. {
  254. GPIO_InitTypeDef GPIO_InitStruct = {0};
  255. if(hltdc->Instance==LTDC)
  256. {
  257. /* USER CODE BEGIN LTDC_MspInit 0 */
  258. /* USER CODE END LTDC_MspInit 0 */
  259. /* Peripheral clock enable */
  260. __HAL_RCC_LTDC_CLK_ENABLE();
  261. __HAL_RCC_GPIOE_CLK_ENABLE();
  262. __HAL_RCC_GPIOI_CLK_ENABLE();
  263. __HAL_RCC_GPIOF_CLK_ENABLE();
  264. __HAL_RCC_GPIOH_CLK_ENABLE();
  265. __HAL_RCC_GPIOA_CLK_ENABLE();
  266. __HAL_RCC_GPIOB_CLK_ENABLE();
  267. __HAL_RCC_GPIOG_CLK_ENABLE();
  268. __HAL_RCC_GPIOC_CLK_ENABLE();
  269. __HAL_RCC_GPIOD_CLK_ENABLE();
  270. /**LTDC GPIO Configuration
  271. PE4 ------> LTDC_B0
  272. PE5 ------> LTDC_G0
  273. PE6 ------> LTDC_G1
  274. PI9 ------> LTDC_VSYNC
  275. PI10 ------> LTDC_HSYNC
  276. PF10 ------> LTDC_DE
  277. PH2 ------> LTDC_R0
  278. PH3 ------> LTDC_R1
  279. PA3 ------> LTDC_B5
  280. PB0 ------> LTDC_R3
  281. PB1 ------> LTDC_R6
  282. PH8 ------> LTDC_R2
  283. PG6 ------> LTDC_R7
  284. PG7 ------> LTDC_CLK
  285. PC7 ------> LTDC_G6
  286. PA11 ------> LTDC_R4
  287. PA12 ------> LTDC_R5
  288. PH13 ------> LTDC_G2
  289. PH15 ------> LTDC_G4
  290. PI0 ------> LTDC_G5
  291. PI2 ------> LTDC_G7
  292. PD6 ------> LTDC_B2
  293. PG10 ------> LTDC_G3
  294. PG11 ------> LTDC_B3
  295. PG12 ------> LTDC_B1
  296. PB8 ------> LTDC_B6
  297. PB9 ------> LTDC_B7
  298. PI4 ------> LTDC_B4
  299. */
  300. GPIO_InitStruct.Pin = GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6;
  301. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  302. GPIO_InitStruct.Pull = GPIO_NOPULL;
  303. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  304. GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
  305. HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
  306. GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_0|GPIO_PIN_2
  307. |GPIO_PIN_4;
  308. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  309. GPIO_InitStruct.Pull = GPIO_NOPULL;
  310. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  311. GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
  312. HAL_GPIO_Init(GPIOI, &GPIO_InitStruct);
  313. GPIO_InitStruct.Pin = GPIO_PIN_10;
  314. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  315. GPIO_InitStruct.Pull = GPIO_NOPULL;
  316. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  317. GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
  318. HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
  319. GPIO_InitStruct.Pin = GPIO_PIN_2|GPIO_PIN_3|GPIO_PIN_8|GPIO_PIN_13
  320. |GPIO_PIN_15;
  321. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  322. GPIO_InitStruct.Pull = GPIO_NOPULL;
  323. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  324. GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
  325. HAL_GPIO_Init(GPIOH, &GPIO_InitStruct);
  326. GPIO_InitStruct.Pin = GPIO_PIN_3|GPIO_PIN_11|GPIO_PIN_12;
  327. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  328. GPIO_InitStruct.Pull = GPIO_NOPULL;
  329. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  330. GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
  331. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  332. GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1;
  333. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  334. GPIO_InitStruct.Pull = GPIO_NOPULL;
  335. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  336. GPIO_InitStruct.Alternate = GPIO_AF9_LTDC;
  337. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  338. GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7|GPIO_PIN_11;
  339. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  340. GPIO_InitStruct.Pull = GPIO_NOPULL;
  341. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  342. GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
  343. HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
  344. GPIO_InitStruct.Pin = GPIO_PIN_7;
  345. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  346. GPIO_InitStruct.Pull = GPIO_NOPULL;
  347. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  348. GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
  349. HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  350. GPIO_InitStruct.Pin = GPIO_PIN_6;
  351. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  352. GPIO_InitStruct.Pull = GPIO_NOPULL;
  353. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  354. GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
  355. HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
  356. GPIO_InitStruct.Pin = GPIO_PIN_10;
  357. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  358. GPIO_InitStruct.Pull = GPIO_NOPULL;
  359. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  360. GPIO_InitStruct.Alternate = GPIO_AF9_LTDC;
  361. HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
  362. GPIO_InitStruct.Pin = GPIO_PIN_12;
  363. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  364. GPIO_InitStruct.Pull = GPIO_NOPULL;
  365. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  366. GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
  367. HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
  368. GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9;
  369. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  370. GPIO_InitStruct.Pull = GPIO_NOPULL;
  371. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  372. GPIO_InitStruct.Alternate = GPIO_AF14_LTDC;
  373. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  374. /* USER CODE BEGIN LTDC_MspInit 1 */
  375. /* USER CODE END LTDC_MspInit 1 */
  376. }
  377. }
  378. /**
  379. * @brief LTDC MSP De-Initialization
  380. * This function freeze the hardware resources used in this example
  381. * @param hltdc: LTDC handle pointer
  382. * @retval None
  383. */
  384. void HAL_LTDC_MspDeInit(LTDC_HandleTypeDef* hltdc)
  385. {
  386. if(hltdc->Instance==LTDC)
  387. {
  388. /* USER CODE BEGIN LTDC_MspDeInit 0 */
  389. /* USER CODE END LTDC_MspDeInit 0 */
  390. /* Peripheral clock disable */
  391. __HAL_RCC_LTDC_CLK_DISABLE();
  392. /**LTDC GPIO Configuration
  393. PE4 ------> LTDC_B0
  394. PE5 ------> LTDC_G0
  395. PE6 ------> LTDC_G1
  396. PI9 ------> LTDC_VSYNC
  397. PI10 ------> LTDC_HSYNC
  398. PF10 ------> LTDC_DE
  399. PH2 ------> LTDC_R0
  400. PH3 ------> LTDC_R1
  401. PA3 ------> LTDC_B5
  402. PB0 ------> LTDC_R3
  403. PB1 ------> LTDC_R6
  404. PH8 ------> LTDC_R2
  405. PG6 ------> LTDC_R7
  406. PG7 ------> LTDC_CLK
  407. PC7 ------> LTDC_G6
  408. PA11 ------> LTDC_R4
  409. PA12 ------> LTDC_R5
  410. PH13 ------> LTDC_G2
  411. PH15 ------> LTDC_G4
  412. PI0 ------> LTDC_G5
  413. PI2 ------> LTDC_G7
  414. PD6 ------> LTDC_B2
  415. PG10 ------> LTDC_G3
  416. PG11 ------> LTDC_B3
  417. PG12 ------> LTDC_B1
  418. PB8 ------> LTDC_B6
  419. PB9 ------> LTDC_B7
  420. PI4 ------> LTDC_B4
  421. */
  422. HAL_GPIO_DeInit(GPIOE, GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_6);
  423. HAL_GPIO_DeInit(GPIOI, GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_0|GPIO_PIN_2
  424. |GPIO_PIN_4);
  425. HAL_GPIO_DeInit(GPIOF, GPIO_PIN_10);
  426. HAL_GPIO_DeInit(GPIOH, GPIO_PIN_2|GPIO_PIN_3|GPIO_PIN_8|GPIO_PIN_13
  427. |GPIO_PIN_15);
  428. HAL_GPIO_DeInit(GPIOA, GPIO_PIN_3|GPIO_PIN_11|GPIO_PIN_12);
  429. HAL_GPIO_DeInit(GPIOB, GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_8|GPIO_PIN_9);
  430. HAL_GPIO_DeInit(GPIOG, GPIO_PIN_6|GPIO_PIN_7|GPIO_PIN_10|GPIO_PIN_11
  431. |GPIO_PIN_12);
  432. HAL_GPIO_DeInit(GPIOC, GPIO_PIN_7);
  433. HAL_GPIO_DeInit(GPIOD, GPIO_PIN_6);
  434. /* USER CODE BEGIN LTDC_MspDeInit 1 */
  435. /* USER CODE END LTDC_MspDeInit 1 */
  436. }
  437. }
  438. /**
  439. * @brief QSPI MSP Initialization
  440. * This function configures the hardware resources used in this example
  441. * @param hqspi: QSPI handle pointer
  442. * @retval None
  443. */
  444. void HAL_QSPI_MspInit(QSPI_HandleTypeDef* hqspi)
  445. {
  446. GPIO_InitTypeDef GPIO_InitStruct = {0};
  447. if(hqspi->Instance==QUADSPI)
  448. {
  449. /* USER CODE BEGIN QUADSPI_MspInit 0 */
  450. /* USER CODE END QUADSPI_MspInit 0 */
  451. /* Peripheral clock enable */
  452. __HAL_RCC_QSPI_CLK_ENABLE();
  453. __HAL_RCC_GPIOF_CLK_ENABLE();
  454. __HAL_RCC_GPIOB_CLK_ENABLE();
  455. /**QUADSPI GPIO Configuration
  456. PF6 ------> QUADSPI_BK1_IO3
  457. PF7 ------> QUADSPI_BK1_IO2
  458. PF8 ------> QUADSPI_BK1_IO0
  459. PF9 ------> QUADSPI_BK1_IO1
  460. PB2 ------> QUADSPI_CLK
  461. PB6 ------> QUADSPI_BK1_NCS
  462. */
  463. GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7;
  464. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  465. GPIO_InitStruct.Pull = GPIO_NOPULL;
  466. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  467. GPIO_InitStruct.Alternate = GPIO_AF9_QUADSPI;
  468. HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
  469. GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9;
  470. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  471. GPIO_InitStruct.Pull = GPIO_NOPULL;
  472. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  473. GPIO_InitStruct.Alternate = GPIO_AF10_QUADSPI;
  474. HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
  475. GPIO_InitStruct.Pin = GPIO_PIN_2;
  476. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  477. GPIO_InitStruct.Pull = GPIO_NOPULL;
  478. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  479. GPIO_InitStruct.Alternate = GPIO_AF9_QUADSPI;
  480. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  481. GPIO_InitStruct.Pin = GPIO_PIN_6;
  482. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  483. GPIO_InitStruct.Pull = GPIO_NOPULL;
  484. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  485. GPIO_InitStruct.Alternate = GPIO_AF10_QUADSPI;
  486. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  487. /* USER CODE BEGIN QUADSPI_MspInit 1 */
  488. /* USER CODE END QUADSPI_MspInit 1 */
  489. }
  490. }
  491. /**
  492. * @brief QSPI MSP De-Initialization
  493. * This function freeze the hardware resources used in this example
  494. * @param hqspi: QSPI handle pointer
  495. * @retval None
  496. */
  497. void HAL_QSPI_MspDeInit(QSPI_HandleTypeDef* hqspi)
  498. {
  499. if(hqspi->Instance==QUADSPI)
  500. {
  501. /* USER CODE BEGIN QUADSPI_MspDeInit 0 */
  502. /* USER CODE END QUADSPI_MspDeInit 0 */
  503. /* Peripheral clock disable */
  504. __HAL_RCC_QSPI_CLK_DISABLE();
  505. /**QUADSPI GPIO Configuration
  506. PF6 ------> QUADSPI_BK1_IO3
  507. PF7 ------> QUADSPI_BK1_IO2
  508. PF8 ------> QUADSPI_BK1_IO0
  509. PF9 ------> QUADSPI_BK1_IO1
  510. PB2 ------> QUADSPI_CLK
  511. PB6 ------> QUADSPI_BK1_NCS
  512. */
  513. HAL_GPIO_DeInit(GPIOF, GPIO_PIN_6|GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9);
  514. HAL_GPIO_DeInit(GPIOB, GPIO_PIN_2|GPIO_PIN_6);
  515. /* USER CODE BEGIN QUADSPI_MspDeInit 1 */
  516. /* USER CODE END QUADSPI_MspDeInit 1 */
  517. }
  518. }
  519. /**
  520. * @brief SD MSP Initialization
  521. * This function configures the hardware resources used in this example
  522. * @param hsd: SD handle pointer
  523. * @retval None
  524. */
  525. void HAL_SD_MspInit(SD_HandleTypeDef* hsd)
  526. {
  527. GPIO_InitTypeDef GPIO_InitStruct = {0};
  528. if(hsd->Instance==SDMMC1)
  529. {
  530. /* USER CODE BEGIN SDMMC1_MspInit 0 */
  531. /* USER CODE END SDMMC1_MspInit 0 */
  532. /* Peripheral clock enable */
  533. __HAL_RCC_SDMMC1_CLK_ENABLE();
  534. __HAL_RCC_GPIOC_CLK_ENABLE();
  535. __HAL_RCC_GPIOD_CLK_ENABLE();
  536. /**SDMMC1 GPIO Configuration
  537. PC8 ------> SDMMC1_D0
  538. PC9 ------> SDMMC1_D1
  539. PC10 ------> SDMMC1_D2
  540. PC11 ------> SDMMC1_D3
  541. PC12 ------> SDMMC1_CK
  542. PD2 ------> SDMMC1_CMD
  543. */
  544. GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11
  545. |GPIO_PIN_12;
  546. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  547. GPIO_InitStruct.Pull = GPIO_NOPULL;
  548. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  549. GPIO_InitStruct.Alternate = GPIO_AF12_SDMMC1;
  550. HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  551. GPIO_InitStruct.Pin = GPIO_PIN_2;
  552. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  553. GPIO_InitStruct.Pull = GPIO_NOPULL;
  554. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  555. GPIO_InitStruct.Alternate = GPIO_AF12_SDMMC1;
  556. HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
  557. /* USER CODE BEGIN SDMMC1_MspInit 1 */
  558. /* USER CODE END SDMMC1_MspInit 1 */
  559. }
  560. }
  561. /**
  562. * @brief SD MSP De-Initialization
  563. * This function freeze the hardware resources used in this example
  564. * @param hsd: SD handle pointer
  565. * @retval None
  566. */
  567. void HAL_SD_MspDeInit(SD_HandleTypeDef* hsd)
  568. {
  569. if(hsd->Instance==SDMMC1)
  570. {
  571. /* USER CODE BEGIN SDMMC1_MspDeInit 0 */
  572. /* USER CODE END SDMMC1_MspDeInit 0 */
  573. /* Peripheral clock disable */
  574. __HAL_RCC_SDMMC1_CLK_DISABLE();
  575. /**SDMMC1 GPIO Configuration
  576. PC8 ------> SDMMC1_D0
  577. PC9 ------> SDMMC1_D1
  578. PC10 ------> SDMMC1_D2
  579. PC11 ------> SDMMC1_D3
  580. PC12 ------> SDMMC1_CK
  581. PD2 ------> SDMMC1_CMD
  582. */
  583. HAL_GPIO_DeInit(GPIOC, GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11
  584. |GPIO_PIN_12);
  585. HAL_GPIO_DeInit(GPIOD, GPIO_PIN_2);
  586. /* USER CODE BEGIN SDMMC1_MspDeInit 1 */
  587. /* USER CODE END SDMMC1_MspDeInit 1 */
  588. }
  589. }
  590. /**
  591. * @brief UART MSP Initialization
  592. * This function configures the hardware resources used in this example
  593. * @param huart: UART handle pointer
  594. * @retval None
  595. */
  596. void HAL_UART_MspInit(UART_HandleTypeDef* huart)
  597. {
  598. GPIO_InitTypeDef GPIO_InitStruct = {0};
  599. if(huart->Instance==USART1)
  600. {
  601. /* USER CODE BEGIN USART1_MspInit 0 */
  602. /* USER CODE END USART1_MspInit 0 */
  603. /* Peripheral clock enable */
  604. __HAL_RCC_USART1_CLK_ENABLE();
  605. __HAL_RCC_GPIOA_CLK_ENABLE();
  606. /**USART1 GPIO Configuration
  607. PA9 ------> USART1_TX
  608. PA10 ------> USART1_RX
  609. */
  610. GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10;
  611. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  612. GPIO_InitStruct.Pull = GPIO_NOPULL;
  613. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  614. GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
  615. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  616. /* USER CODE BEGIN USART1_MspInit 1 */
  617. /* USER CODE END USART1_MspInit 1 */
  618. }
  619. }
  620. /**
  621. * @brief UART MSP De-Initialization
  622. * This function freeze the hardware resources used in this example
  623. * @param huart: UART handle pointer
  624. * @retval None
  625. */
  626. void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
  627. {
  628. if(huart->Instance==USART1)
  629. {
  630. /* USER CODE BEGIN USART1_MspDeInit 0 */
  631. /* USER CODE END USART1_MspDeInit 0 */
  632. /* Peripheral clock disable */
  633. __HAL_RCC_USART1_CLK_DISABLE();
  634. /**USART1 GPIO Configuration
  635. PA9 ------> USART1_TX
  636. PA10 ------> USART1_RX
  637. */
  638. HAL_GPIO_DeInit(GPIOA, GPIO_PIN_9|GPIO_PIN_10);
  639. /* USER CODE BEGIN USART1_MspDeInit 1 */
  640. /* USER CODE END USART1_MspDeInit 1 */
  641. }
  642. }
  643. static uint32_t FMC_Initialized = 0;
  644. static void HAL_FMC_MspInit(void){
  645. /* USER CODE BEGIN FMC_MspInit 0 */
  646. /* USER CODE END FMC_MspInit 0 */
  647. GPIO_InitTypeDef GPIO_InitStruct;
  648. if (FMC_Initialized) {
  649. return;
  650. }
  651. FMC_Initialized = 1;
  652. /* Peripheral clock enable */
  653. __HAL_RCC_FMC_CLK_ENABLE();
  654. /** FMC GPIO Configuration
  655. PF0 ------> FMC_A0
  656. PF1 ------> FMC_A1
  657. PF2 ------> FMC_A2
  658. PF3 ------> FMC_A3
  659. PF4 ------> FMC_A4
  660. PF5 ------> FMC_A5
  661. PC0 ------> FMC_SDNWE
  662. PF11 ------> FMC_SDNRAS
  663. PF12 ------> FMC_A6
  664. PF13 ------> FMC_A7
  665. PF14 ------> FMC_A8
  666. PF15 ------> FMC_A9
  667. PG0 ------> FMC_A10
  668. PG1 ------> FMC_A11
  669. PE7 ------> FMC_D4
  670. PE8 ------> FMC_D5
  671. PE9 ------> FMC_D6
  672. PE10 ------> FMC_D7
  673. PE11 ------> FMC_D8
  674. PE12 ------> FMC_D9
  675. PE13 ------> FMC_D10
  676. PE14 ------> FMC_D11
  677. PE15 ------> FMC_D12
  678. PH6 ------> FMC_SDNE1
  679. PH7 ------> FMC_SDCKE1
  680. PD8 ------> FMC_D13
  681. PD9 ------> FMC_D14
  682. PD10 ------> FMC_D15
  683. PD14 ------> FMC_D0
  684. PD15 ------> FMC_D1
  685. PG4 ------> FMC_BA0
  686. PG5 ------> FMC_BA1
  687. PG8 ------> FMC_SDCLK
  688. PD0 ------> FMC_D2
  689. PD1 ------> FMC_D3
  690. PG15 ------> FMC_SDNCAS
  691. PE0 ------> FMC_NBL0
  692. PE1 ------> FMC_NBL1
  693. */
  694. GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3
  695. |GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_11|GPIO_PIN_12
  696. |GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15;
  697. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  698. GPIO_InitStruct.Pull = GPIO_NOPULL;
  699. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  700. GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
  701. HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
  702. GPIO_InitStruct.Pin = GPIO_PIN_0;
  703. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  704. GPIO_InitStruct.Pull = GPIO_NOPULL;
  705. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  706. GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
  707. HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  708. GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_4|GPIO_PIN_5
  709. |GPIO_PIN_8|GPIO_PIN_15;
  710. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  711. GPIO_InitStruct.Pull = GPIO_NOPULL;
  712. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  713. GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
  714. HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
  715. GPIO_InitStruct.Pin = GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10
  716. |GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14
  717. |GPIO_PIN_15|GPIO_PIN_0|GPIO_PIN_1;
  718. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  719. GPIO_InitStruct.Pull = GPIO_NOPULL;
  720. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  721. GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
  722. HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
  723. GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7;
  724. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  725. GPIO_InitStruct.Pull = GPIO_NOPULL;
  726. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  727. GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
  728. HAL_GPIO_Init(GPIOH, &GPIO_InitStruct);
  729. GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_14
  730. |GPIO_PIN_15|GPIO_PIN_0|GPIO_PIN_1;
  731. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  732. GPIO_InitStruct.Pull = GPIO_NOPULL;
  733. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  734. GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
  735. HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
  736. /* USER CODE BEGIN FMC_MspInit 1 */
  737. /* USER CODE END FMC_MspInit 1 */
  738. }
  739. void HAL_SDRAM_MspInit(SDRAM_HandleTypeDef* hsdram){
  740. /* USER CODE BEGIN SDRAM_MspInit 0 */
  741. /* USER CODE END SDRAM_MspInit 0 */
  742. HAL_FMC_MspInit();
  743. /* USER CODE BEGIN SDRAM_MspInit 1 */
  744. /* USER CODE END SDRAM_MspInit 1 */
  745. }
  746. static uint32_t FMC_DeInitialized = 0;
  747. static void HAL_FMC_MspDeInit(void){
  748. /* USER CODE BEGIN FMC_MspDeInit 0 */
  749. /* USER CODE END FMC_MspDeInit 0 */
  750. if (FMC_DeInitialized) {
  751. return;
  752. }
  753. FMC_DeInitialized = 1;
  754. /* Peripheral clock enable */
  755. __HAL_RCC_FMC_CLK_DISABLE();
  756. /** FMC GPIO Configuration
  757. PF0 ------> FMC_A0
  758. PF1 ------> FMC_A1
  759. PF2 ------> FMC_A2
  760. PF3 ------> FMC_A3
  761. PF4 ------> FMC_A4
  762. PF5 ------> FMC_A5
  763. PC0 ------> FMC_SDNWE
  764. PF11 ------> FMC_SDNRAS
  765. PF12 ------> FMC_A6
  766. PF13 ------> FMC_A7
  767. PF14 ------> FMC_A8
  768. PF15 ------> FMC_A9
  769. PG0 ------> FMC_A10
  770. PG1 ------> FMC_A11
  771. PE7 ------> FMC_D4
  772. PE8 ------> FMC_D5
  773. PE9 ------> FMC_D6
  774. PE10 ------> FMC_D7
  775. PE11 ------> FMC_D8
  776. PE12 ------> FMC_D9
  777. PE13 ------> FMC_D10
  778. PE14 ------> FMC_D11
  779. PE15 ------> FMC_D12
  780. PH6 ------> FMC_SDNE1
  781. PH7 ------> FMC_SDCKE1
  782. PD8 ------> FMC_D13
  783. PD9 ------> FMC_D14
  784. PD10 ------> FMC_D15
  785. PD14 ------> FMC_D0
  786. PD15 ------> FMC_D1
  787. PG4 ------> FMC_BA0
  788. PG5 ------> FMC_BA1
  789. PG8 ------> FMC_SDCLK
  790. PD0 ------> FMC_D2
  791. PD1 ------> FMC_D3
  792. PG15 ------> FMC_SDNCAS
  793. PE0 ------> FMC_NBL0
  794. PE1 ------> FMC_NBL1
  795. */
  796. HAL_GPIO_DeInit(GPIOF, GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3
  797. |GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_11|GPIO_PIN_12
  798. |GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15);
  799. HAL_GPIO_DeInit(GPIOC, GPIO_PIN_0);
  800. HAL_GPIO_DeInit(GPIOG, GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_4|GPIO_PIN_5
  801. |GPIO_PIN_8|GPIO_PIN_15);
  802. HAL_GPIO_DeInit(GPIOE, GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10
  803. |GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14
  804. |GPIO_PIN_15|GPIO_PIN_0|GPIO_PIN_1);
  805. HAL_GPIO_DeInit(GPIOH, GPIO_PIN_6|GPIO_PIN_7);
  806. HAL_GPIO_DeInit(GPIOD, GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_14
  807. |GPIO_PIN_15|GPIO_PIN_0|GPIO_PIN_1);
  808. /* USER CODE BEGIN FMC_MspDeInit 1 */
  809. /* USER CODE END FMC_MspDeInit 1 */
  810. }
  811. void HAL_SDRAM_MspDeInit(SDRAM_HandleTypeDef* hsdram){
  812. /* USER CODE BEGIN SDRAM_MspDeInit 0 */
  813. /* USER CODE END SDRAM_MspDeInit 0 */
  814. HAL_FMC_MspDeInit();
  815. /* USER CODE BEGIN SDRAM_MspDeInit 1 */
  816. /* USER CODE END SDRAM_MspDeInit 1 */
  817. }
  818. /* USER CODE BEGIN 1 */
  819. /* USER CODE END 1 */
  820. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/