stm32wbxx_hal_msp.c 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621
  1. /* USER CODE BEGIN Header */
  2. /**
  3. ******************************************************************************
  4. * File Name : stm32wbxx_hal_msp.c
  5. * Description : This file provides code for the MSP Initialization
  6. * and de-Initialization codes.
  7. ******************************************************************************
  8. * @attention
  9. *
  10. * <h2><center>&copy; Copyright (c) 2020 STMicroelectronics.
  11. * All rights reserved.</center></h2>
  12. *
  13. * This software component is licensed by ST under BSD 3-Clause license,
  14. * the "License"; You may not use this file except in compliance with the
  15. * License. You may obtain a copy of the License at:
  16. * opensource.org/licenses/BSD-3-Clause
  17. *
  18. ******************************************************************************
  19. */
  20. /* USER CODE END Header */
  21. /* Includes ------------------------------------------------------------------*/
  22. #include "main.h"
  23. /* USER CODE BEGIN Includes */
  24. #include <drv_common.h>
  25. /* USER CODE END Includes */
  26. /* Private typedef -----------------------------------------------------------*/
  27. /* USER CODE BEGIN TD */
  28. /* USER CODE END TD */
  29. /* Private define ------------------------------------------------------------*/
  30. /* USER CODE BEGIN Define */
  31. /* USER CODE END Define */
  32. /* Private macro -------------------------------------------------------------*/
  33. /* USER CODE BEGIN Macro */
  34. /* USER CODE END Macro */
  35. /* Private variables ---------------------------------------------------------*/
  36. /* USER CODE BEGIN PV */
  37. /* USER CODE END PV */
  38. /* Private function prototypes -----------------------------------------------*/
  39. /* USER CODE BEGIN PFP */
  40. /* USER CODE END PFP */
  41. /* External functions --------------------------------------------------------*/
  42. /* USER CODE BEGIN ExternalFunctions */
  43. /* USER CODE END ExternalFunctions */
  44. /* USER CODE BEGIN 0 */
  45. /* USER CODE END 0 */
  46. /**
  47. * Initializes the Global MSP.
  48. */
  49. void HAL_MspInit(void)
  50. {
  51. /* USER CODE BEGIN MspInit 0 */
  52. /* USER CODE END MspInit 0 */
  53. /* System interrupt init*/
  54. /* USER CODE BEGIN MspInit 1 */
  55. /* USER CODE END MspInit 1 */
  56. }
  57. /**
  58. * @brief ADC MSP Initialization
  59. * This function configures the hardware resources used in this example
  60. * @param hadc: ADC handle pointer
  61. * @retval None
  62. */
  63. void HAL_ADC_MspInit(ADC_HandleTypeDef* hadc)
  64. {
  65. GPIO_InitTypeDef GPIO_InitStruct = {0};
  66. if(hadc->Instance==ADC1)
  67. {
  68. /* USER CODE BEGIN ADC1_MspInit 0 */
  69. /* USER CODE END ADC1_MspInit 0 */
  70. /* Peripheral clock enable */
  71. __HAL_RCC_ADC_CLK_ENABLE();
  72. __HAL_RCC_GPIOA_CLK_ENABLE();
  73. /**ADC1 GPIO Configuration
  74. PA0 ------> ADC1_IN5
  75. */
  76. GPIO_InitStruct.Pin = GPIO_PIN_0;
  77. GPIO_InitStruct.Mode = GPIO_MODE_ANALOG;
  78. GPIO_InitStruct.Pull = GPIO_NOPULL;
  79. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  80. /* USER CODE BEGIN ADC1_MspInit 1 */
  81. /* USER CODE END ADC1_MspInit 1 */
  82. }
  83. }
  84. /**
  85. * @brief ADC MSP De-Initialization
  86. * This function freeze the hardware resources used in this example
  87. * @param hadc: ADC handle pointer
  88. * @retval None
  89. */
  90. void HAL_ADC_MspDeInit(ADC_HandleTypeDef* hadc)
  91. {
  92. if(hadc->Instance==ADC1)
  93. {
  94. /* USER CODE BEGIN ADC1_MspDeInit 0 */
  95. /* USER CODE END ADC1_MspDeInit 0 */
  96. /* Peripheral clock disable */
  97. __HAL_RCC_ADC_CLK_DISABLE();
  98. /**ADC1 GPIO Configuration
  99. PA0 ------> ADC1_IN5
  100. */
  101. HAL_GPIO_DeInit(GPIOA, GPIO_PIN_0);
  102. /* USER CODE BEGIN ADC1_MspDeInit 1 */
  103. /* USER CODE END ADC1_MspDeInit 1 */
  104. }
  105. }
  106. /**
  107. * @brief I2C MSP Initialization
  108. * This function configures the hardware resources used in this example
  109. * @param hi2c: I2C handle pointer
  110. * @retval None
  111. */
  112. void HAL_I2C_MspInit(I2C_HandleTypeDef* hi2c)
  113. {
  114. GPIO_InitTypeDef GPIO_InitStruct = {0};
  115. if(hi2c->Instance==I2C1)
  116. {
  117. /* USER CODE BEGIN I2C1_MspInit 0 */
  118. /* USER CODE END I2C1_MspInit 0 */
  119. __HAL_RCC_GPIOB_CLK_ENABLE();
  120. /**I2C1 GPIO Configuration
  121. PB8 ------> I2C1_SCL
  122. PB9 ------> I2C1_SDA
  123. */
  124. GPIO_InitStruct.Pin = GPIO_PIN_8|GPIO_PIN_9;
  125. GPIO_InitStruct.Mode = GPIO_MODE_AF_OD;
  126. GPIO_InitStruct.Pull = GPIO_PULLUP;
  127. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  128. GPIO_InitStruct.Alternate = GPIO_AF4_I2C1;
  129. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  130. /* Peripheral clock enable */
  131. __HAL_RCC_I2C1_CLK_ENABLE();
  132. /* USER CODE BEGIN I2C1_MspInit 1 */
  133. /* USER CODE END I2C1_MspInit 1 */
  134. }
  135. }
  136. /**
  137. * @brief I2C MSP De-Initialization
  138. * This function freeze the hardware resources used in this example
  139. * @param hi2c: I2C handle pointer
  140. * @retval None
  141. */
  142. void HAL_I2C_MspDeInit(I2C_HandleTypeDef* hi2c)
  143. {
  144. if(hi2c->Instance==I2C1)
  145. {
  146. /* USER CODE BEGIN I2C1_MspDeInit 0 */
  147. /* USER CODE END I2C1_MspDeInit 0 */
  148. /* Peripheral clock disable */
  149. __HAL_RCC_I2C1_CLK_DISABLE();
  150. /**I2C1 GPIO Configuration
  151. PB8 ------> I2C1_SCL
  152. PB9 ------> I2C1_SDA
  153. */
  154. HAL_GPIO_DeInit(GPIOB, GPIO_PIN_8);
  155. HAL_GPIO_DeInit(GPIOB, GPIO_PIN_9);
  156. /* USER CODE BEGIN I2C1_MspDeInit 1 */
  157. /* USER CODE END I2C1_MspDeInit 1 */
  158. }
  159. }
  160. /**
  161. * @brief UART MSP Initialization
  162. * This function configures the hardware resources used in this example
  163. * @param huart: UART handle pointer
  164. * @retval None
  165. */
  166. void HAL_UART_MspInit(UART_HandleTypeDef* huart)
  167. {
  168. GPIO_InitTypeDef GPIO_InitStruct = {0};
  169. if(huart->Instance==LPUART1)
  170. {
  171. /* USER CODE BEGIN LPUART1_MspInit 0 */
  172. /* USER CODE END LPUART1_MspInit 0 */
  173. /* Peripheral clock enable */
  174. __HAL_RCC_LPUART1_CLK_ENABLE();
  175. __HAL_RCC_GPIOB_CLK_ENABLE();
  176. /**LPUART1 GPIO Configuration
  177. PB10 ------> LPUART1_RX
  178. PB11 ------> LPUART1_TX
  179. */
  180. GPIO_InitStruct.Pin = GPIO_PIN_10|GPIO_PIN_11;
  181. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  182. GPIO_InitStruct.Pull = GPIO_PULLUP;
  183. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  184. GPIO_InitStruct.Alternate = GPIO_AF8_LPUART1;
  185. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  186. /* USER CODE BEGIN LPUART1_MspInit 1 */
  187. /* USER CODE END LPUART1_MspInit 1 */
  188. }
  189. else if(huart->Instance==USART1)
  190. {
  191. /* USER CODE BEGIN USART1_MspInit 0 */
  192. /* USER CODE END USART1_MspInit 0 */
  193. /* Peripheral clock enable */
  194. __HAL_RCC_USART1_CLK_ENABLE();
  195. __HAL_RCC_GPIOB_CLK_ENABLE();
  196. /**USART1 GPIO Configuration
  197. PB6 ------> USART1_TX
  198. PB7 ------> USART1_RX
  199. */
  200. GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7;
  201. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  202. GPIO_InitStruct.Pull = GPIO_PULLUP;
  203. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  204. GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
  205. HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
  206. /* USER CODE BEGIN USART1_MspInit 1 */
  207. /* USER CODE END USART1_MspInit 1 */
  208. }
  209. }
  210. /**
  211. * @brief UART MSP De-Initialization
  212. * This function freeze the hardware resources used in this example
  213. * @param huart: UART handle pointer
  214. * @retval None
  215. */
  216. void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
  217. {
  218. if(huart->Instance==LPUART1)
  219. {
  220. /* USER CODE BEGIN LPUART1_MspDeInit 0 */
  221. /* USER CODE END LPUART1_MspDeInit 0 */
  222. /* Peripheral clock disable */
  223. __HAL_RCC_LPUART1_CLK_DISABLE();
  224. /**LPUART1 GPIO Configuration
  225. PB10 ------> LPUART1_RX
  226. PB11 ------> LPUART1_TX
  227. */
  228. HAL_GPIO_DeInit(GPIOB, GPIO_PIN_10|GPIO_PIN_11);
  229. /* USER CODE BEGIN LPUART1_MspDeInit 1 */
  230. /* USER CODE END LPUART1_MspDeInit 1 */
  231. }
  232. else if(huart->Instance==USART1)
  233. {
  234. /* USER CODE BEGIN USART1_MspDeInit 0 */
  235. /* USER CODE END USART1_MspDeInit 0 */
  236. /* Peripheral clock disable */
  237. __HAL_RCC_USART1_CLK_DISABLE();
  238. /**USART1 GPIO Configuration
  239. PB6 ------> USART1_TX
  240. PB7 ------> USART1_RX
  241. */
  242. HAL_GPIO_DeInit(GPIOB, GPIO_PIN_6|GPIO_PIN_7);
  243. /* USER CODE BEGIN USART1_MspDeInit 1 */
  244. /* USER CODE END USART1_MspDeInit 1 */
  245. }
  246. }
  247. /**
  248. * @brief RTC MSP Initialization
  249. * This function configures the hardware resources used in this example
  250. * @param hrtc: RTC handle pointer
  251. * @retval None
  252. */
  253. void HAL_RTC_MspInit(RTC_HandleTypeDef* hrtc)
  254. {
  255. if(hrtc->Instance==RTC)
  256. {
  257. /* USER CODE BEGIN RTC_MspInit 0 */
  258. /* USER CODE END RTC_MspInit 0 */
  259. /* Peripheral clock enable */
  260. __HAL_RCC_RTC_ENABLE();
  261. __HAL_RCC_RTCAPB_CLK_ENABLE();
  262. /* USER CODE BEGIN RTC_MspInit 1 */
  263. /* USER CODE END RTC_MspInit 1 */
  264. }
  265. }
  266. /**
  267. * @brief RTC MSP De-Initialization
  268. * This function freeze the hardware resources used in this example
  269. * @param hrtc: RTC handle pointer
  270. * @retval None
  271. */
  272. void HAL_RTC_MspDeInit(RTC_HandleTypeDef* hrtc)
  273. {
  274. if(hrtc->Instance==RTC)
  275. {
  276. /* USER CODE BEGIN RTC_MspDeInit 0 */
  277. /* USER CODE END RTC_MspDeInit 0 */
  278. /* Peripheral clock disable */
  279. __HAL_RCC_RTC_DISABLE();
  280. __HAL_RCC_RTCAPB_CLK_DISABLE();
  281. /* USER CODE BEGIN RTC_MspDeInit 1 */
  282. /* USER CODE END RTC_MspDeInit 1 */
  283. }
  284. }
  285. /**
  286. * @brief SPI MSP Initialization
  287. * This function configures the hardware resources used in this example
  288. * @param hspi: SPI handle pointer
  289. * @retval None
  290. */
  291. void HAL_SPI_MspInit(SPI_HandleTypeDef* hspi)
  292. {
  293. GPIO_InitTypeDef GPIO_InitStruct = {0};
  294. if(hspi->Instance==SPI1)
  295. {
  296. /* USER CODE BEGIN SPI1_MspInit 0 */
  297. /* USER CODE END SPI1_MspInit 0 */
  298. /* Peripheral clock enable */
  299. __HAL_RCC_SPI1_CLK_ENABLE();
  300. __HAL_RCC_GPIOA_CLK_ENABLE();
  301. /**SPI1 GPIO Configuration
  302. PA1 ------> SPI1_SCK
  303. PA6 ------> SPI1_MISO
  304. PA7 ------> SPI1_MOSI
  305. */
  306. GPIO_InitStruct.Pin = GPIO_PIN_1|GPIO_PIN_6|GPIO_PIN_7;
  307. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  308. GPIO_InitStruct.Pull = GPIO_NOPULL;
  309. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  310. GPIO_InitStruct.Alternate = GPIO_AF5_SPI1;
  311. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  312. /* USER CODE BEGIN SPI1_MspInit 1 */
  313. /* USER CODE END SPI1_MspInit 1 */
  314. }
  315. else if(hspi->Instance==SPI2)
  316. {
  317. /* USER CODE BEGIN SPI2_MspInit 0 */
  318. /* USER CODE END SPI2_MspInit 0 */
  319. /* Peripheral clock enable */
  320. __HAL_RCC_SPI2_CLK_ENABLE();
  321. __HAL_RCC_GPIOC_CLK_ENABLE();
  322. __HAL_RCC_GPIOA_CLK_ENABLE();
  323. /**SPI2 GPIO Configuration
  324. PC1 ------> SPI2_MOSI
  325. PC2 ------> SPI2_MISO
  326. PA9 ------> SPI2_SCK
  327. */
  328. GPIO_InitStruct.Pin = GPIO_PIN_1;
  329. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  330. GPIO_InitStruct.Pull = GPIO_NOPULL;
  331. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  332. GPIO_InitStruct.Alternate = GPIO_AF3_SPI2;
  333. HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  334. GPIO_InitStruct.Pin = GPIO_PIN_2;
  335. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  336. GPIO_InitStruct.Pull = GPIO_NOPULL;
  337. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  338. GPIO_InitStruct.Alternate = GPIO_AF5_SPI2;
  339. HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
  340. GPIO_InitStruct.Pin = GPIO_PIN_9;
  341. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  342. GPIO_InitStruct.Pull = GPIO_NOPULL;
  343. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  344. GPIO_InitStruct.Alternate = GPIO_AF5_SPI2;
  345. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  346. /* USER CODE BEGIN SPI2_MspInit 1 */
  347. /* USER CODE END SPI2_MspInit 1 */
  348. }
  349. }
  350. /**
  351. * @brief SPI MSP De-Initialization
  352. * This function freeze the hardware resources used in this example
  353. * @param hspi: SPI handle pointer
  354. * @retval None
  355. */
  356. void HAL_SPI_MspDeInit(SPI_HandleTypeDef* hspi)
  357. {
  358. if(hspi->Instance==SPI1)
  359. {
  360. /* USER CODE BEGIN SPI1_MspDeInit 0 */
  361. /* USER CODE END SPI1_MspDeInit 0 */
  362. /* Peripheral clock disable */
  363. __HAL_RCC_SPI1_CLK_DISABLE();
  364. /**SPI1 GPIO Configuration
  365. PA1 ------> SPI1_SCK
  366. PA6 ------> SPI1_MISO
  367. PA7 ------> SPI1_MOSI
  368. */
  369. HAL_GPIO_DeInit(GPIOA, GPIO_PIN_1|GPIO_PIN_6|GPIO_PIN_7);
  370. /* USER CODE BEGIN SPI1_MspDeInit 1 */
  371. /* USER CODE END SPI1_MspDeInit 1 */
  372. }
  373. else if(hspi->Instance==SPI2)
  374. {
  375. /* USER CODE BEGIN SPI2_MspDeInit 0 */
  376. /* USER CODE END SPI2_MspDeInit 0 */
  377. /* Peripheral clock disable */
  378. __HAL_RCC_SPI2_CLK_DISABLE();
  379. /**SPI2 GPIO Configuration
  380. PC1 ------> SPI2_MOSI
  381. PC2 ------> SPI2_MISO
  382. PA9 ------> SPI2_SCK
  383. */
  384. HAL_GPIO_DeInit(GPIOC, GPIO_PIN_1|GPIO_PIN_2);
  385. HAL_GPIO_DeInit(GPIOA, GPIO_PIN_9);
  386. /* USER CODE BEGIN SPI2_MspDeInit 1 */
  387. /* USER CODE END SPI2_MspDeInit 1 */
  388. }
  389. }
  390. /**
  391. * @brief TIM_Base MSP Initialization
  392. * This function configures the hardware resources used in this example
  393. * @param htim_base: TIM_Base handle pointer
  394. * @retval None
  395. */
  396. void HAL_TIM_Base_MspInit(TIM_HandleTypeDef* htim_base)
  397. {
  398. if(htim_base->Instance==TIM16)
  399. {
  400. /* USER CODE BEGIN TIM16_MspInit 0 */
  401. /* USER CODE END TIM16_MspInit 0 */
  402. /* Peripheral clock enable */
  403. __HAL_RCC_TIM16_CLK_ENABLE();
  404. /* USER CODE BEGIN TIM16_MspInit 1 */
  405. /* USER CODE END TIM16_MspInit 1 */
  406. }
  407. else if(htim_base->Instance==TIM17)
  408. {
  409. /* USER CODE BEGIN TIM17_MspInit 0 */
  410. /* USER CODE END TIM17_MspInit 0 */
  411. /* Peripheral clock enable */
  412. __HAL_RCC_TIM17_CLK_ENABLE();
  413. /* USER CODE BEGIN TIM17_MspInit 1 */
  414. /* USER CODE END TIM17_MspInit 1 */
  415. }
  416. }
  417. /**
  418. * @brief TIM_Base MSP De-Initialization
  419. * This function freeze the hardware resources used in this example
  420. * @param htim_base: TIM_Base handle pointer
  421. * @retval None
  422. */
  423. void HAL_TIM_Base_MspDeInit(TIM_HandleTypeDef* htim_base)
  424. {
  425. if(htim_base->Instance==TIM16)
  426. {
  427. /* USER CODE BEGIN TIM16_MspDeInit 0 */
  428. /* USER CODE END TIM16_MspDeInit 0 */
  429. /* Peripheral clock disable */
  430. __HAL_RCC_TIM16_CLK_DISABLE();
  431. /* USER CODE BEGIN TIM16_MspDeInit 1 */
  432. /* USER CODE END TIM16_MspDeInit 1 */
  433. }
  434. else if(htim_base->Instance==TIM17)
  435. {
  436. /* USER CODE BEGIN TIM17_MspDeInit 0 */
  437. /* USER CODE END TIM17_MspDeInit 0 */
  438. /* Peripheral clock disable */
  439. __HAL_RCC_TIM17_CLK_DISABLE();
  440. /* USER CODE BEGIN TIM17_MspDeInit 1 */
  441. /* USER CODE END TIM17_MspDeInit 1 */
  442. }
  443. }
  444. /**
  445. * @brief PCD MSP Initialization
  446. * This function configures the hardware resources used in this example
  447. * @param hpcd: PCD handle pointer
  448. * @retval None
  449. */
  450. void HAL_PCD_MspInit(PCD_HandleTypeDef* hpcd)
  451. {
  452. GPIO_InitTypeDef GPIO_InitStruct = {0};
  453. if(hpcd->Instance==USB)
  454. {
  455. /* USER CODE BEGIN USB_MspInit 0 */
  456. /* USER CODE END USB_MspInit 0 */
  457. __HAL_RCC_GPIOA_CLK_ENABLE();
  458. /**USB GPIO Configuration
  459. PA11 ------> USB_DM
  460. PA12 ------> USB_DP
  461. */
  462. GPIO_InitStruct.Pin = GPIO_PIN_11|GPIO_PIN_12;
  463. GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
  464. GPIO_InitStruct.Pull = GPIO_NOPULL;
  465. GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
  466. GPIO_InitStruct.Alternate = GPIO_AF10_USB;
  467. HAL_GPIO_Init(GPIOA, &GPIO_InitStruct);
  468. /* Peripheral clock enable */
  469. __HAL_RCC_USB_CLK_ENABLE();
  470. /* USER CODE BEGIN USB_MspInit 1 */
  471. /* USER CODE END USB_MspInit 1 */
  472. }
  473. }
  474. /**
  475. * @brief PCD MSP De-Initialization
  476. * This function freeze the hardware resources used in this example
  477. * @param hpcd: PCD handle pointer
  478. * @retval None
  479. */
  480. void HAL_PCD_MspDeInit(PCD_HandleTypeDef* hpcd)
  481. {
  482. if(hpcd->Instance==USB)
  483. {
  484. /* USER CODE BEGIN USB_MspDeInit 0 */
  485. /* USER CODE END USB_MspDeInit 0 */
  486. /* Peripheral clock disable */
  487. __HAL_RCC_USB_CLK_DISABLE();
  488. /**USB GPIO Configuration
  489. PA11 ------> USB_DM
  490. PA12 ------> USB_DP
  491. */
  492. HAL_GPIO_DeInit(GPIOA, GPIO_PIN_11|GPIO_PIN_12);
  493. /* USER CODE BEGIN USB_MspDeInit 1 */
  494. /* USER CODE END USB_MspDeInit 1 */
  495. }
  496. }
  497. /* USER CODE BEGIN 1 */
  498. /* USER CODE END 1 */
  499. /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/