more debugging necessary here
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Robin Müller 2023-09-25 17:10:13 +02:00
parent a2246f9d3d
commit 75f08175f6
2 changed files with 13 additions and 8 deletions

View File

@ -1222,15 +1222,19 @@ void PlocMpsocHandler::dataReceived(ActionId_t actionId, const uint8_t* data, ui
}
void PlocMpsocHandler::completionSuccessfulReceived(ActionId_t actionId) {
sif::debug << "recv completion of action " << actionId << std::endl;
if (actionId != supv::EXE_REPORT) {
sif::warning << "PlocMPSoCHandler::completionSuccessfulReceived: Did not expect the action "
<< "ID " << actionId << std::endl;
return;
}
switch (powerState) {
case PowerState::PENDING_STARTUP:
case PowerState::PENDING_STARTUP: {
mpsocBootTransitionCd.resetTimer();
powerState = PowerState::DONE;
break;
}
case PowerState::PENDING_SHUTDOWN: {
sif::debug << "power switching done" << std::endl;
powerState = PowerState::DONE;
break;
}
@ -1398,13 +1402,13 @@ bool PlocMpsocHandler::handleHwStartup() {
}
}
if (powerState == PowerState::DONE) {
if (not !supvTransitionCd.hasTimedOut()) {
// Wait a bit for the MPSoC to fully boot. We re-use the SUPV transition countdown
// for this.
return false;
}
if (mpsocBootTransitionCd.hasTimedOut()) {
// Wait a bit for the MPSoC to fully boot.
uartIsolatorSwitch.pullHigh();
powerState = PowerState::IDLE;
} else {
return false;
}
}
return true;
}
@ -1447,7 +1451,7 @@ void PlocMpsocHandler::handleActionCommandFailure(ActionId_t actionId) {
case supv::EXE_REPORT:
break;
default:
sif::debug << "PlocMPSoCHandler::handleActionCommandFailure: Did not expect this action ID "
sif::debug << "PlocMPSoCHandler::handleActionCommandFailure: Did not expect the action ID "
<< std::endl;
return;
}

View File

@ -112,6 +112,7 @@ class PlocMpsocHandler : public DeviceHandlerBase, public CommandsActionsIF {
static const uint16_t PACKET_SEQUENCE_COUNT_MASK = 0x3FFF;
mpsoc::HkReport hkReport;
Countdown mpsocBootTransitionCd = Countdown(5000);
Countdown supvTransitionCd = Countdown(3000);
MessageQueueIF* eventQueue = nullptr;