From ee253eb5c0f45d6443609cf7cbc2a36578866fb3 Mon Sep 17 00:00:00 2001 From: cfif Date: Tue, 10 Feb 2026 12:01:56 +0300 Subject: [PATCH] =?UTF-8?q?=D0=9E=D0=B1=D0=BD=D0=BE=D0=B2=D0=BB=D0=B5?= =?UTF-8?q?=D0=BD=D0=B8=D0=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- MainModesArbiter_InitStage.c | 37 +++++++++++++++++++++++++++++++++++- PeripheralInterfaces.c | 2 +- 2 files changed, 37 insertions(+), 2 deletions(-) diff --git a/MainModesArbiter_InitStage.c b/MainModesArbiter_InitStage.c index a149b1c..9700e7d 100644 --- a/MainModesArbiter_InitStage.c +++ b/MainModesArbiter_InitStage.c @@ -56,12 +56,47 @@ static void Mma_InitSubSystems(tMma *env) { &env->slog.logger); + // Контроль напряжения борт-сети (0 - ВКЛ) + GpioPinSet(&env->gpios->power.PBATT_CK_EN, true); + // Включение 5V (0 - ВКЛ) + GpioPinSet(&env->gpios->power.SW5V_EN, false); +/* + GpioPinSet(&env->gpios->power.BTS5180_2EKA_FrontRearIncarMotor.Incar_Motor_Front_EN, true); + GpioPinSet(&env->gpios->power.BTS5180_2EKA_FrontRearIncarMotor.Incar_EN_Diag, true); + GpioPinSet(&env->gpios->power.BTS5180_2EKA_FrontRearIncarMotor.Incar_Motor_Rear_EN, true); + + GpioPinSet(&env->gpios->power.BTS5180_2EKA_TwoWayValveAndReservePowerSupply.TwoWayValve_EN, true); + GpioPinSet(&env->gpios->power.BTS5180_2EKA_TwoWayValveAndReservePowerSupply.TwoWayValve_EN_Diag, true); + GpioPinSet(&env->gpios->power.BTS5180_2EKA_TwoWayValveAndReservePowerSupply.ReservePower_EN, true); + + GpioPinSet(&env->gpios->power.BTS5180_2EKA_2xChannelPTCPower.PtcRelayDriver1_EN, true); + GpioPinSet(&env->gpios->power.BTS5180_2EKA_2xChannelPTCPower.PtcRelayDriver_EN_Diag, true); + GpioPinSet(&env->gpios->power.BTS5180_2EKA_2xChannelPTCPower.PtcRelayDriver2_EN, true); + + GpioPinSet(&env->gpios->power.BTS5180_2EKA_ShutOFFValveFrontRear.ShutOffFront_EN, true); + GpioPinSet(&env->gpios->power.BTS5180_2EKA_ShutOFFValveFrontRear.ShutOff_EN_Diag, true); + GpioPinSet(&env->gpios->power.BTS5180_2EKA_ShutOFFValveFrontRear.ShutOffRear_EN, true); + + GpioPinSet(&env->gpios->power.BTS5120_2EKA_ShutoffValvePowerTXV.ShutOffTXV1_EN, true); + GpioPinSet(&env->gpios->power.BTS5120_2EKA_ShutoffValvePowerTXV.ShutOffTXV_EN_Diag, true); + GpioPinSet(&env->gpios->power.BTS5120_2EKA_ShutoffValvePowerTXV.ShutOffTXV2_EN, true); + + GpioPinSet(&env->gpios->power.BTS4175SGAXUMA1_ReservePowerOutput.EN_ReservePower, true); + GpioPinSet(&env->gpios->power.BTS4175SGAXUMA1_ShutOFFValveBatteryChiller.EN_BATTChiller, true); + + GpioPinSet(&env->gpios->power.VN7008AJ_FrontLINActuatorPowerDriverAB.LIN_ActPower_AB, true); + GpioPinSet(&env->gpios->power.VN7008AJ_FrontLINActuatorPowerDriverAB.EN_CurrentSensing_AB, true); + + GpioPinSet(&env->gpios->power.VN7008AJ_RearLINActuatorPowerDriverC.LIN_ActPower_C, true); + GpioPinSet(&env->gpios->power.VN7008AJ_RearLINActuatorPowerDriverC.EN_CurrentSensing_C, true); +*/ + + // Indication_Init(&env->Indication, HVAC_DEV_MODE_STARTUP); CommandLine_Init(&env->cli, &env->serialPorts->SerialPortLog_IO, &env->serialPorts->cliVirtualPortOut_Io); CommandLine_StartThread(&env->cli); - Diagnostic_Init(&env->Diagnostic, &env->slog.logger); CanSerialPortFrameXcpInit( diff --git a/PeripheralInterfaces.c b/PeripheralInterfaces.c index c43f1fe..fb4eb2c 100644 --- a/PeripheralInterfaces.c +++ b/PeripheralInterfaces.c @@ -5,7 +5,7 @@ #include "PeripheralInterfaces.h" void InitPeripheralInterfaces(tLoggerInterface *logger) { -// Gpios_Init(); + Gpios_Init(); CanPorts_Init(logger); Adcs_Init(logger);