stm32f7xx_hal_msp.c 29 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096
  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. void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
  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 ETH MSP Initialization
  130. * This function configures the hardware resources used in this example
  131. * @param heth: ETH handle pointer
  132. * @retval None
  133. */
  134. void HAL_ETH_MspInit(ETH_HandleTypeDef* heth)
  135. {
  136. GPIO_InitTypeDef GPIO_InitStruct = {0};
  137. if(heth->Instance==ETH)
  138. {
  139. /* USER CODE BEGIN ETH_MspInit 0 */
  140. /* USER CODE END ETH_MspInit 0 */
  141. /* Peripheral clock enable */
  142. __HAL_RCC_ETH_CLK_ENABLE();
  143. __HAL_RCC_GPIOC_CLK_ENABLE();
  144. __HAL_RCC_GPIOA_CLK_ENABLE();
  145. __HAL_RCC_GPIOB_CLK_ENABLE();
  146. __HAL_RCC_GPIOG_CLK_ENABLE();
  147. /**ETH GPIO Configuration
  148. PC1 ------> ETH_MDC
  149. PA1 ------> ETH_REF_CLK
  150. PA2 ------> ETH_MDIO
  151. PA7 ------> ETH_CRS_DV
  152. PC4 ------> ETH_RXD0
  153. PC5 ------> ETH_RXD1
  154. PB11 ------> ETH_TX_EN
  155. PG13 ------> ETH_TXD0
  156. PG14 ------> ETH_TXD1
  157. */
  158. GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_4|GPIO_PIN_5;
  159. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  160. GPIO_InitStruct.Pull = GPIO_NOPULL;
  161. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  162. GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
  163. HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  164. GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_7;
  165. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  166. GPIO_InitStruct.Pull = GPIO_NOPULL;
  167. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  168. GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
  169. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  170. GPIO_InitStruct.Pin = GPIO_PIN_11;
  171. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  172. GPIO_InitStruct.Pull = GPIO_NOPULL;
  173. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  174. GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
  175. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  176. GPIO_InitStruct.Pin = GPIO_PIN_13|GPIO_PIN_14;
  177. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  178. GPIO_InitStruct.Pull = GPIO_NOPULL;
  179. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  180. GPIO_InitStruct.Alternate = GPIO_AF11_ETH;
  181. HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
  182. /* USER CODE BEGIN ETH_MspInit 1 */
  183. /* USER CODE END ETH_MspInit 1 */
  184. }
  185. }
  186. /**
  187. * @brief ETH MSP De-Initialization
  188. * This function freeze the hardware resources used in this example
  189. * @param heth: ETH handle pointer
  190. * @retval None
  191. */
  192. void HAL_ETH_MspDeInit(ETH_HandleTypeDef* heth)
  193. {
  194. if(heth->Instance==ETH)
  195. {
  196. /* USER CODE BEGIN ETH_MspDeInit 0 */
  197. /* USER CODE END ETH_MspDeInit 0 */
  198. /* Peripheral clock disable */
  199. __HAL_RCC_ETH_CLK_DISABLE();
  200. /**ETH GPIO Configuration
  201. PC1 ------> ETH_MDC
  202. PA1 ------> ETH_REF_CLK
  203. PA2 ------> ETH_MDIO
  204. PA7 ------> ETH_CRS_DV
  205. PC4 ------> ETH_RXD0
  206. PC5 ------> ETH_RXD1
  207. PB11 ------> ETH_TX_EN
  208. PG13 ------> ETH_TXD0
  209. PG14 ------> ETH_TXD1
  210. */
  211. HAL_GPIO_DeInit(GPIOC, GPIO_PIN_1|GPIO_PIN_4|GPIO_PIN_5);
  212. HAL_GPIO_DeInit(GPIOA, GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_7);
  213. HAL_GPIO_DeInit(GPIOB, GPIO_PIN_11);
  214. HAL_GPIO_DeInit(GPIOG, GPIO_PIN_13|GPIO_PIN_14);
  215. /* USER CODE BEGIN ETH_MspDeInit 1 */
  216. /* USER CODE END ETH_MspDeInit 1 */
  217. }
  218. }
  219. /**
  220. * @brief QSPI MSP Initialization
  221. * This function configures the hardware resources used in this example
  222. * @param hqspi: QSPI handle pointer
  223. * @retval None
  224. */
  225. void HAL_QSPI_MspInit(QSPI_HandleTypeDef* hqspi)
  226. {
  227. GPIO_InitTypeDef GPIO_InitStruct = {0};
  228. if(hqspi->Instance==QUADSPI)
  229. {
  230. /* USER CODE BEGIN QUADSPI_MspInit 0 */
  231. /* USER CODE END QUADSPI_MspInit 0 */
  232. /* Peripheral clock enable */
  233. __HAL_RCC_QSPI_CLK_ENABLE();
  234. __HAL_RCC_GPIOF_CLK_ENABLE();
  235. __HAL_RCC_GPIOB_CLK_ENABLE();
  236. /**QUADSPI GPIO Configuration
  237. PF6 ------> QUADSPI_BK1_IO3
  238. PF7 ------> QUADSPI_BK1_IO2
  239. PF8 ------> QUADSPI_BK1_IO0
  240. PF9 ------> QUADSPI_BK1_IO1
  241. PB2 ------> QUADSPI_CLK
  242. PB6 ------> QUADSPI_BK1_NCS
  243. */
  244. GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7;
  245. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  246. GPIO_InitStruct.Pull = GPIO_NOPULL;
  247. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  248. GPIO_InitStruct.Alternate = GPIO_AF9_QUADSPI;
  249. HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
  250. GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9;
  251. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  252. GPIO_InitStruct.Pull = GPIO_NOPULL;
  253. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  254. GPIO_InitStruct.Alternate = GPIO_AF10_QUADSPI;
  255. HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
  256. GPIO_InitStruct.Pin = GPIO_PIN_2;
  257. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  258. GPIO_InitStruct.Pull = GPIO_NOPULL;
  259. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  260. GPIO_InitStruct.Alternate = GPIO_AF9_QUADSPI;
  261. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  262. GPIO_InitStruct.Pin = GPIO_PIN_6;
  263. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  264. GPIO_InitStruct.Pull = GPIO_NOPULL;
  265. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  266. GPIO_InitStruct.Alternate = GPIO_AF10_QUADSPI;
  267. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  268. /* USER CODE BEGIN QUADSPI_MspInit 1 */
  269. /* USER CODE END QUADSPI_MspInit 1 */
  270. }
  271. }
  272. /**
  273. * @brief QSPI MSP De-Initialization
  274. * This function freeze the hardware resources used in this example
  275. * @param hqspi: QSPI handle pointer
  276. * @retval None
  277. */
  278. void HAL_QSPI_MspDeInit(QSPI_HandleTypeDef* hqspi)
  279. {
  280. if(hqspi->Instance==QUADSPI)
  281. {
  282. /* USER CODE BEGIN QUADSPI_MspDeInit 0 */
  283. /* USER CODE END QUADSPI_MspDeInit 0 */
  284. /* Peripheral clock disable */
  285. __HAL_RCC_QSPI_CLK_DISABLE();
  286. /**QUADSPI GPIO Configuration
  287. PF6 ------> QUADSPI_BK1_IO3
  288. PF7 ------> QUADSPI_BK1_IO2
  289. PF8 ------> QUADSPI_BK1_IO0
  290. PF9 ------> QUADSPI_BK1_IO1
  291. PB2 ------> QUADSPI_CLK
  292. PB6 ------> QUADSPI_BK1_NCS
  293. */
  294. HAL_GPIO_DeInit(GPIOF, GPIO_PIN_6|GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9);
  295. HAL_GPIO_DeInit(GPIOB, GPIO_PIN_2|GPIO_PIN_6);
  296. /* USER CODE BEGIN QUADSPI_MspDeInit 1 */
  297. /* USER CODE END QUADSPI_MspDeInit 1 */
  298. }
  299. }
  300. /**
  301. * @brief RTC MSP Initialization
  302. * This function configures the hardware resources used in this example
  303. * @param hrtc: RTC handle pointer
  304. * @retval None
  305. */
  306. void HAL_RTC_MspInit(RTC_HandleTypeDef* hrtc)
  307. {
  308. if(hrtc->Instance==RTC)
  309. {
  310. /* USER CODE BEGIN RTC_MspInit 0 */
  311. /* USER CODE END RTC_MspInit 0 */
  312. /* Peripheral clock enable */
  313. __HAL_RCC_RTC_ENABLE();
  314. /* USER CODE BEGIN RTC_MspInit 1 */
  315. /* USER CODE END RTC_MspInit 1 */
  316. }
  317. }
  318. /**
  319. * @brief RTC MSP De-Initialization
  320. * This function freeze the hardware resources used in this example
  321. * @param hrtc: RTC handle pointer
  322. * @retval None
  323. */
  324. void HAL_RTC_MspDeInit(RTC_HandleTypeDef* hrtc)
  325. {
  326. if(hrtc->Instance==RTC)
  327. {
  328. /* USER CODE BEGIN RTC_MspDeInit 0 */
  329. /* USER CODE END RTC_MspDeInit 0 */
  330. /* Peripheral clock disable */
  331. __HAL_RCC_RTC_DISABLE();
  332. /* USER CODE BEGIN RTC_MspDeInit 1 */
  333. /* USER CODE END RTC_MspDeInit 1 */
  334. }
  335. }
  336. /**
  337. * @brief SD MSP Initialization
  338. * This function configures the hardware resources used in this example
  339. * @param hsd: SD handle pointer
  340. * @retval None
  341. */
  342. void HAL_SD_MspInit(SD_HandleTypeDef* hsd)
  343. {
  344. GPIO_InitTypeDef GPIO_InitStruct = {0};
  345. if(hsd->Instance==SDMMC1)
  346. {
  347. /* USER CODE BEGIN SDMMC1_MspInit 0 */
  348. /* USER CODE END SDMMC1_MspInit 0 */
  349. /* Peripheral clock enable */
  350. __HAL_RCC_SDMMC1_CLK_ENABLE();
  351. __HAL_RCC_GPIOC_CLK_ENABLE();
  352. __HAL_RCC_GPIOD_CLK_ENABLE();
  353. /**SDMMC1 GPIO Configuration
  354. PC8 ------> SDMMC1_D0
  355. PC9 ------> SDMMC1_D1
  356. PC10 ------> SDMMC1_D2
  357. PC11 ------> SDMMC1_D3
  358. PC12 ------> SDMMC1_CK
  359. PD2 ------> SDMMC1_CMD
  360. */
  361. GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11
  362. |GPIO_PIN_12;
  363. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  364. GPIO_InitStruct.Pull = GPIO_NOPULL;
  365. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  366. GPIO_InitStruct.Alternate = GPIO_AF12_SDMMC1;
  367. HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  368. GPIO_InitStruct.Pin = GPIO_PIN_2;
  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_AF12_SDMMC1;
  373. HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
  374. /* USER CODE BEGIN SDMMC1_MspInit 1 */
  375. /* USER CODE END SDMMC1_MspInit 1 */
  376. }
  377. }
  378. /**
  379. * @brief SD MSP De-Initialization
  380. * This function freeze the hardware resources used in this example
  381. * @param hsd: SD handle pointer
  382. * @retval None
  383. */
  384. void HAL_SD_MspDeInit(SD_HandleTypeDef* hsd)
  385. {
  386. if(hsd->Instance==SDMMC1)
  387. {
  388. /* USER CODE BEGIN SDMMC1_MspDeInit 0 */
  389. /* USER CODE END SDMMC1_MspDeInit 0 */
  390. /* Peripheral clock disable */
  391. __HAL_RCC_SDMMC1_CLK_DISABLE();
  392. /**SDMMC1 GPIO Configuration
  393. PC8 ------> SDMMC1_D0
  394. PC9 ------> SDMMC1_D1
  395. PC10 ------> SDMMC1_D2
  396. PC11 ------> SDMMC1_D3
  397. PC12 ------> SDMMC1_CK
  398. PD2 ------> SDMMC1_CMD
  399. */
  400. HAL_GPIO_DeInit(GPIOC, GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_11
  401. |GPIO_PIN_12);
  402. HAL_GPIO_DeInit(GPIOD, GPIO_PIN_2);
  403. /* USER CODE BEGIN SDMMC1_MspDeInit 1 */
  404. /* USER CODE END SDMMC1_MspDeInit 1 */
  405. }
  406. }
  407. /**
  408. * @brief SPI MSP Initialization
  409. * This function configures the hardware resources used in this example
  410. * @param hspi: SPI handle pointer
  411. * @retval None
  412. */
  413. void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi)
  414. {
  415. GPIO_InitTypeDef GPIO_InitStruct = {0};
  416. if(hspi->Instance==SPI2)
  417. {
  418. /* USER CODE BEGIN SPI2_MspInit 0 */
  419. /* USER CODE END SPI2_MspInit 0 */
  420. /* Peripheral clock enable */
  421. __HAL_RCC_SPI2_CLK_ENABLE();
  422. __HAL_RCC_GPIOB_CLK_ENABLE();
  423. /**SPI2 GPIO Configuration
  424. PB13 ------> SPI2_SCK
  425. PB14 ------> SPI2_MISO
  426. PB15 ------> SPI2_MOSI
  427. */
  428. GPIO_InitStruct.Pin = GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15;
  429. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  430. GPIO_InitStruct.Pull = GPIO_NOPULL;
  431. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  432. GPIO_InitStruct.Alternate = GPIO_AF5_SPI2;
  433. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  434. /* USER CODE BEGIN SPI2_MspInit 1 */
  435. /* USER CODE END SPI2_MspInit 1 */
  436. }
  437. }
  438. /**
  439. * @brief SPI MSP De-Initialization
  440. * This function freeze the hardware resources used in this example
  441. * @param hspi: SPI handle pointer
  442. * @retval None
  443. */
  444. void HAL_SPI_MspDeInit(SPI_HandleTypeDef* hspi)
  445. {
  446. if(hspi->Instance==SPI2)
  447. {
  448. /* USER CODE BEGIN SPI2_MspDeInit 0 */
  449. /* USER CODE END SPI2_MspDeInit 0 */
  450. /* Peripheral clock disable */
  451. __HAL_RCC_SPI2_CLK_DISABLE();
  452. /**SPI2 GPIO Configuration
  453. PB13 ------> SPI2_SCK
  454. PB14 ------> SPI2_MISO
  455. PB15 ------> SPI2_MOSI
  456. */
  457. HAL_GPIO_DeInit(GPIOB, GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15);
  458. /* USER CODE BEGIN SPI2_MspDeInit 1 */
  459. /* USER CODE END SPI2_MspDeInit 1 */
  460. }
  461. }
  462. /**
  463. * @brief TIM_PWM MSP Initialization
  464. * This function configures the hardware resources used in this example
  465. * @param htim_pwm: TIM_PWM handle pointer
  466. * @retval None
  467. */
  468. void HAL_TIM_PWM_MspInit(TIM_HandleTypeDef* htim_pwm)
  469. {
  470. if(htim_pwm->Instance==TIM2)
  471. {
  472. /* USER CODE BEGIN TIM2_MspInit 0 */
  473. /* USER CODE END TIM2_MspInit 0 */
  474. /* Peripheral clock enable */
  475. __HAL_RCC_TIM2_CLK_ENABLE();
  476. /* USER CODE BEGIN TIM2_MspInit 1 */
  477. /* USER CODE END TIM2_MspInit 1 */
  478. }
  479. }
  480. /**
  481. * @brief TIM_Base MSP Initialization
  482. * This function configures the hardware resources used in this example
  483. * @param htim_base: TIM_Base handle pointer
  484. * @retval None
  485. */
  486. void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base)
  487. {
  488. if(htim_base->Instance==TIM3)
  489. {
  490. /* USER CODE BEGIN TIM3_MspInit 0 */
  491. /* USER CODE END TIM3_MspInit 0 */
  492. /* Peripheral clock enable */
  493. __HAL_RCC_TIM3_CLK_ENABLE();
  494. /* USER CODE BEGIN TIM3_MspInit 1 */
  495. /* USER CODE END TIM3_MspInit 1 */
  496. }
  497. else if(htim_base->Instance==TIM11)
  498. {
  499. /* USER CODE BEGIN TIM11_MspInit 0 */
  500. /* USER CODE END TIM11_MspInit 0 */
  501. /* Peripheral clock enable */
  502. __HAL_RCC_TIM11_CLK_ENABLE();
  503. /* USER CODE BEGIN TIM11_MspInit 1 */
  504. /* USER CODE END TIM11_MspInit 1 */
  505. }
  506. else if(htim_base->Instance==TIM13)
  507. {
  508. /* USER CODE BEGIN TIM13_MspInit 0 */
  509. /* USER CODE END TIM13_MspInit 0 */
  510. /* Peripheral clock enable */
  511. __HAL_RCC_TIM13_CLK_ENABLE();
  512. /* USER CODE BEGIN TIM13_MspInit 1 */
  513. /* USER CODE END TIM13_MspInit 1 */
  514. }
  515. else if(htim_base->Instance==TIM14)
  516. {
  517. /* USER CODE BEGIN TIM14_MspInit 0 */
  518. /* USER CODE END TIM14_MspInit 0 */
  519. /* Peripheral clock enable */
  520. __HAL_RCC_TIM14_CLK_ENABLE();
  521. /* USER CODE BEGIN TIM14_MspInit 1 */
  522. /* USER CODE END TIM14_MspInit 1 */
  523. }
  524. }
  525. void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim)
  526. {
  527. GPIO_InitTypeDef GPIO_InitStruct = {0};
  528. if(htim->Instance==TIM2)
  529. {
  530. /* USER CODE BEGIN TIM2_MspPostInit 0 */
  531. /* USER CODE END TIM2_MspPostInit 0 */
  532. __HAL_RCC_GPIOA_CLK_ENABLE();
  533. /**TIM2 GPIO Configuration
  534. PA3 ------> TIM2_CH4
  535. */
  536. GPIO_InitStruct.Pin = GPIO_PIN_3;
  537. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  538. GPIO_InitStruct.Pull = GPIO_NOPULL;
  539. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  540. GPIO_InitStruct.Alternate = GPIO_AF1_TIM2;
  541. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  542. /* USER CODE BEGIN TIM2_MspPostInit 1 */
  543. /* USER CODE END TIM2_MspPostInit 1 */
  544. }
  545. else if(htim->Instance==TIM3)
  546. {
  547. /* USER CODE BEGIN TIM3_MspPostInit 0 */
  548. /* USER CODE END TIM3_MspPostInit 0 */
  549. __HAL_RCC_GPIOB_CLK_ENABLE();
  550. /**TIM3 GPIO Configuration
  551. PB0 ------> TIM3_CH3
  552. */
  553. GPIO_InitStruct.Pin = GPIO_PIN_0;
  554. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  555. GPIO_InitStruct.Pull = GPIO_NOPULL;
  556. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  557. GPIO_InitStruct.Alternate = GPIO_AF2_TIM3;
  558. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  559. /* USER CODE BEGIN TIM3_MspPostInit 1 */
  560. /* USER CODE END TIM3_MspPostInit 1 */
  561. }
  562. }
  563. /**
  564. * @brief TIM_PWM MSP De-Initialization
  565. * This function freeze the hardware resources used in this example
  566. * @param htim_pwm: TIM_PWM handle pointer
  567. * @retval None
  568. */
  569. void HAL_TIM_PWM_MspDeInit(TIM_HandleTypeDef* htim_pwm)
  570. {
  571. if(htim_pwm->Instance==TIM2)
  572. {
  573. /* USER CODE BEGIN TIM2_MspDeInit 0 */
  574. /* USER CODE END TIM2_MspDeInit 0 */
  575. /* Peripheral clock disable */
  576. __HAL_RCC_TIM2_CLK_DISABLE();
  577. /* USER CODE BEGIN TIM2_MspDeInit 1 */
  578. /* USER CODE END TIM2_MspDeInit 1 */
  579. }
  580. }
  581. /**
  582. * @brief TIM_Base MSP De-Initialization
  583. * This function freeze the hardware resources used in this example
  584. * @param htim_base: TIM_Base handle pointer
  585. * @retval None
  586. */
  587. void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim_base)
  588. {
  589. if(htim_base->Instance==TIM3)
  590. {
  591. /* USER CODE BEGIN TIM3_MspDeInit 0 */
  592. /* USER CODE END TIM3_MspDeInit 0 */
  593. /* Peripheral clock disable */
  594. __HAL_RCC_TIM3_CLK_DISABLE();
  595. /* USER CODE BEGIN TIM3_MspDeInit 1 */
  596. /* USER CODE END TIM3_MspDeInit 1 */
  597. }
  598. else if(htim_base->Instance==TIM11)
  599. {
  600. /* USER CODE BEGIN TIM11_MspDeInit 0 */
  601. /* USER CODE END TIM11_MspDeInit 0 */
  602. /* Peripheral clock disable */
  603. __HAL_RCC_TIM11_CLK_DISABLE();
  604. /* USER CODE BEGIN TIM11_MspDeInit 1 */
  605. /* USER CODE END TIM11_MspDeInit 1 */
  606. }
  607. else if(htim_base->Instance==TIM13)
  608. {
  609. /* USER CODE BEGIN TIM13_MspDeInit 0 */
  610. /* USER CODE END TIM13_MspDeInit 0 */
  611. /* Peripheral clock disable */
  612. __HAL_RCC_TIM13_CLK_DISABLE();
  613. /* USER CODE BEGIN TIM13_MspDeInit 1 */
  614. /* USER CODE END TIM13_MspDeInit 1 */
  615. }
  616. else if(htim_base->Instance==TIM14)
  617. {
  618. /* USER CODE BEGIN TIM14_MspDeInit 0 */
  619. /* USER CODE END TIM14_MspDeInit 0 */
  620. /* Peripheral clock disable */
  621. __HAL_RCC_TIM14_CLK_DISABLE();
  622. /* USER CODE BEGIN TIM14_MspDeInit 1 */
  623. /* USER CODE END TIM14_MspDeInit 1 */
  624. }
  625. }
  626. /**
  627. * @brief UART MSP Initialization
  628. * This function configures the hardware resources used in this example
  629. * @param huart: UART handle pointer
  630. * @retval None
  631. */
  632. void HAL_UART_MspInit(UART_HandleTypeDef* huart)
  633. {
  634. GPIO_InitTypeDef GPIO_InitStruct = {0};
  635. if(huart->Instance==USART1)
  636. {
  637. /* USER CODE BEGIN USART1_MspInit 0 */
  638. /* USER CODE END USART1_MspInit 0 */
  639. /* Peripheral clock enable */
  640. __HAL_RCC_USART1_CLK_ENABLE();
  641. __HAL_RCC_GPIOA_CLK_ENABLE();
  642. /**USART1 GPIO Configuration
  643. PA9 ------> USART1_TX
  644. PA10 ------> USART1_RX
  645. */
  646. GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10;
  647. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  648. GPIO_InitStruct.Pull = GPIO_NOPULL;
  649. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  650. GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
  651. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  652. /* USER CODE BEGIN USART1_MspInit 1 */
  653. /* USER CODE END USART1_MspInit 1 */
  654. }
  655. else if(huart->Instance==USART2)
  656. {
  657. /* USER CODE BEGIN USART2_MspInit 0 */
  658. /* USER CODE END USART2_MspInit 0 */
  659. /* Peripheral clock enable */
  660. __HAL_RCC_USART2_CLK_ENABLE();
  661. __HAL_RCC_GPIOD_CLK_ENABLE();
  662. /**USART2 GPIO Configuration
  663. PD5 ------> USART2_TX
  664. PD6 ------> USART2_RX
  665. */
  666. GPIO_InitStruct.Pin = GPIO_PIN_5|GPIO_PIN_6;
  667. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  668. GPIO_InitStruct.Pull = GPIO_NOPULL;
  669. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  670. GPIO_InitStruct.Alternate = GPIO_AF7_USART2;
  671. HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
  672. /* USER CODE BEGIN USART2_MspInit 1 */
  673. /* USER CODE END USART2_MspInit 1 */
  674. }
  675. }
  676. /**
  677. * @brief UART MSP De-Initialization
  678. * This function freeze the hardware resources used in this example
  679. * @param huart: UART handle pointer
  680. * @retval None
  681. */
  682. void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
  683. {
  684. if(huart->Instance==USART1)
  685. {
  686. /* USER CODE BEGIN USART1_MspDeInit 0 */
  687. /* USER CODE END USART1_MspDeInit 0 */
  688. /* Peripheral clock disable */
  689. __HAL_RCC_USART1_CLK_DISABLE();
  690. /**USART1 GPIO Configuration
  691. PA9 ------> USART1_TX
  692. PA10 ------> USART1_RX
  693. */
  694. HAL_GPIO_DeInit(GPIOA, GPIO_PIN_9|GPIO_PIN_10);
  695. /* USER CODE BEGIN USART1_MspDeInit 1 */
  696. /* USER CODE END USART1_MspDeInit 1 */
  697. }
  698. else if(huart->Instance==USART2)
  699. {
  700. /* USER CODE BEGIN USART2_MspDeInit 0 */
  701. /* USER CODE END USART2_MspDeInit 0 */
  702. /* Peripheral clock disable */
  703. __HAL_RCC_USART2_CLK_DISABLE();
  704. /**USART2 GPIO Configuration
  705. PD5 ------> USART2_TX
  706. PD6 ------> USART2_RX
  707. */
  708. HAL_GPIO_DeInit(GPIOD, GPIO_PIN_5|GPIO_PIN_6);
  709. /* USER CODE BEGIN USART2_MspDeInit 1 */
  710. /* USER CODE END USART2_MspDeInit 1 */
  711. }
  712. }
  713. static uint32_t FMC_Initialized = 0;
  714. static void HAL_FMC_MspInit(void){
  715. /* USER CODE BEGIN FMC_MspInit 0 */
  716. /* USER CODE END FMC_MspInit 0 */
  717. GPIO_InitTypeDef GPIO_InitStruct;
  718. if (FMC_Initialized) {
  719. return;
  720. }
  721. FMC_Initialized = 1;
  722. /* Peripheral clock enable */
  723. __HAL_RCC_FMC_CLK_ENABLE();
  724. /** FMC GPIO Configuration
  725. PF0 ------> FMC_A0
  726. PF1 ------> FMC_A1
  727. PF2 ------> FMC_A2
  728. PF3 ------> FMC_A3
  729. PF4 ------> FMC_A4
  730. PF5 ------> FMC_A5
  731. PC0 ------> FMC_SDNWE
  732. PC2 ------> FMC_SDNE0
  733. PC3 ------> FMC_SDCKE0
  734. PF11 ------> FMC_SDNRAS
  735. PF12 ------> FMC_A6
  736. PF13 ------> FMC_A7
  737. PF14 ------> FMC_A8
  738. PF15 ------> FMC_A9
  739. PG0 ------> FMC_A10
  740. PG1 ------> FMC_A11
  741. PE7 ------> FMC_D4
  742. PE8 ------> FMC_D5
  743. PE9 ------> FMC_D6
  744. PE10 ------> FMC_D7
  745. PE11 ------> FMC_D8
  746. PE12 ------> FMC_D9
  747. PE13 ------> FMC_D10
  748. PE14 ------> FMC_D11
  749. PE15 ------> FMC_D12
  750. PD8 ------> FMC_D13
  751. PD9 ------> FMC_D14
  752. PD10 ------> FMC_D15
  753. PD14 ------> FMC_D0
  754. PD15 ------> FMC_D1
  755. PG2 ------> FMC_A12
  756. PG4 ------> FMC_BA0
  757. PG5 ------> FMC_BA1
  758. PG8 ------> FMC_SDCLK
  759. PD0 ------> FMC_D2
  760. PD1 ------> FMC_D3
  761. PG15 ------> FMC_SDNCAS
  762. */
  763. GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3
  764. |GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_11|GPIO_PIN_12
  765. |GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15;
  766. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  767. GPIO_InitStruct.Pull = GPIO_NOPULL;
  768. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  769. GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
  770. HAL_GPIO_Init(GPIOF, &GPIO_InitStruct);
  771. GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_2|GPIO_PIN_3;
  772. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  773. GPIO_InitStruct.Pull = GPIO_NOPULL;
  774. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  775. GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
  776. HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  777. GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_4
  778. |GPIO_PIN_5|GPIO_PIN_8|GPIO_PIN_15;
  779. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  780. GPIO_InitStruct.Pull = GPIO_NOPULL;
  781. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  782. GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
  783. HAL_GPIO_Init(GPIOG, &GPIO_InitStruct);
  784. GPIO_InitStruct.Pin = GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10
  785. |GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14
  786. |GPIO_PIN_15;
  787. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  788. GPIO_InitStruct.Pull = GPIO_NOPULL;
  789. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  790. GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
  791. HAL_GPIO_Init(GPIOE, &GPIO_InitStruct);
  792. GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_14
  793. |GPIO_PIN_15|GPIO_PIN_0|GPIO_PIN_1;
  794. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  795. GPIO_InitStruct.Pull = GPIO_NOPULL;
  796. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  797. GPIO_InitStruct.Alternate = GPIO_AF12_FMC;
  798. HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
  799. /* USER CODE BEGIN FMC_MspInit 1 */
  800. /* USER CODE END FMC_MspInit 1 */
  801. }
  802. void HAL_SDRAM_MspInit(SDRAM_HandleTypeDef* hsdram){
  803. /* USER CODE BEGIN SDRAM_MspInit 0 */
  804. /* USER CODE END SDRAM_MspInit 0 */
  805. HAL_FMC_MspInit();
  806. /* USER CODE BEGIN SDRAM_MspInit 1 */
  807. /* USER CODE END SDRAM_MspInit 1 */
  808. }
  809. static uint32_t FMC_DeInitialized = 0;
  810. static void HAL_FMC_MspDeInit(void){
  811. /* USER CODE BEGIN FMC_MspDeInit 0 */
  812. /* USER CODE END FMC_MspDeInit 0 */
  813. if (FMC_DeInitialized) {
  814. return;
  815. }
  816. FMC_DeInitialized = 1;
  817. /* Peripheral clock enable */
  818. __HAL_RCC_FMC_CLK_DISABLE();
  819. /** FMC GPIO Configuration
  820. PF0 ------> FMC_A0
  821. PF1 ------> FMC_A1
  822. PF2 ------> FMC_A2
  823. PF3 ------> FMC_A3
  824. PF4 ------> FMC_A4
  825. PF5 ------> FMC_A5
  826. PC0 ------> FMC_SDNWE
  827. PC2 ------> FMC_SDNE0
  828. PC3 ------> FMC_SDCKE0
  829. PF11 ------> FMC_SDNRAS
  830. PF12 ------> FMC_A6
  831. PF13 ------> FMC_A7
  832. PF14 ------> FMC_A8
  833. PF15 ------> FMC_A9
  834. PG0 ------> FMC_A10
  835. PG1 ------> FMC_A11
  836. PE7 ------> FMC_D4
  837. PE8 ------> FMC_D5
  838. PE9 ------> FMC_D6
  839. PE10 ------> FMC_D7
  840. PE11 ------> FMC_D8
  841. PE12 ------> FMC_D9
  842. PE13 ------> FMC_D10
  843. PE14 ------> FMC_D11
  844. PE15 ------> FMC_D12
  845. PD8 ------> FMC_D13
  846. PD9 ------> FMC_D14
  847. PD10 ------> FMC_D15
  848. PD14 ------> FMC_D0
  849. PD15 ------> FMC_D1
  850. PG2 ------> FMC_A12
  851. PG4 ------> FMC_BA0
  852. PG5 ------> FMC_BA1
  853. PG8 ------> FMC_SDCLK
  854. PD0 ------> FMC_D2
  855. PD1 ------> FMC_D3
  856. PG15 ------> FMC_SDNCAS
  857. */
  858. HAL_GPIO_DeInit(GPIOF, GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_3
  859. |GPIO_PIN_4|GPIO_PIN_5|GPIO_PIN_11|GPIO_PIN_12
  860. |GPIO_PIN_13|GPIO_PIN_14|GPIO_PIN_15);
  861. HAL_GPIO_DeInit(GPIOC, GPIO_PIN_0|GPIO_PIN_2|GPIO_PIN_3);
  862. HAL_GPIO_DeInit(GPIOG, GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_2|GPIO_PIN_4
  863. |GPIO_PIN_5|GPIO_PIN_8|GPIO_PIN_15);
  864. HAL_GPIO_DeInit(GPIOE, GPIO_PIN_7|GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10
  865. |GPIO_PIN_11|GPIO_PIN_12|GPIO_PIN_13|GPIO_PIN_14
  866. |GPIO_PIN_15);
  867. HAL_GPIO_DeInit(GPIOD, GPIO_PIN_8|GPIO_PIN_9|GPIO_PIN_10|GPIO_PIN_14
  868. |GPIO_PIN_15|GPIO_PIN_0|GPIO_PIN_1);
  869. /* USER CODE BEGIN FMC_MspDeInit 1 */
  870. /* USER CODE END FMC_MspDeInit 1 */
  871. }
  872. void HAL_SDRAM_MspDeInit(SDRAM_HandleTypeDef* hsdram){
  873. /* USER CODE BEGIN SDRAM_MspDeInit 0 */
  874. /* USER CODE END SDRAM_MspDeInit 0 */
  875. HAL_FMC_MspDeInit();
  876. /* USER CODE BEGIN SDRAM_MspDeInit 1 */
  877. /* USER CODE END SDRAM_MspDeInit 1 */
  878. }
  879. /* USER CODE BEGIN 1 */
  880. /* USER CODE END 1 */
  881. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/