Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Flipper-Zero/STM32CubeWB.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'Projects/NUCLEO-WB15CC/Examples/LPTIM/LPTIM_PWMExternalClock/Src/stm32wbxx_hal_msp.c')
-rw-r--r--Projects/NUCLEO-WB15CC/Examples/LPTIM/LPTIM_PWMExternalClock/Src/stm32wbxx_hal_msp.c22
1 files changed, 15 insertions, 7 deletions
diff --git a/Projects/NUCLEO-WB15CC/Examples/LPTIM/LPTIM_PWMExternalClock/Src/stm32wbxx_hal_msp.c b/Projects/NUCLEO-WB15CC/Examples/LPTIM/LPTIM_PWMExternalClock/Src/stm32wbxx_hal_msp.c
index 29789d5fc..c770a21b9 100644
--- a/Projects/NUCLEO-WB15CC/Examples/LPTIM/LPTIM_PWMExternalClock/Src/stm32wbxx_hal_msp.c
+++ b/Projects/NUCLEO-WB15CC/Examples/LPTIM/LPTIM_PWMExternalClock/Src/stm32wbxx_hal_msp.c
@@ -8,13 +8,12 @@
******************************************************************************
* @attention
*
- * <h2><center>&copy; 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.
*
******************************************************************************
*/
@@ -84,11 +83,21 @@ void HAL_MspInit(void)
void HAL_LPTIM_MspInit(LPTIM_HandleTypeDef* hlptim)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
+ RCC_PeriphCLKInitTypeDef PeriphClkInitStruct = {0};
if(hlptim->Instance==LPTIM1)
{
/* USER CODE BEGIN LPTIM1_MspInit 0 */
/* USER CODE END LPTIM1_MspInit 0 */
+ /** Initializes the peripherals clock
+ */
+ PeriphClkInitStruct.PeriphClockSelection = RCC_PERIPHCLK_LPTIM1;
+ PeriphClkInitStruct.Lptim1ClockSelection = RCC_LPTIM1CLKSOURCE_PCLK1;
+ if (HAL_RCCEx_PeriphCLKConfig(&PeriphClkInitStruct) != HAL_OK)
+ {
+ Error_Handler();
+ }
+
/* Peripheral clock enable */
__HAL_RCC_LPTIM1_CLK_ENABLE();
@@ -151,4 +160,3 @@ void HAL_LPTIM_MspDeInit(LPTIM_HandleTypeDef* hlptim)
/* USER CODE END 1 */
-/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/