continuation of failed mpsoc update
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

This commit is contained in:
Jakob Meier
2022-05-23 12:05:42 +02:00
parent bb397a58de
commit fb5c6c4c17
14 changed files with 966 additions and 848 deletions

View File

@ -118,6 +118,11 @@ ReturnValue_t PlocSupervisorHandler::executeAction(ActionId_t actionId,
plocSupvHelperExecuting = true;
return EXECUTION_FINISHED;
}
case CONTINUE_UPDATE: {
supvHelper->initiateUpdateContinuation();
plocSupvHelperExecuting = true;
return EXECUTION_FINISHED;
}
case LOGGING_REQUEST_EVENT_BUFFERS: {
if (size > config::MAX_PATH_SIZE) {
return SupvReturnValuesIF::FILENAME_TOO_LONG;
@ -436,8 +441,9 @@ void PlocSupervisorHandler::fillCommandAndReplyMap() {
&mramDumpTimeout);
this->insertInCommandAndReplyMap(CONSECUTIVE_MRAM_DUMP, 0, nullptr, 0, false, false,
CONSECUTIVE_MRAM_DUMP, &mramDumpTimeout);
this->insertInReplyMap(ACK_REPORT, 3, nullptr, SIZE_ACK_REPORT);
this->insertInReplyMap(EXE_REPORT, 0, nullptr, SIZE_EXE_REPORT, false, &executionTimeout);
this->insertInReplyMap(ACK_REPORT, 3, nullptr, SIZE_ACK_REPORT, false,
&acknowledgementReportTimeout);
this->insertInReplyMap(EXE_REPORT, 0, nullptr, SIZE_EXE_REPORT, false, &executionReportTimeout);
this->insertInReplyMap(HK_REPORT, 3, &hkset, SIZE_HK_REPORT);
this->insertInReplyMap(BOOT_STATUS_REPORT, 3, &bootStatusReport, SIZE_BOOT_STATUS_REPORT);
this->insertInReplyMap(LATCHUP_REPORT, 3, &latchupStatusReport, SIZE_LATCHUP_STATUS_REPORT);
@ -572,14 +578,14 @@ ReturnValue_t PlocSupervisorHandler::enableReplyInReplyMap(DeviceCommandMap::ite
<< " not in replyMap" << std::endl;
}
setExecutionTimeout(command->first);
result = DeviceHandlerBase::enableReplyInReplyMap(command, enabledReplies, true, EXE_REPORT);
if (result != RETURN_OK) {
sif::debug << "PlocSupervisorHandler::enableReplyInReplyMap: Reply with id " << EXE_REPORT
<< " not in replyMap" << std::endl;
}
setExecutionTimeout(command->first);
return RETURN_OK;
}
@ -814,7 +820,9 @@ void PlocSupervisorHandler::handleEvent(EventMessage* eventMessage) {
// After execution of update procedure, PLOC is in a state where it draws approx. 700 mA of
// current. To leave this state the shutdown MPSoC command must be sent here.
if (event == PlocSupvHelper::SUPV_UPDATE_FAILED ||
event == PlocSupvHelper::SUPV_UPDATE_SUCCESSFUL) {
event == PlocSupvHelper::SUPV_UPDATE_SUCCESSFUL ||
event == PlocSupvHelper::SUPV_CONTINUE_UPDATE_FAILED ||
event == PlocSupvHelper::SUPV_CONTINUE_UPDATE_SUCCESSFUL) {
result = this->executeAction(supv::SHUTDOWN_MPSOC, NO_COMMANDER, nullptr, 0);
if (result != RETURN_OK) {
triggerEvent(SUPV_MPSOC_SHUWDOWN_BUILD_FAILED);
@ -837,13 +845,13 @@ void PlocSupervisorHandler::setExecutionTimeout(DeviceCommandId_t command) {
switch (command) {
case FIRST_MRAM_DUMP:
case CONSECUTIVE_MRAM_DUMP:
executionTimeout.setTimeout(MRAM_DUMP_EXECUTION_TIMEOUT);
executionReportTimeout.setTimeout(MRAM_DUMP_EXECUTION_TIMEOUT);
break;
case COPY_ADC_DATA_TO_MRAM:
executionTimeout.setTimeout(COPY_ADC_TO_MRAM_TIMEOUT);
executionReportTimeout.setTimeout(COPY_ADC_TO_MRAM_TIMEOUT);
break;
default:
executionTimeout.setTimeout(EXECUTION_DEFAULT_TIMEOUT);
executionReportTimeout.setTimeout(EXECUTION_DEFAULT_TIMEOUT);
break;
}
}
@ -957,6 +965,7 @@ ReturnValue_t PlocSupervisorHandler::handleHkReport(const uint8_t* data) {
if (result == SupvReturnValuesIF::CRC_FAILURE) {
sif::error << "PlocSupervisorHandler::handleHkReport: Hk report has invalid crc" << std::endl;
return result;
}
uint16_t offset = supv::DATA_FIELD_OFFSET;