proper post reset handling for PDEC reset
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2023-04-14 19:29:22 +02:00
parent 644a768778
commit 62d18826f1
5 changed files with 31 additions and 14 deletions

View File

@ -278,11 +278,14 @@ ReturnValue_t EiveSystem::sendFullRebootCommand() {
}
void EiveSystem::pdecRecoveryLogic() {
if (ptmeResetWasAttempted and ptmeResetWasAttemptedCd.hasTimedOut()) {
ptmeResetWasAttempted = false;
}
if (frameDirtyCheckCd.hasTimedOut()) {
if (frameDirtyErrorCounter >= 4) {
// If a PTME reset was already attempted and there is still an issue receiving TC frames,
// reboot the system.
if (ptmeResetWasAttemptedCd.isBusy()) {
if (ptmeResetWasAttempted) {
// Send reboot command.
sendFullRebootCommand();
} else {
@ -292,6 +295,7 @@ void EiveSystem::pdecRecoveryLogic() {
ActionMessage::setCommand(&msg, pdec::RESET_PDEC_WITH_REINIITALIZATION, dummy);
commandQueue->sendMessage(pdecHandlerQueueId, &msg);
ptmeResetWasAttemptedCd.resetTimer();
ptmeResetWasAttempted = true;
}
}
frameDirtyErrorCounter = 0;