I2C reboot procedure for EIVE system #578

Merged
muellerr merged 17 commits from feature_i2c_reboot_procedure into develop 2023-04-07 11:07:05 +02:00
Showing only changes of commit ca44b541b1 - Show all commits

View File

@ -191,14 +191,12 @@ void EiveSystem::i2cRecoveryLogic() {
break;
}
case (I2cRebootState::SYSTEM_MODE_BOOT): {
sif::debug << "going to boot mode" << std::endl;
startTransition(satsystem::Mode::BOOT, 0);
i2cRebootState = I2cRebootState::SWITCH_3V3_STACK_OFF_AND_BATT_REBOOT;
i2cRebootHandlingCountdown.resetTimer();
break;
}
case (I2cRebootState::SWITCH_3V3_STACK_OFF_AND_BATT_REBOOT): {
sif::debug << "3v3 stack off and batt reboot" << std::endl;
if (mode == satsystem::Mode::BOOT) {
result = powerSwitcher->sendSwitchCommand(power::Switches::P60_DOCK_3V3_STACK,
PowerSwitchIF::SWITCH_OFF);
@ -225,7 +223,6 @@ void EiveSystem::i2cRecoveryLogic() {
break;
}
case (I2cRebootState::SWITCH_3V3_STACK_ON): {
sif::debug << "3v3 stack on" << std::endl;
result = powerSwitcher->sendSwitchCommand(power::Switches::P60_DOCK_3V3_STACK,
PowerSwitchIF::SWITCH_ON);
if (result != returnvalue::OK) {
@ -241,7 +238,6 @@ void EiveSystem::i2cRecoveryLogic() {
PowerSwitchIF::SWITCH_ON) {
// This should always be accepted
commonI2cRecoverySequenceFinish();
sif::debug << "going back to safe" << std::endl;
actionHelper.finish(true, actionCommandedBy, EXECUTE_I2C_REBOOT);
}
break;