improvements for reboot FDIR
Some checks are pending
EIVE/eive-obsw/pipeline/head Build started...

This commit is contained in:
Robin Müller 2023-08-01 09:26:06 +02:00
parent 1f61f7d2e8
commit a884176773
Signed by: muellerr
GPG Key ID: A649FB78196E3849
2 changed files with 22 additions and 3 deletions

View File

@ -196,9 +196,11 @@ void EiveSystem::i2cRecoveryLogic() {
executeAction(EXECUTE_I2C_REBOOT, MessageQueueIF::NO_QUEUE, nullptr, 0);
} else {
triggerEvent(core::I2C_REBOOT);
// Some delay to ensure that the event is stored in the persistent TM store as well.
TaskFactory::delayTask(500);
// We already tried an I2C recovery but the bus is still broken.
// Send full reboot request to core controller.
sendFullRebootCommand();
// Send reboot request to core controller.
sendSelfRebootCommand();
return;
}
}
@ -294,8 +296,10 @@ void EiveSystem::pdecRecoveryLogic() {
// reboot the system.
if (ptmeResetWasAttempted) {
triggerEvent(core::PDEC_REBOOT);
// Some delay to ensure that the event is stored in the persistent TM store as well.
TaskFactory::delayTask(500);
// Send reboot command.
sendFullRebootCommand();
sendSelfRebootCommand();
} else {
// Try one full PDEC reset.
CommandMessage msg;
@ -329,3 +333,17 @@ ReturnValue_t EiveSystem::handleCommandMessage(CommandMessage* message) {
}
return Subsystem::handleCommandMessage(message);
}
ReturnValue_t EiveSystem::sendSelfRebootCommand() {
CommandMessage msg;
uint8_t data[1];
// This option is used to target the same image.
data[0] = true;
store_address_t storeId;
ReturnValue_t result = IPCStore->addData(&storeId, data, sizeof(data));
if (result != returnvalue::OK) {
return result;
}
ActionMessage::setCommand(&msg, core::XSC_REBOOT_OBC, storeId);
return commandQueue->sendMessage(coreCtrlQueueId, &msg);
}

View File

@ -63,6 +63,7 @@ class EiveSystem : public Subsystem, public HasActionsIF {
ReturnValue_t handleCommandMessage(CommandMessage* message) override;
ReturnValue_t sendFullRebootCommand();
ReturnValue_t sendSelfRebootCommand();
void pdecRecoveryLogic();