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/Zigbee/Zigbee_OnOff_Client_SED/Core/Src/stm32wbxx_hal_msp.c')
-rw-r--r--Projects/P-NUCLEO-WB55.Nucleo/Applications/Zigbee/Zigbee_OnOff_Client_SED/Core/Src/stm32wbxx_hal_msp.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/Projects/P-NUCLEO-WB55.Nucleo/Applications/Zigbee/Zigbee_OnOff_Client_SED/Core/Src/stm32wbxx_hal_msp.c b/Projects/P-NUCLEO-WB55.Nucleo/Applications/Zigbee/Zigbee_OnOff_Client_SED/Core/Src/stm32wbxx_hal_msp.c
index 463dd5949..014031b16 100644
--- a/Projects/P-NUCLEO-WB55.Nucleo/Applications/Zigbee/Zigbee_OnOff_Client_SED/Core/Src/stm32wbxx_hal_msp.c
+++ b/Projects/P-NUCLEO-WB55.Nucleo/Applications/Zigbee/Zigbee_OnOff_Client_SED/Core/Src/stm32wbxx_hal_msp.c
@@ -111,9 +111,7 @@ void HAL_MspInit(void)
void HAL_UART_MspInit(UART_HandleTypeDef* huart)
{
GPIO_InitTypeDef GPIO_InitStruct = {0};
-
-#if (CFG_HW_LPUART1_ENABLED == 1)
- if(huart->Instance == LPUART1)
+ if(huart->Instance==LPUART1)
{
/* USER CODE BEGIN LPUART1_MspInit 0 */
@@ -158,9 +156,7 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
/* USER CODE END LPUART1_MspInit 1 */
}
-#endif
-#if (CFG_HW_USART1_ENABLED == 1)
- if(huart->Instance == USART1)
+ else if(huart->Instance==USART1)
{
/* USER CODE BEGIN USART1_MspInit 0 */
@@ -168,19 +164,15 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
/* Peripheral clock enable */
__HAL_RCC_USART1_CLK_ENABLE();
- __HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
/**USART1 GPIO Configuration
-
PB6 ------> USART1_TX
PB7 ------> USART1_RX
*/
-
-
GPIO_InitStruct.Pin = GPIO_PIN_6|GPIO_PIN_7;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
GPIO_InitStruct.Pull = GPIO_NOPULL;
- GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
+ GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW;
GPIO_InitStruct.Alternate = GPIO_AF7_USART1;
HAL_GPIO_Init(GPIOB, &GPIO_InitStruct);
@@ -209,7 +201,7 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
/* USER CODE END USART1_MspInit 1 */
}
-#endif
+
}
/**
@@ -252,12 +244,9 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
__HAL_RCC_USART1_CLK_DISABLE();
/**USART1 GPIO Configuration
- PA11 ------> USART1_CTS
PB6 ------> USART1_TX
PB7 ------> USART1_RX
*/
- HAL_GPIO_DeInit(GPIOA, GPIO_PIN_11);
-
HAL_GPIO_DeInit(GPIOB, GPIO_PIN_6|GPIO_PIN_7);
/* USART1 DMA DeInit */
@@ -296,6 +285,7 @@ void HAL_RTC_MspInit(RTC_HandleTypeDef* hrtc)
/* USER CODE END RTC_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_RTC_ENABLE();
+ __HAL_RCC_RTCAPB_CLK_ENABLE();
/* USER CODE BEGIN RTC_MspInit 1 */
MODIFY_REG(RTC->CR, RTC_CR_WUCKSEL, CFG_RTC_WUCKSEL_DIVIDER);
@@ -319,6 +309,7 @@ void HAL_RTC_MspDeInit(RTC_HandleTypeDef* hrtc)
/* USER CODE END RTC_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_RTC_DISABLE();
+ __HAL_RCC_RTCAPB_CLK_DISABLE();
/* USER CODE BEGIN RTC_MspDeInit 1 */
/* USER CODE END RTC_MspDeInit 1 */