Xiphos WDT #797

Merged
muellerr merged 18 commits from add-xiphos-wdt-handling into main 2023-10-11 19:50:00 +02:00
20 changed files with 210 additions and 20 deletions
Showing only changes of commit 4e3229f018 - Show all commits

View File

@@ -43,12 +43,14 @@ ReturnValue_t XiphosWdtHandler::performOperation(uint8_t opCode) {
sif::warning << "Can not handle message with message type " << command.getMessageType()
<< std::endl;
}
if (enabled) {
int retval = xsc_watchdog_keepalive(wdtHandle);
if (retval != 0) {
sif::warning << "XiphosWdtHandler: Feeding WDT failed with code " << retval << ": "
<< strerror(retval) << std::endl;
return returnvalue::FAILED;
}
}
return returnvalue::OK;
}
@@ -91,6 +93,7 @@ ReturnValue_t XiphosWdtHandler::enableWdt() {
return returnvalue::FAILED;
}
}
enabled = true;
return returnvalue::OK;
}
@@ -112,6 +115,7 @@ ReturnValue_t XiphosWdtHandler::disableWdt() {
return returnvalue::FAILED;
}
}
enabled = false;
return returnvalue::OK;
}

View File

@@ -27,6 +27,7 @@ class XiphosWdtHandler : public SystemObject, public ExecutableObjectIF, public
// WARNING: DO NOT SET THIS HIGHER THAN 80 SECONDS!
// Possible bug in Xiphos/Xilinx kernel driver for watchdog, related to overflow.
int timeoutSeconds = 80;
bool enabled = false;
struct watchdog_s* wdtHandle = nullptr;
MessageQueueIF* requestQueue = nullptr;
ActionHelper actionHelper;

2
tmtc

Submodule tmtc updated: aba369f11f...dcae930895