diff Discovery/Src/stm32f4xx_hal_msp_hw2.c @ 1037:2af07aa38531 GasConsumption

Merge with external development branches: Some features have been prepared for integration: Profiles, DMA UART on Firmware part, Bluetooth discovery and messges logging for development phase. All these new function are deactivated by compile switch and may be activated using the configuration.h for testing purpose.
author Ideenmodellierer
date Mon, 15 Sep 2025 21:12:44 +0200
parents 5865f0aeb438
children
line wrap: on
line diff
--- a/Discovery/Src/stm32f4xx_hal_msp_hw2.c	Sun Sep 07 20:44:35 2025 +0200
+++ b/Discovery/Src/stm32f4xx_hal_msp_hw2.c	Mon Sep 15 21:12:44 2025 +0200
@@ -630,18 +630,20 @@
 
   /* USER CODE END USART3_MspInit 0 */
     /* Peripheral clock enable */
-    __USART3_CLK_ENABLE();
+	USART_RADIO_RX_GPIO_CLK_ENABLE();
 
     /**USART3 GPIO Configuration
-    PC10     ------> USART3_TX
-    PC11     ------> USART3_RX
+    PB11     ------> USART3_RX
     */
-    GPIO_InitStruct.Pin = GPIO_PIN_10|GPIO_PIN_11;
+    GPIO_InitStruct.Pin = USART_RADIO_RX_PIN;
     GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
     GPIO_InitStruct.Pull = GPIO_PULLUP;
     GPIO_InitStruct.Speed = GPIO_SPEED_LOW;
-    GPIO_InitStruct.Alternate = GPIO_AF7_USART3;
-    HAL_GPIO_Init(GPIOC, &GPIO_InitStruct);
+    GPIO_InitStruct.Alternate = USART_RADIO_RX_AF;
+    HAL_GPIO_Init(USART_RADIO_RX_GPIO_PORT, &GPIO_InitStruct);
+
+    HAL_NVIC_SetPriority(USART_RADIO_IRQn, 0, 1);
+    HAL_NVIC_EnableIRQ(USART_RADIO_IRQn);
 
   /* USER CODE BEGIN USART3_MspInit 1 */
 
@@ -706,7 +708,7 @@
     PC10     ------> USART3_TX
     PC11     ------> USART3_RX
     */
-    HAL_GPIO_DeInit(GPIOC, GPIO_PIN_10|GPIO_PIN_11);
+    HAL_GPIO_DeInit(USART_RADIO_RX_GPIO_PORT, USART_RADIO_RX_PIN);
 
   /* USER CODE BEGIN USART3_MspDeInit 1 */