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

View File

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