diff options
Diffstat (limited to 'Projects/P-NUCLEO-WB55.Nucleo/Examples/QSPI/QSPI_ExecuteInPlace/Src/stm32wbxx_hal_msp.c')
-rw-r--r-- | Projects/P-NUCLEO-WB55.Nucleo/Examples/QSPI/QSPI_ExecuteInPlace/Src/stm32wbxx_hal_msp.c | 37 |
1 files changed, 29 insertions, 8 deletions
diff --git a/Projects/P-NUCLEO-WB55.Nucleo/Examples/QSPI/QSPI_ExecuteInPlace/Src/stm32wbxx_hal_msp.c b/Projects/P-NUCLEO-WB55.Nucleo/Examples/QSPI/QSPI_ExecuteInPlace/Src/stm32wbxx_hal_msp.c index e7e55a63d..fe46526a7 100644 --- a/Projects/P-NUCLEO-WB55.Nucleo/Examples/QSPI/QSPI_ExecuteInPlace/Src/stm32wbxx_hal_msp.c +++ b/Projects/P-NUCLEO-WB55.Nucleo/Examples/QSPI/QSPI_ExecuteInPlace/Src/stm32wbxx_hal_msp.c @@ -7,13 +7,12 @@ ****************************************************************************** * @attention * - * <h2><center>© Copyright (c) 2019 STMicroelectronics. - * All rights reserved.</center></h2> + * Copyright (c) 2019-2021 STMicroelectronics. + * All rights reserved. * - * This software component is licensed by ST under BSD 3-Clause license, - * the "License"; You may not use this file except in compliance with the - * License. You may obtain a copy of the License at: - * opensource.org/licenses/BSD-3-Clause + * This software is licensed under terms that can be found in the LICENSE file + * in the root directory of this software component. + * If no LICENSE file comes with this software, it is provided AS-IS. * ****************************************************************************** */ @@ -200,11 +199,21 @@ void HAL_QSPI_MspDeInit(QSPI_HandleTypeDef* hqspi) void HAL_UART_MspInit(UART_HandleTypeDef* huart) { GPIO_InitTypeDef GPIO_InitStruct = {0}; + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; if(huart->Instance==USART1) { /* USER CODE BEGIN USART1_MspInit 0 */ /* USER CODE END USART1_MspInit 0 */ + /** Initializes the peripherals clock + */ + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USART1; + PeriphClkInitStruct.Usart1ClockSelection = RCC_USART1CLKSOURCE_PCLK2; + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) + { + Error_Handler(); + } + /* Peripheral clock enable */ __HAL_RCC_USART1_CLK_ENABLE(); @@ -265,11 +274,25 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* huart) void HAL_PCD_MspInit(PCD_HandleTypeDef* hpcd) { GPIO_InitTypeDef GPIO_InitStruct = {0}; + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; if(hpcd->Instance==USB) { /* USER CODE BEGIN USB_MspInit 0 */ /* USER CODE END USB_MspInit 0 */ + /** Initializes the peripherals clock + */ + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_USB; + PeriphClkInitStruct.PLLSAI1.PLLN = 24; + PeriphClkInitStruct.PLLSAI1.PLLP = RCC_PLLP_DIV2; + PeriphClkInitStruct.PLLSAI1.PLLQ = RCC_PLLQ_DIV2; + PeriphClkInitStruct.PLLSAI1.PLLR = RCC_PLLR_DIV2; + PeriphClkInitStruct.PLLSAI1.PLLSAI1ClockOut = RCC_PLLSAI1_USBCLK; + PeriphClkInitStruct.UsbClockSelection = RCC_USBCLKSOURCE_PLLSAI1; + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) + { + Error_Handler(); + } __HAL_RCC_GPIOA_CLK_ENABLE(); /**USB GPIO Configuration @@ -324,5 +347,3 @@ void HAL_PCD_MspDeInit(PCD_HandleTypeDef* hpcd) /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |