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);