From e53f4d207bfd2d64083f70e1cf120a592b8b66bc Mon Sep 17 00:00:00 2001 From: Lizongdi <1210855344@qq.com> Date: Fri, 11 Sep 2026 08:40:09 +0800 Subject: [PATCH] =?UTF-8?q?=E9=BB=98=E8=AE=A4GPIO=E7=94=B5=E5=B9=B3?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=8C=E9=BB=98=E8=AE=A4=E7=BC=96=E8=AF=91?= =?UTF-8?q?=E9=81=A5=E6=8E=A7=E5=99=A8=E6=A8=A1=E5=9D=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CMakePresets.json | 2 +- Core/Src/gpio.c | 12 ++++++++---- robot | 2 +- robot_h743.ioc | 18 ++++++++++++------ 4 files changed, 22 insertions(+), 12 deletions(-) diff --git a/CMakePresets.json b/CMakePresets.json index 3c0b9b2..afedd8f 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -42,7 +42,7 @@ "inherits": "rb-core", "cacheVariables": { "BUILD_MOTOR": "ON", - "BUILD_CONTROLLER": "ON", + "BUILD_CONTROLLER": "ON", "BUILD_PAINT_ROBOT_NEW": "ON", "USE_LUA_ST": true, "USE_TALNET": true, diff --git a/Core/Src/gpio.c b/Core/Src/gpio.c index 3897d47..a1e5d52 100644 --- a/Core/Src/gpio.c +++ b/Core/Src/gpio.c @@ -52,12 +52,16 @@ void MX_GPIO_Init(void) __HAL_RCC_GPIOD_CLK_ENABLE(); /*Configure GPIO pin Output Level */ - HAL_GPIO_WritePin(GPIOC, S0_RESET_Pin|OUT_0_Pin|OUT_1_Pin|RS485_3_DIR_Pin - |RS485_4_DIR_Pin|E22_RST_Pin, GPIO_PIN_RESET); + HAL_GPIO_WritePin(GPIOC, S0_RESET_Pin|RS485_3_DIR_Pin|RS485_4_DIR_Pin|E22_RST_Pin, GPIO_PIN_RESET); /*Configure GPIO pin Output Level */ - HAL_GPIO_WritePin(GPIOA, OUT_2_Pin|OUT_3_Pin|OUT_4_Pin|OUT_5_Pin - |ETH_RST_Pin, GPIO_PIN_RESET); + HAL_GPIO_WritePin(GPIOC, OUT_0_Pin|OUT_1_Pin, GPIO_PIN_SET); + + /*Configure GPIO pin Output Level */ + HAL_GPIO_WritePin(GPIOA, OUT_2_Pin|OUT_3_Pin|OUT_4_Pin|OUT_5_Pin, GPIO_PIN_SET); + + /*Configure GPIO pin Output Level */ + HAL_GPIO_WritePin(ETH_RST_GPIO_Port, ETH_RST_Pin, GPIO_PIN_RESET); /*Configure GPIO pin Output Level */ HAL_GPIO_WritePin(GPIOE, EEPROM_WP_Pin|EEPROM_SCL_Pin|E22_M0_Pin, GPIO_PIN_RESET); diff --git a/robot b/robot index 1a171ad..6226c29 160000 --- a/robot +++ b/robot @@ -1 +1 @@ -Subproject commit 1a171ad0c842b8857157b2d886ab1d94104a11f8 +Subproject commit 6226c29dc834712b886356b112ad54802848d96e diff --git a/robot_h743.ioc b/robot_h743.ioc index d926701..6a998ff 100644 --- a/robot_h743.ioc +++ b/robot_h743.ioc @@ -533,10 +533,11 @@ NVIC.USART2_IRQn=true\:5\:0\:true\:false\:true\:true\:true\:true\:true NVIC.USART3_IRQn=true\:5\:0\:false\:false\:true\:true\:true\:true\:true NVIC.USART6_IRQn=true\:5\:0\:true\:false\:true\:true\:true\:true\:true NVIC.UsageFault_IRQn=true\:0\:0\:false\:false\:true\:false\:false\:false\:false -PA0.GPIOParameters=GPIO_Label,PinAttribute +PA0.GPIOParameters=PinState,GPIO_Label,PinAttribute PA0.GPIO_Label=OUT_2 PA0.Locked=true PA0.PinAttribute=Free +PA0.PinState=GPIO_PIN_SET PA0.Signal=GPIO_Output PA1.GPIOParameters=GPIO_Speed,PinAttribute PA1.GPIO_Speed=GPIO_SPEED_FREQ_VERY_HIGH @@ -576,20 +577,23 @@ PA2.GPIO_Speed=GPIO_SPEED_FREQ_VERY_HIGH PA2.Mode=RMII PA2.PinAttribute=Free PA2.Signal=ETH_MDIO -PA3.GPIOParameters=GPIO_Label,PinAttribute +PA3.GPIOParameters=PinState,GPIO_Label,PinAttribute PA3.GPIO_Label=OUT_3 PA3.Locked=true PA3.PinAttribute=Free +PA3.PinState=GPIO_PIN_SET PA3.Signal=GPIO_Output -PA4.GPIOParameters=GPIO_Label,PinAttribute +PA4.GPIOParameters=PinState,GPIO_Label,PinAttribute PA4.GPIO_Label=OUT_4 PA4.Locked=true PA4.PinAttribute=Free +PA4.PinState=GPIO_PIN_SET PA4.Signal=GPIO_Output -PA5.GPIOParameters=GPIO_Label,PinAttribute +PA5.GPIOParameters=PinState,GPIO_Label,PinAttribute PA5.GPIO_Label=OUT_5 PA5.Locked=true PA5.PinAttribute=Free +PA5.PinState=GPIO_PIN_SET PA5.Signal=GPIO_Output PA6.GPIOParameters=GPIO_Label,PinAttribute PA6.GPIO_Label=ETH_RST @@ -695,15 +699,17 @@ PC13.GPIOParameters=GPIO_Label PC13.GPIO_Label=IN_5 PC13.Locked=true PC13.Signal=GPIO_Input -PC2_C.GPIOParameters=GPIO_Label,PinAttribute +PC2_C.GPIOParameters=PinState,GPIO_Label,PinAttribute PC2_C.GPIO_Label=OUT_0 PC2_C.Locked=true PC2_C.PinAttribute=Free +PC2_C.PinState=GPIO_PIN_SET PC2_C.Signal=GPIO_Output -PC3_C.GPIOParameters=GPIO_Label,PinAttribute +PC3_C.GPIOParameters=PinState,GPIO_Label,PinAttribute PC3_C.GPIO_Label=OUT_1 PC3_C.Locked=true PC3_C.PinAttribute=Free +PC3_C.PinState=GPIO_PIN_SET PC3_C.Signal=GPIO_Output PC4.GPIOParameters=GPIO_Speed,PinAttribute PC4.GPIO_Speed=GPIO_SPEED_FREQ_VERY_HIGH