summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorxuhonghao <[email protected]>2022-09-06 13:01:03 +0800
committerGitHub <[email protected]>2022-09-06 01:01:03 -0400
commitd321e5241203f115592f7f48a515d71e9639ef2f (patch)
treeeca461a7c8d7cf4f2353716ed2b99e9581be5698
parentc1b22ede302d6984f84e57716780fce461247e4f (diff)
[bsp][APM32][APM32F407VGT6] (#6377)
使用APM32F407VGT6芯片发现shell命令行无法接收命令,解决shell命令行输入问题 将board.c中的: GPIO_ConfigStruct.mode = GPIO_MODE_IN; GPIO_ConfigStruct.pupd = GPIO_PUPD_UP; 修改为: GPIO_ConfigStruct.mode = GPIO_MODE_AF; GPIO_ConfigStruct.pupd = GPIO_PUPD_NOPULL; 使用APM32F407VGT6测试成功
-rw-r--r--bsp/apm32/apm32f407ig-minibroard/board/board.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/bsp/apm32/apm32f407ig-minibroard/board/board.c b/bsp/apm32/apm32f407ig-minibroard/board/board.c
index 978d1db477..711ac85898 100644
--- a/bsp/apm32/apm32f407ig-minibroard/board/board.c
+++ b/bsp/apm32/apm32f407ig-minibroard/board/board.c
@@ -25,7 +25,7 @@ void apm32_usart_init(void)
GPIO_Config(GPIOA, &GPIO_ConfigStruct);
GPIO_ConfigPinAF(GPIOA, GPIO_PIN_SOURCE_9, GPIO_AF_USART1);
- GPIO_ConfigStruct.mode = GPIO_MODE_IN;
+ GPIO_ConfigStruct.mode = GPIO_MODE_AF;
GPIO_ConfigStruct.pin = GPIO_PIN_10;
GPIO_ConfigStruct.pupd = GPIO_PUPD_UP;
GPIO_ConfigStruct.speed = GPIO_SPEED_50MHz;
@@ -44,7 +44,7 @@ void apm32_usart_init(void)
GPIO_Config(GPIOA, &GPIO_ConfigStruct);
GPIO_ConfigPinAF(GPIOA, GPIO_PIN_SOURCE_2, GPIO_AF_USART2);
- GPIO_ConfigStruct.mode = GPIO_MODE_IN;
+ GPIO_ConfigStruct.mode = GPIO_MODE_AF;
GPIO_ConfigStruct.pin = GPIO_PIN_3;
GPIO_ConfigStruct.pupd = GPIO_PUPD_UP;
GPIO_ConfigStruct.speed = GPIO_SPEED_50MHz;