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/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_HeartRate/Core/Src/stm32wbxx_hal_msp.c')
-rw-r--r--Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_HeartRate/Core/Src/stm32wbxx_hal_msp.c60
1 files changed, 51 insertions, 9 deletions
diff --git a/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_HeartRate/Core/Src/stm32wbxx_hal_msp.c b/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_HeartRate/Core/Src/stm32wbxx_hal_msp.c
index 4f3093e2a..a7a6e9b3e 100644
--- a/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_HeartRate/Core/Src/stm32wbxx_hal_msp.c
+++ b/Projects/P-NUCLEO-WB55.Nucleo/Applications/BLE/BLE_HeartRate/Core/Src/stm32wbxx_hal_msp.c
@@ -308,6 +308,50 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
}
/**
+* @brief RNG MSP Initialization
+* This function configures the hardware resources used in this example
+* @param hrng: RNG handle pointer
+* @retval None
+*/
+void HAL_RNG_MspInit(RNG_HandleTypeDef* hrng)
+{
+ if(hrng->Instance==RNG)
+ {
+ /* USER CODE BEGIN RNG_MspInit 0 */
+
+ /* USER CODE END RNG_MspInit 0 */
+ /* Peripheral clock enable */
+ __HAL_RCC_RNG_CLK_ENABLE();
+ /* USER CODE BEGIN RNG_MspInit 1 */
+
+ /* USER CODE END RNG_MspInit 1 */
+ }
+
+}
+
+/**
+* @brief RNG MSP De-Initialization
+* This function freeze the hardware resources used in this example
+* @param hrng: RNG handle pointer
+* @retval None
+*/
+void HAL_RNG_MspDeInit(RNG_HandleTypeDef* hrng)
+{
+ if(hrng->Instance==RNG)
+ {
+ /* USER CODE BEGIN RNG_MspDeInit 0 */
+
+ /* USER CODE END RNG_MspDeInit 0 */
+ /* Peripheral clock disable */
+ __HAL_RCC_RNG_CLK_DISABLE();
+ /* USER CODE BEGIN RNG_MspDeInit 1 */
+
+ /* USER CODE END RNG_MspDeInit 1 */
+ }
+
+}
+
+/**
* @brief RTC MSP Initialization
* This function configures the hardware resources used in this example
* @param hrtc: RTC handle pointer
@@ -318,21 +362,16 @@ void HAL_RTC_MspInit(RTC_HandleTypeDef* hrtc)
if(hrtc->Instance==RTC)
{
/* USER CODE BEGIN RTC_MspInit 0 */
- HAL_PWR_EnableBkUpAccess(); /**< Enable access to the RTC registers */
- /**
- * Write twice the value to flush the APB-AHB bridge
- * This bit shall be written in the register before writing the next one
- */
- HAL_PWR_EnableBkUpAccess();
-
- __HAL_RCC_RTC_CONFIG(RCC_RTCCLKSOURCE_LSE); /**< Select LSI as RTC Input */
/* USER CODE END RTC_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_RTC_ENABLE();
__HAL_RCC_RTCAPB_CLK_ENABLE();
+ /* RTC interrupt Init */
+ HAL_NVIC_SetPriority(RTC_WKUP_IRQn, 0, 0);
+ HAL_NVIC_EnableIRQ(RTC_WKUP_IRQn);
/* USER CODE BEGIN RTC_MspInit 1 */
- HAL_RTCEx_EnableBypassShadow(hrtc);
+
/* USER CODE END RTC_MspInit 1 */
}
@@ -354,6 +393,9 @@ void HAL_RTC_MspDeInit(RTC_HandleTypeDef* hrtc)
/* Peripheral clock disable */
__HAL_RCC_RTC_DISABLE();
__HAL_RCC_RTCAPB_CLK_DISABLE();
+
+ /* RTC interrupt DeInit */
+ HAL_NVIC_DisableIRQ(RTC_WKUP_IRQn);
/* USER CODE BEGIN RTC_MspDeInit 1 */
/* USER CODE END RTC_MspDeInit 1 */