mpsoc shutdown after running update procedure

This commit is contained in:
Jakob Meier
2022-04-25 11:03:02 +02:00
parent 6876952bbd
commit 311ec7b194
12 changed files with 343 additions and 86 deletions

View File

@ -769,10 +769,24 @@ ReturnValue_t PlocSupervisorHandler::initializeLocalDataPool(localpool::DataPool
}
void PlocSupervisorHandler::handleEvent(EventMessage* eventMessage) {
ReturnValue_t result = RETURN_OK;
object_id_t objectId = eventMessage->getReporter();
Event event = eventMessage->getEvent();
switch (objectId) {
case objects::PLOC_SUPERVISOR_HELPER: {
plocSupvHelperExecuting = false;
// 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) {
result = this->executeAction(supv::SHUTDOWN_MPSOC, NO_COMMANDER, nullptr, 0);
if (result != RETURN_OK) {
triggerEvent(SUPV_MPSOC_SHUWDOWN_BUILD_FAILED);
sif::warning << "PlocSupervisorHandler::handleEvent: Failed to build MPSoC shutdown "
"command" << std::endl;
return;
}
}
break;
}
default: