diff --git a/bsp_q7s/core/XiphosWdtHandler.cpp b/bsp_q7s/core/XiphosWdtHandler.cpp index 6a1dc687..8444b65f 100644 --- a/bsp_q7s/core/XiphosWdtHandler.cpp +++ b/bsp_q7s/core/XiphosWdtHandler.cpp @@ -43,11 +43,13 @@ ReturnValue_t XiphosWdtHandler::performOperation(uint8_t opCode) { sif::warning << "Can not handle message with message type " << command.getMessageType() << std::endl; } - 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; + 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; } diff --git a/bsp_q7s/core/XiphosWdtHandler.h b/bsp_q7s/core/XiphosWdtHandler.h index 3f46cfd3..a8d73f48 100644 --- a/bsp_q7s/core/XiphosWdtHandler.h +++ b/bsp_q7s/core/XiphosWdtHandler.h @@ -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; diff --git a/tmtc b/tmtc index aba369f1..dcae9308 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit aba369f11f928aefe570f18651bd72ce98953961 +Subproject commit dcae930895b3debca5a5b615fc20cded7c3d0e89