summaryrefslogtreecommitdiff
path: root/bsp/stm32/stm32f767-st-nucleo/board
diff options
context:
space:
mode:
authorchenjh <[email protected]>2021-07-07 17:40:55 +0800
committerchenjh <[email protected]>2021-07-07 18:51:21 +0800
commit67b86e61ba349ab63c8f21bd04b3aa5de74f2a68 (patch)
tree9a7b8cb618512c2d9a4a7bbc9336efb6975b5a92 /bsp/stm32/stm32f767-st-nucleo/board
parentc0096e2db965838dc44f0230c4bd4d7e53b4fb04 (diff)
[uart] Modify the uart file to configure uart_pin for pullup
Diffstat (limited to 'bsp/stm32/stm32f767-st-nucleo/board')
-rw-r--r--bsp/stm32/stm32f767-st-nucleo/board/CubeMX_Config/Src/stm32f7xx_hal_msp.c46
1 files changed, 23 insertions, 23 deletions
diff --git a/bsp/stm32/stm32f767-st-nucleo/board/CubeMX_Config/Src/stm32f7xx_hal_msp.c b/bsp/stm32/stm32f767-st-nucleo/board/CubeMX_Config/Src/stm32f7xx_hal_msp.c
index 770d50f63e..7306fcf76f 100644
--- a/bsp/stm32/stm32f767-st-nucleo/board/CubeMX_Config/Src/stm32f7xx_hal_msp.c
+++ b/bsp/stm32/stm32f767-st-nucleo/board/CubeMX_Config/Src/stm32f7xx_hal_msp.c
@@ -2,12 +2,12 @@
/**
******************************************************************************
* File Name : stm32f7xx_hal_msp.c
- * Description : This file provides code for the MSP Initialization
+ * Description : This file provides code for the MSP Initialization
* and de-Initialization codes.
******************************************************************************
** This notice applies to any and all portions of this file
* that are not between comment pairs USER CODE BEGIN and
- * USER CODE END. Other portions of this file, whether
+ * USER CODE END. Other portions of this file, whether
* inserted by the user or by software development tools
* are owned by their respective copyright owners.
*
@@ -52,7 +52,7 @@
/* Private define ------------------------------------------------------------*/
/* USER CODE BEGIN Define */
-
+
/* USER CODE END Define */
/* Private macro -------------------------------------------------------------*/
@@ -114,12 +114,12 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef* heth)
/* USER CODE END ETH_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_ETH_CLK_ENABLE();
-
+
__HAL_RCC_GPIOC_CLK_ENABLE();
__HAL_RCC_GPIOA_CLK_ENABLE();
__HAL_RCC_GPIOB_CLK_ENABLE();
__HAL_RCC_GPIOG_CLK_ENABLE();
- /**ETH GPIO Configuration
+ /**ETH GPIO Configuration
PC1 ------> ETH_MDC
PA1 ------> ETH_REF_CLK
PA2 ------> ETH_MDIO
@@ -128,7 +128,7 @@ void HAL_ETH_MspInit(ETH_HandleTypeDef* heth)
PC5 ------> ETH_RXD1
PB13 ------> ETH_TXD1
PG11 ------> ETH_TX_EN
- PG13 ------> ETH_TXD0
+ PG13 ------> ETH_TXD0
*/
GPIO_InitStruct.Pin = RMII_MDC_Pin|RMII_RXD0_Pin|RMII_RXD1_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
@@ -182,8 +182,8 @@ void HAL_ETH_MspDeInit(ETH_HandleTypeDef* heth)
/* USER CODE END ETH_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_ETH_CLK_DISABLE();
-
- /**ETH GPIO Configuration
+
+ /**ETH GPIO Configuration
PC1 ------> ETH_MDC
PA1 ------> ETH_REF_CLK
PA2 ------> ETH_MDIO
@@ -192,7 +192,7 @@ void HAL_ETH_MspDeInit(ETH_HandleTypeDef* heth)
PC5 ------> ETH_RXD1
PB13 ------> ETH_TXD1
PG11 ------> ETH_TX_EN
- PG13 ------> ETH_TXD0
+ PG13 ------> ETH_TXD0
*/
HAL_GPIO_DeInit(GPIOC, RMII_MDC_Pin|RMII_RXD0_Pin|RMII_RXD1_Pin);
@@ -226,15 +226,15 @@ void HAL_UART_MspInit(UART_HandleTypeDef* huart)
/* USER CODE END USART3_MspInit 0 */
/* Peripheral clock enable */
__HAL_RCC_USART3_CLK_ENABLE();
-
+
__HAL_RCC_GPIOD_CLK_ENABLE();
- /**USART3 GPIO Configuration
+ /**USART3 GPIO Configuration
PD8 ------> USART3_TX
- PD9 ------> USART3_RX
+ PD9 ------> USART3_RX
*/
GPIO_InitStruct.Pin = STLK_RX_Pin|STLK_TX_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
- GPIO_InitStruct.Pull = GPIO_NOPULL;
+ GPIO_InitStruct.Pull = GPIO_PULLUP;
GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH;
GPIO_InitStruct.Alternate = GPIO_AF7_USART3;
HAL_GPIO_Init(GPIOD, &GPIO_InitStruct);
@@ -263,10 +263,10 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* huart)
/* USER CODE END USART3_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_USART3_CLK_DISABLE();
-
- /**USART3 GPIO Configuration
+
+ /**USART3 GPIO Configuration
PD8 ------> USART3_TX
- PD9 ------> USART3_RX
+ PD9 ------> USART3_RX
*/
HAL_GPIO_DeInit(GPIOD, STLK_RX_Pin|STLK_TX_Pin);
@@ -292,14 +292,14 @@ void HAL_PCD_MspInit(PCD_HandleTypeDef* hpcd)
/* USER CODE BEGIN USB_OTG_FS_MspInit 0 */
/* USER CODE END USB_OTG_FS_MspInit 0 */
-
+
__HAL_RCC_GPIOA_CLK_ENABLE();
- /**USB_OTG_FS GPIO Configuration
+ /**USB_OTG_FS GPIO Configuration
PA8 ------> USB_OTG_FS_SOF
PA9 ------> USB_OTG_FS_VBUS
PA10 ------> USB_OTG_FS_ID
PA11 ------> USB_OTG_FS_DM
- PA12 ------> USB_OTG_FS_DP
+ PA12 ------> USB_OTG_FS_DP
*/
GPIO_InitStruct.Pin = USB_SOF_Pin|USB_ID_Pin|USB_DM_Pin|USB_DP_Pin;
GPIO_InitStruct.Mode = GPIO_MODE_AF_PP;
@@ -339,15 +339,15 @@ void HAL_PCD_MspDeInit(PCD_HandleTypeDef* hpcd)
/* USER CODE END USB_OTG_FS_MspDeInit 0 */
/* Peripheral clock disable */
__HAL_RCC_USB_OTG_FS_CLK_DISABLE();
-
- /**USB_OTG_FS GPIO Configuration
+
+ /**USB_OTG_FS GPIO Configuration
PA8 ------> USB_OTG_FS_SOF
PA9 ------> USB_OTG_FS_VBUS
PA10 ------> USB_OTG_FS_ID
PA11 ------> USB_OTG_FS_DM
- PA12 ------> USB_OTG_FS_DP
+ PA12 ------> USB_OTG_FS_DP
*/
- HAL_GPIO_DeInit(GPIOA, USB_SOF_Pin|USB_VBUS_Pin|USB_ID_Pin|USB_DM_Pin
+ HAL_GPIO_DeInit(GPIOA, USB_SOF_Pin|USB_VBUS_Pin|USB_ID_Pin|USB_DM_Pin
|USB_DP_Pin);
/* USER CODE BEGIN USB_OTG_FS_MspDeInit 1 */