diff options
Diffstat (limited to 'Projects/NUCLEO-WB15CC/Applications/BLE/BLE_HeartRate/Core/Src/stm32wbxx_hal_msp.c')
-rw-r--r-- | Projects/NUCLEO-WB15CC/Applications/BLE/BLE_HeartRate/Core/Src/stm32wbxx_hal_msp.c | 33 |
1 files changed, 25 insertions, 8 deletions
diff --git a/Projects/NUCLEO-WB15CC/Applications/BLE/BLE_HeartRate/Core/Src/stm32wbxx_hal_msp.c b/Projects/NUCLEO-WB15CC/Applications/BLE/BLE_HeartRate/Core/Src/stm32wbxx_hal_msp.c index d6212b968..8e2573fc4 100644 --- a/Projects/NUCLEO-WB15CC/Applications/BLE/BLE_HeartRate/Core/Src/stm32wbxx_hal_msp.c +++ b/Projects/NUCLEO-WB15CC/Applications/BLE/BLE_HeartRate/Core/Src/stm32wbxx_hal_msp.c @@ -7,13 +7,12 @@ ****************************************************************************** * @attention * - * <h2><center>© Copyright (c) 2021 STMicroelectronics. - * All rights reserved.</center></h2> + * Copyright (c) 2021 STMicroelectronics. + * All rights reserved. * - * This software component is licensed by ST under Ultimate Liberty license - * SLA0044, the "License"; You may not use this file except in compliance with - * the License. You may obtain a copy of the License at: - * www.st.com/SLA0044 + * 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. * ****************************************************************************** */ @@ -142,11 +141,21 @@ void HAL_IPCC_MspDeInit(IPCC_HandleTypeDef* hipcc) */ void HAL_RNG_MspInit(RNG_HandleTypeDef* hrng) { + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; if(hrng->Instance==RNG) { /* USER CODE BEGIN RNG_MspInit 0 */ /* USER CODE END RNG_MspInit 0 */ + /** Initializes the peripherals clock + */ + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RNG; + PeriphClkInitStruct.RngClockSelection = RCC_RNGCLKSOURCE_LSE; + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) + { + Error_Handler(); + } + /* Peripheral clock enable */ __HAL_RCC_RNG_CLK_ENABLE(); /* USER CODE BEGIN RNG_MspInit 1 */ @@ -186,6 +195,7 @@ void HAL_RNG_MspDeInit(RNG_HandleTypeDef* hrng) */ void HAL_RTC_MspInit(RTC_HandleTypeDef* hrtc) { + RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0}; if(hrtc->Instance==RTC) { /* USER CODE BEGIN RTC_MspInit 0 */ @@ -199,6 +209,15 @@ void HAL_RTC_MspInit(RTC_HandleTypeDef* hrtc) __HAL_RCC_RTC_CONFIG(RCC_RTCCLKSOURCE_LSE); /**< Select LSI as RTC Input */ /* USER CODE END RTC_MspInit 0 */ + /** Initializes the peripherals clock + */ + PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_RTC; + PeriphClkInitStruct.RTCClockSelection = RCC_RTCCLKSOURCE_LSE; + if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK) + { + Error_Handler(); + } + /* Peripheral clock enable */ __HAL_RCC_RTC_ENABLE(); __HAL_RCC_RTCAPB_CLK_ENABLE(); @@ -241,5 +260,3 @@ void HAL_RTC_MspDeInit(RTC_HandleTypeDef* hrtc) /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |