diff options
Diffstat (limited to 'Projects/P-NUCLEO-WB55.Nucleo/Examples_LL/ADC/ADC_GroupsRegularInjected_Init/Src/main.c')
-rw-r--r-- | Projects/P-NUCLEO-WB55.Nucleo/Examples_LL/ADC/ADC_GroupsRegularInjected_Init/Src/main.c | 31 |
1 files changed, 20 insertions, 11 deletions
diff --git a/Projects/P-NUCLEO-WB55.Nucleo/Examples_LL/ADC/ADC_GroupsRegularInjected_Init/Src/main.c b/Projects/P-NUCLEO-WB55.Nucleo/Examples_LL/ADC/ADC_GroupsRegularInjected_Init/Src/main.c index baf60e2c3..610e2c770 100644 --- a/Projects/P-NUCLEO-WB55.Nucleo/Examples_LL/ADC/ADC_GroupsRegularInjected_Init/Src/main.c +++ b/Projects/P-NUCLEO-WB55.Nucleo/Examples_LL/ADC/ADC_GroupsRegularInjected_Init/Src/main.c @@ -15,13 +15,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. * ****************************************************************************** */ @@ -124,6 +123,7 @@ __IO uint8_t ubAdcGrpInjectedUnitaryConvStatus = 2U; /* Variable set into ADC in /* Private function prototypes -----------------------------------------------*/ void SystemClock_Config(void); +void PeriphCommonClock_Config(void); static void MX_GPIO_Init(void); static void MX_DMA_Init(void); static void MX_ADC1_Init(void); @@ -167,6 +167,9 @@ int main(void) /* Configure the system clock */ SystemClock_Config(); +/* Configure the peripherals common clocks */ + PeriphCommonClock_Config(); + /* USER CODE BEGIN SysInit */ /* USER CODE END SysInit */ @@ -198,7 +201,7 @@ int main(void) /* Start ADC group regular conversion */ /* Note: Hardware constraint (refer to description of the function */ /* below): */ - /* On this STM32 serie, setting of this feature is conditioned to */ + /* On this STM32 series, setting of this feature is conditioned to */ /* ADC state: */ /* ADC must be enabled without conversion on going on group regular, */ /* without ADC disable command on going. */ @@ -291,6 +294,14 @@ void SystemClock_Config(void) /* Update CMSIS variable (which can be updated also through SystemCoreClockUpdate function) */ LL_SetSystemCoreClock(16000000); +} + +/** + * @brief Peripherals Common Clock Configuration + * @retval None + */ +void PeriphCommonClock_Config(void) +{ /* USER CODE BEGIN Smps */ /* USER CODE END Smps */ @@ -617,7 +628,7 @@ void Activate_ADC(void) /* Note: Hardware constraint (refer to description of the functions */ /* below): */ - /* On this STM32 serie, setting of these features is conditioned to */ + /* On this STM32 series, setting of these features is conditioned to */ /* ADC state: */ /* ADC must be disabled. */ /* Note: In this example, all these checks are not necessary but are */ @@ -833,7 +844,7 @@ void UserButton_Callback(void) /* Start ADC group injected conversion */ /* Note: Hardware constraint (refer to description of the function */ /* below): */ - /* On this STM32 serie, setting of this feature is conditioned to */ + /* On this STM32 series, setting of this feature is conditioned to */ /* ADC state: */ /* ADC must be enabled without conversion on going on group injected, */ /* without ADC disable command on going. */ @@ -977,5 +988,3 @@ void assert_failed(uint8_t *file, uint32_t line) /* USER CODE END 6 */ } #endif /* USE_FULL_ASSERT */ - -/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |