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