diff --git a/Core/Src/gpio.c b/Core/Src/gpio.c index d9c019d..1d57a92 100644 --- a/Core/Src/gpio.c +++ b/Core/Src/gpio.c @@ -56,10 +56,10 @@ void MX_GPIO_Init(void) __HAL_RCC_GPIOD_CLK_ENABLE(); /*Configure GPIO pin Output Level */ - HAL_GPIO_WritePin(GPIOC, Power2_Pin|Power1_Pin|ACC_CS_Pin, GPIO_PIN_RESET); + HAL_GPIO_WritePin(GPIOC, Power2_Pin|Power1_Pin|Power_5V_EN_Pin|GYRO_CS_Pin, GPIO_PIN_SET); /*Configure GPIO pin Output Level */ - HAL_GPIO_WritePin(GPIOC, Power_5V_EN_Pin|GYRO_CS_Pin, GPIO_PIN_SET); + HAL_GPIO_WritePin(ACC_CS_GPIO_Port, ACC_CS_Pin, GPIO_PIN_RESET); /*Configure GPIO pin Output Level */ HAL_GPIO_WritePin(GPIOA, power2_Pin|power1_Pin, GPIO_PIN_SET); diff --git a/TronOneH7_Scaffold.ioc b/TronOneH7_Scaffold.ioc index bd4003d..bddd10a 100644 --- a/TronOneH7_Scaffold.ioc +++ b/TronOneH7_Scaffold.ioc @@ -678,13 +678,15 @@ PC11.Signal=SPI3_MISO PC12.Locked=true PC12.Signal=SharedStack_PC12 PC12.Stacked=true -PC13.GPIOParameters=GPIO_Label +PC13.GPIOParameters=PinState,GPIO_Label PC13.GPIO_Label=Power2 PC13.Locked=true +PC13.PinState=GPIO_PIN_SET PC13.Signal=GPIO_Output -PC14-OSC32_IN.GPIOParameters=GPIO_Label +PC14-OSC32_IN.GPIOParameters=PinState,GPIO_Label PC14-OSC32_IN.GPIO_Label=Power1 PC14-OSC32_IN.Locked=true +PC14-OSC32_IN.PinState=GPIO_PIN_SET PC14-OSC32_IN.Signal=GPIO_Output PC15-OSC32_OUT.GPIOParameters=PinState,GPIO_Label PC15-OSC32_OUT.GPIO_Label=Power_5V_EN @@ -779,7 +781,7 @@ PH1-OSC_OUT.Signal=RCC_OSC_OUT PinOutPanel.RotationAngle=0 ProjectManager.AskForMigrate=true ProjectManager.BackupPrevious=false -ProjectManager.CompilerLinker=Starm-Clang +ProjectManager.CompilerLinker=GCC ProjectManager.CompilerOptimize=6 ProjectManager.ComputerToolchain=false ProjectManager.CoupleFile=true diff --git a/User_Code/application/robot.c b/User_Code/application/robot.c index 1d87fc8..38e4425 100644 --- a/User_Code/application/robot.c +++ b/User_Code/application/robot.c @@ -53,6 +53,10 @@ void RobotInit() // 若必须,则只允许使用DWT_Delay() __disable_irq(); + // HAL_GPIO_WritePin(Power1_GPIO_Port, Power1_Pin, GPIO_PIN_SET);//使能24V电源 + // HAL_GPIO_WritePin(Power2_GPIO_Port, Power2_Pin, GPIO_PIN_SET);//使能24V电源 + // HAL_GPIO_WritePin(Power_5V_EN_GPIO_Port, Power_5V_EN_Pin, GPIO_PIN_SET);//使能5V电源 + BSPInit(); #if defined(ONE_BOARD) || defined(GIMBAL_BOARD)