MPSoC robustness tweaks and debug mode #805

Merged
meggert merged 8 commits from mpsoc-debug-mode into main 2023-10-17 09:48:52 +02:00
2 changed files with 4 additions and 2 deletions
Showing only changes of commit 0ada956285 - Show all commits

View File

@ -91,6 +91,8 @@ ReturnValue_t PlocMpsocHandler::initialize() {
void PlocMpsocHandler::performOperationHook() {
if (commandIsPending and cmdCountdown.hasTimedOut()) {
sif::warning << "PlocMpsocHandler: Command " << getPendingCommand() << " has timed out"
<< std::endl;
commandIsPending = false;
// TODO: Better returnvalue?
cmdDoneHandler(false, returnvalue::FAILED);
@ -215,7 +217,6 @@ ReturnValue_t PlocMpsocHandler::buildNormalDeviceCommand(DeviceCommandId_t* id)
if (not commandIsPending and not specialComHelperExecuting) {
*id = mpsoc::TC_GET_HK_REPORT;
commandIsPending = true;
cmdCountdown.resetTimer();
return buildCommandFromCommand(*id, nullptr, 0);
}
return NOTHING_TO_SEND;
@ -713,6 +714,7 @@ ReturnValue_t PlocMpsocHandler::finishTcPrep(mpsoc::TcBase& tcBase) {
<< " Size " << std::dec << tcBase.getFullPacketLen() << " SSC "
<< tcBase.getSeqCount() << std::endl;
}
cmdCountdown.resetTimer();
return returnvalue::OK;
}

View File

@ -186,7 +186,7 @@ class PlocMpsocHandler : public DeviceHandlerBase, public CommandsActionsIF {
};
TmMemReadReport tmMemReadReport;
Countdown cmdCountdown = Countdown(10000);
Countdown cmdCountdown = Countdown(12000);
struct TelemetryBuffer {
uint16_t length = 0;