stm32f4xx_hal_msp.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * File Name : stm32f4xx_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. void HAL_TIM_MspPostInit(TIM_HandleTypeDef *htim);
  67. /**
  68. * Initializes the Global MSP.
  69. */
  70. void HAL_MspInit(void)
  71. {
  72. /* USER CODE BEGIN MspInit 0 */
  73. /* USER CODE END MspInit 0 */
  74. __HAL_RCC_SYSCFG_CLK_ENABLE();
  75. __HAL_RCC_PWR_CLK_ENABLE();
  76. HAL_NVIC_SetPriorityGrouping(NVIC_PRIORITYGROUP_0);
  77. /* System interrupt init*/
  78. /* USER CODE BEGIN MspInit 1 */
  79. /* USER CODE END MspInit 1 */
  80. }
  81. /**
  82. * @brief ADC MSP Initialization
  83. * This function configures the hardware resources used in this example
  84. * @param hadc: ADC handle pointer
  85. * @retval None
  86. */
  87. void HAL_ADC_MspInit(ADC_HandleTypeDef* hadc)
  88. {
  89. GPIO_InitTypeDef GPIO_InitStruct = {0};
  90. if(hadc->Instance==ADC1)
  91. {
  92. /* USER CODE BEGIN ADC1_MspInit 0 */
  93. /* USER CODE END ADC1_MspInit 0 */
  94. /* Peripheral clock enable */
  95. __HAL_RCC_ADC1_CLK_ENABLE();
  96. __HAL_RCC_GPIOC_CLK_ENABLE();
  97. __HAL_RCC_GPIOA_CLK_ENABLE();
  98. __HAL_RCC_GPIOB_CLK_ENABLE();
  99. /**ADC1 GPIO Configuration
  100. PC0 ------> ADC1_IN10
  101. PC1 ------> ADC1_IN11
  102. PA0-WKUP ------> ADC1_IN0
  103. PA1 ------> ADC1_IN1
  104. PA4 ------> ADC1_IN4
  105. PB0 ------> ADC1_IN8
  106. */
  107. GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1;
  108. GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
  109. GPIO_InitStruct.Pull = GPIO_NOPULL;
  110. HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  111. GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_4;
  112. GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
  113. GPIO_InitStruct.Pull = GPIO_NOPULL;
  114. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  115. GPIO_InitStruct.Pin = GPIO_PIN_0;
  116. GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
  117. GPIO_InitStruct.Pull = GPIO_NOPULL;
  118. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  119. /* USER CODE BEGIN ADC1_MspInit 1 */
  120. /* USER CODE END ADC1_MspInit 1 */
  121. }
  122. }
  123. /**
  124. * @brief ADC MSP De-Initialization
  125. * This function freeze the hardware resources used in this example
  126. * @param hadc: ADC handle pointer
  127. * @retval None
  128. */
  129. void HAL_ADC_MspDeInit(ADC_HandleTypeDef* hadc)
  130. {
  131. if(hadc->Instance==ADC1)
  132. {
  133. /* USER CODE BEGIN ADC1_MspDeInit 0 */
  134. /* USER CODE END ADC1_MspDeInit 0 */
  135. /* Peripheral clock disable */
  136. __HAL_RCC_ADC1_CLK_DISABLE();
  137. /**ADC1 GPIO Configuration
  138. PC0 ------> ADC1_IN10
  139. PC1 ------> ADC1_IN11
  140. PA0-WKUP ------> ADC1_IN0
  141. PA1 ------> ADC1_IN1
  142. PA4 ------> ADC1_IN4
  143. PB0 ------> ADC1_IN8
  144. */
  145. HAL_GPIO_DeInit(GPIOC, GPIO_PIN_0|GPIO_PIN_1);
  146. HAL_GPIO_DeInit(GPIOA, GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_4);
  147. HAL_GPIO_DeInit(GPIOB, GPIO_PIN_0);
  148. /* USER CODE BEGIN ADC1_MspDeInit 1 */
  149. /* USER CODE END ADC1_MspDeInit 1 */
  150. }
  151. }
  152. /**
  153. * @brief RTC MSP Initialization
  154. * This function configures the hardware resources used in this example
  155. * @param hrtc: RTC handle pointer
  156. * @retval None
  157. */
  158. void HAL_RTC_MspInit(RTC_HandleTypeDef* hrtc)
  159. {
  160. RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
  161. if(hrtc->Instance==RTC)
  162. {
  163. /* USER CODE BEGIN RTC_MspInit 0 */
  164. /* USER CODE END RTC_MspInit 0 */
  165. /** Initializes the peripherals clock
  166. */
  167. PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RTC;
  168. PeriphClkInitStruct.RTCClockSelection = RCC_RTCCLKSOURCE_LSI;
  169. if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
  170. {
  171. Error_Handler();
  172. }
  173. /* Peripheral clock enable */
  174. __HAL_RCC_RTC_ENABLE();
  175. /* USER CODE BEGIN RTC_MspInit 1 */
  176. /* USER CODE END RTC_MspInit 1 */
  177. }
  178. }
  179. /**
  180. * @brief RTC MSP De-Initialization
  181. * This function freeze the hardware resources used in this example
  182. * @param hrtc: RTC handle pointer
  183. * @retval None
  184. */
  185. void HAL_RTC_MspDeInit(RTC_HandleTypeDef* hrtc)
  186. {
  187. if(hrtc->Instance==RTC)
  188. {
  189. /* USER CODE BEGIN RTC_MspDeInit 0 */
  190. /* USER CODE END RTC_MspDeInit 0 */
  191. /* Peripheral clock disable */
  192. __HAL_RCC_RTC_DISABLE();
  193. /* USER CODE BEGIN RTC_MspDeInit 1 */
  194. /* USER CODE END RTC_MspDeInit 1 */
  195. }
  196. }
  197. /**
  198. * @brief TIM_Base MSP Initialization
  199. * This function configures the hardware resources used in this example
  200. * @param htim_base: TIM_Base handle pointer
  201. * @retval None
  202. */
  203. void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base)
  204. {
  205. if(htim_base->Instance==TIM1)
  206. {
  207. /* USER CODE BEGIN TIM1_MspInit 0 */
  208. /* USER CODE END TIM1_MspInit 0 */
  209. /* Peripheral clock enable */
  210. __HAL_RCC_TIM1_CLK_ENABLE();
  211. /* USER CODE BEGIN TIM1_MspInit 1 */
  212. /* USER CODE END TIM1_MspInit 1 */
  213. }
  214. else if(htim_base->Instance==TIM2)
  215. {
  216. /* USER CODE BEGIN TIM2_MspInit 0 */
  217. /* USER CODE END TIM2_MspInit 0 */
  218. /* Peripheral clock enable */
  219. __HAL_RCC_TIM2_CLK_ENABLE();
  220. /* USER CODE BEGIN TIM2_MspInit 1 */
  221. /* USER CODE END TIM2_MspInit 1 */
  222. }
  223. else if(htim_base->Instance==TIM3)
  224. {
  225. /* USER CODE BEGIN TIM3_MspInit 0 */
  226. /* USER CODE END TIM3_MspInit 0 */
  227. /* Peripheral clock enable */
  228. __HAL_RCC_TIM3_CLK_ENABLE();
  229. /* USER CODE BEGIN TIM3_MspInit 1 */
  230. /* USER CODE END TIM3_MspInit 1 */
  231. }
  232. else if(htim_base->Instance==TIM4)
  233. {
  234. /* USER CODE BEGIN TIM4_MspInit 0 */
  235. /* USER CODE END TIM4_MspInit 0 */
  236. /* Peripheral clock enable */
  237. __HAL_RCC_TIM4_CLK_ENABLE();
  238. /* USER CODE BEGIN TIM4_MspInit 1 */
  239. /* USER CODE END TIM4_MspInit 1 */
  240. }
  241. }
  242. void HAL_TIM_MspPostInit(TIM_HandleTypeDef* htim)
  243. {
  244. GPIO_InitTypeDef GPIO_InitStruct = {0};
  245. if(htim->Instance==TIM1)
  246. {
  247. /* USER CODE BEGIN TIM1_MspPostInit 0 */
  248. /* USER CODE END TIM1_MspPostInit 0 */
  249. __HAL_RCC_GPIOA_CLK_ENABLE();
  250. /**TIM1 GPIO Configuration
  251. PA7 ------> TIM1_CH1N
  252. */
  253. GPIO_InitStruct.Pin = GPIO_PIN_7;
  254. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  255. GPIO_InitStruct.Pull = GPIO_NOPULL;
  256. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  257. GPIO_InitStruct.Alternate = GPIO_AF1_TIM1;
  258. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  259. /* USER CODE BEGIN TIM1_MspPostInit 1 */
  260. /* USER CODE END TIM1_MspPostInit 1 */
  261. }
  262. else if(htim->Instance==TIM2)
  263. {
  264. /* USER CODE BEGIN TIM2_MspPostInit 0 */
  265. /* USER CODE END TIM2_MspPostInit 0 */
  266. __HAL_RCC_GPIOB_CLK_ENABLE();
  267. /**TIM2 GPIO Configuration
  268. PB10 ------> TIM2_CH3
  269. PB3 ------> TIM2_CH2
  270. */
  271. GPIO_InitStruct.Pin = GPIO_PIN_10|GPIO_PIN_3;
  272. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  273. GPIO_InitStruct.Pull = GPIO_NOPULL;
  274. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  275. GPIO_InitStruct.Alternate = GPIO_AF1_TIM2;
  276. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  277. /* USER CODE BEGIN TIM2_MspPostInit 1 */
  278. /* USER CODE END TIM2_MspPostInit 1 */
  279. }
  280. else if(htim->Instance==TIM3)
  281. {
  282. /* USER CODE BEGIN TIM3_MspPostInit 0 */
  283. /* USER CODE END TIM3_MspPostInit 0 */
  284. __HAL_RCC_GPIOB_CLK_ENABLE();
  285. __HAL_RCC_GPIOC_CLK_ENABLE();
  286. /**TIM3 GPIO Configuration
  287. PB1 ------> TIM3_CH4
  288. PC7 ------> TIM3_CH2
  289. PB4 ------> TIM3_CH1
  290. */
  291. GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_4;
  292. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  293. GPIO_InitStruct.Pull = GPIO_NOPULL;
  294. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  295. GPIO_InitStruct.Alternate = GPIO_AF2_TIM3;
  296. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  297. GPIO_InitStruct.Pin = GPIO_PIN_7;
  298. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  299. GPIO_InitStruct.Pull = GPIO_NOPULL;
  300. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  301. GPIO_InitStruct.Alternate = GPIO_AF2_TIM3;
  302. HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  303. /* USER CODE BEGIN TIM3_MspPostInit 1 */
  304. /* USER CODE END TIM3_MspPostInit 1 */
  305. }
  306. else if(htim->Instance==TIM4)
  307. {
  308. /* USER CODE BEGIN TIM4_MspPostInit 0 */
  309. /* USER CODE END TIM4_MspPostInit 0 */
  310. __HAL_RCC_GPIOB_CLK_ENABLE();
  311. /**TIM4 GPIO Configuration
  312. PB6 ------> TIM4_CH1
  313. */
  314. GPIO_InitStruct.Pin = GPIO_PIN_6;
  315. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  316. GPIO_InitStruct.Pull = GPIO_NOPULL;
  317. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  318. GPIO_InitStruct.Alternate = GPIO_AF2_TIM4;
  319. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  320. /* USER CODE BEGIN TIM4_MspPostInit 1 */
  321. /* USER CODE END TIM4_MspPostInit 1 */
  322. }
  323. }
  324. /**
  325. * @brief TIM_Base MSP De-Initialization
  326. * This function freeze the hardware resources used in this example
  327. * @param htim_base: TIM_Base handle pointer
  328. * @retval None
  329. */
  330. void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim_base)
  331. {
  332. if(htim_base->Instance==TIM1)
  333. {
  334. /* USER CODE BEGIN TIM1_MspDeInit 0 */
  335. /* USER CODE END TIM1_MspDeInit 0 */
  336. /* Peripheral clock disable */
  337. __HAL_RCC_TIM1_CLK_DISABLE();
  338. /* USER CODE BEGIN TIM1_MspDeInit 1 */
  339. /* USER CODE END TIM1_MspDeInit 1 */
  340. }
  341. else if(htim_base->Instance==TIM2)
  342. {
  343. /* USER CODE BEGIN TIM2_MspDeInit 0 */
  344. /* USER CODE END TIM2_MspDeInit 0 */
  345. /* Peripheral clock disable */
  346. __HAL_RCC_TIM2_CLK_DISABLE();
  347. /* USER CODE BEGIN TIM2_MspDeInit 1 */
  348. /* USER CODE END TIM2_MspDeInit 1 */
  349. }
  350. else if(htim_base->Instance==TIM3)
  351. {
  352. /* USER CODE BEGIN TIM3_MspDeInit 0 */
  353. /* USER CODE END TIM3_MspDeInit 0 */
  354. /* Peripheral clock disable */
  355. __HAL_RCC_TIM3_CLK_DISABLE();
  356. /* USER CODE BEGIN TIM3_MspDeInit 1 */
  357. /* USER CODE END TIM3_MspDeInit 1 */
  358. }
  359. else if(htim_base->Instance==TIM4)
  360. {
  361. /* USER CODE BEGIN TIM4_MspDeInit 0 */
  362. /* USER CODE END TIM4_MspDeInit 0 */
  363. /* Peripheral clock disable */
  364. __HAL_RCC_TIM4_CLK_DISABLE();
  365. /* USER CODE BEGIN TIM4_MspDeInit 1 */
  366. /* USER CODE END TIM4_MspDeInit 1 */
  367. }
  368. }
  369. /**
  370. * @brief UART MSP Initialization
  371. * This function configures the hardware resources used in this example
  372. * @param huart: UART handle pointer
  373. * @retval None
  374. */
  375. void HAL_UART_MspInit(UART_HandleTypeDef* huart)
  376. {
  377. GPIO_InitTypeDef GPIO_InitStruct = {0};
  378. if(huart->Instance==USART2)
  379. {
  380. /* USER CODE BEGIN USART2_MspInit 0 */
  381. /* USER CODE END USART2_MspInit 0 */
  382. /* Peripheral clock enable */
  383. __HAL_RCC_USART2_CLK_ENABLE();
  384. __HAL_RCC_GPIOA_CLK_ENABLE();
  385. /**USART2 GPIO Configuration
  386. PA2 ------> USART2_TX
  387. PA3 ------> USART2_RX
  388. */
  389. GPIO_InitStruct.Pin = GPIO_PIN_2|GPIO_PIN_3;
  390. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  391. GPIO_InitStruct.Pull = GPIO_NOPULL;
  392. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  393. GPIO_InitStruct.Alternate = GPIO_AF7_USART2;
  394. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  395. /* USER CODE BEGIN USART2_MspInit 1 */
  396. /* USER CODE END USART2_MspInit 1 */
  397. }
  398. else if(huart->Instance==USART6)
  399. {
  400. /* USER CODE BEGIN USART6_MspInit 0 */
  401. /* USER CODE END USART6_MspInit 0 */
  402. /* Peripheral clock enable */
  403. __HAL_RCC_USART6_CLK_ENABLE();
  404. __HAL_RCC_GPIOA_CLK_ENABLE();
  405. /**USART6 GPIO Configuration
  406. PA11 ------> USART6_TX
  407. PA12 ------> USART6_RX
  408. */
  409. GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12;
  410. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  411. GPIO_InitStruct.Pull = GPIO_NOPULL;
  412. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
  413. GPIO_InitStruct.Alternate = GPIO_AF8_USART6;
  414. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  415. /* USER CODE BEGIN USART6_MspInit 1 */
  416. /* USER CODE END USART6_MspInit 1 */
  417. }
  418. }
  419. /**
  420. * @brief UART MSP De-Initialization
  421. * This function freeze the hardware resources used in this example
  422. * @param huart: UART handle pointer
  423. * @retval None
  424. */
  425. void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
  426. {
  427. if(huart->Instance==USART2)
  428. {
  429. /* USER CODE BEGIN USART2_MspDeInit 0 */
  430. /* USER CODE END USART2_MspDeInit 0 */
  431. /* Peripheral clock disable */
  432. __HAL_RCC_USART2_CLK_DISABLE();
  433. /**USART2 GPIO Configuration
  434. PA2 ------> USART2_TX
  435. PA3 ------> USART2_RX
  436. */
  437. HAL_GPIO_DeInit(GPIOA, GPIO_PIN_2|GPIO_PIN_3);
  438. /* USER CODE BEGIN USART2_MspDeInit 1 */
  439. /* USER CODE END USART2_MspDeInit 1 */
  440. }
  441. else if(huart->Instance==USART6)
  442. {
  443. /* USER CODE BEGIN USART6_MspDeInit 0 */
  444. /* USER CODE END USART6_MspDeInit 0 */
  445. /* Peripheral clock disable */
  446. __HAL_RCC_USART6_CLK_DISABLE();
  447. /**USART6 GPIO Configuration
  448. PA11 ------> USART6_TX
  449. PA12 ------> USART6_RX
  450. */
  451. HAL_GPIO_DeInit(GPIOA, GPIO_PIN_11|GPIO_PIN_12);
  452. /* USER CODE BEGIN USART6_MspDeInit 1 */
  453. /* USER CODE END USART6_MspDeInit 1 */
  454. }
  455. }
  456. /* USER CODE BEGIN 1 */
  457. /* USER CODE END 1 */