that should get the job done
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good

This commit is contained in:
Robin Müller 2023-10-02 14:47:41 +02:00
parent 9c1eee075c
commit 404a1009ed
Signed by: muellerr
GPG Key ID: FCE0B2BD2195142F
3 changed files with 22 additions and 6 deletions

View File

@ -26,6 +26,11 @@ will consitute of a breaking change warranting a new major release:
- Missing `nullptr` checks for PLOC Supervisor handler, which could lead to crashes. - Missing `nullptr` checks for PLOC Supervisor handler, which could lead to crashes.
## Added
- Activate Xiphos WDT with a timeout period of 60 seconds using the `libxiphos` API. The WDT
calls are done by the new `XiphosWdtHandler` object.
# [v6.6.0] 2023-09-18 # [v6.6.0] 2023-09-18
## Changed ## Changed

View File

@ -19,12 +19,21 @@ ReturnValue_t XiphosWdtHandler::initialize() {
<< " seconds failed with code " << result << ": " << strerror(result) << std::endl; << " seconds failed with code " << result << ": " << strerror(result) << std::endl;
return ObjectManagerIF::CHILD_INIT_FAILED; return ObjectManagerIF::CHILD_INIT_FAILED;
} }
int nowayout = 0;
int status = 0;
result = xsc_watchdog_get_status(&nowayout, &status);
if (result == 0) {
if (status == 0) {
result = xsc_watchdog_enable(wdtHandle); result = xsc_watchdog_enable(wdtHandle);
if (result != 0) { if (result != 0) {
sif::error << "XiphosWdtHandler: Enabling WDT failed with code " << result << ": " sif::error << "XiphosWdtHandler: Enabling WDT failed with code " << result << ": "
<< strerror(result) << std::endl; << strerror(result) << std::endl;
return ObjectManagerIF::CHILD_INIT_FAILED; return ObjectManagerIF::CHILD_INIT_FAILED;
} }
}
} else {
sif::warning << "XiphosWdtHandler: Getting WDT status failed" << std::endl;
}
return returnvalue::OK; return returnvalue::OK;
} }

View File

@ -82,8 +82,10 @@ void scheduling::initTasks() {
} }
#endif #endif
// Medium priority, higher than something like payload, but not the highest priority to also
// detect tasks which choke other tasks.
PeriodicTaskIF* xiphosWdtTask = PeriodicTaskIF* xiphosWdtTask =
factory->createPeriodicTask("XIPHOS_WDT", 90, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4, factory->createPeriodicTask("XIPHOS_WDT", 40, PeriodicTaskIF::MINIMUM_STACK_SIZE, 0.4,
missedDeadlineFunc, &RR_SCHEDULING); missedDeadlineFunc, &RR_SCHEDULING);
result = xiphosWdtTask->addComponent(objects::XIPHOS_WDT); result = xiphosWdtTask->addComponent(objects::XIPHOS_WDT);
if (result != returnvalue::OK) { if (result != returnvalue::OK) {