Merge pull request 'Improvements in TMTC Handlers' (#359) from meier/far-parsing into develop
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

Reviewed-on: #359
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
This commit is contained in:
Robin Müller 2023-02-01 13:44:31 +01:00
commit 048033d264
4 changed files with 16 additions and 3 deletions

View File

@ -17,6 +17,12 @@ change warranting a new major release:
# [unreleased]
## Fixed
- The CCSDS handler starts the transmitter timer each time it is commanded to MODE_ON and times out the timer when the handler is commanded to MODE_OFF
- If the timer is timed out the CCSDS handler will disable the TX clock which will cause the syrlinks to got to standby mode
- PDEC handler now parses the FAR register also in interrupt mode
# [v1.22.1] 2023-01-30
## Changed

View File

@ -34,7 +34,7 @@ class PdecConfig {
static const uint8_t VIRTUAL_CHANNEL = 0;
static const uint8_t RESERVED_FIELD_A = 0;
static const uint16_t SPACECRAFT_ID = 0x274;
static const uint16_t SPACECRAFT_ID = 0x3DC;
static const uint16_t DUMMY_BITS = 0;
// Parameters to control the FARM for AD frames
// Set here for future use

View File

@ -188,6 +188,7 @@ ReturnValue_t PdecHandler::irqOperation() {
if ((pisr & NEW_FAR_MASK) == NEW_FAR_MASK) {
// Read FAR here
CURRENT_FAR = readFar();
checkFrameAna(CURRENT_FAR);
}
if (lockCheckCd.hasTimedOut()) {
checkLocks();

View File

@ -135,10 +135,12 @@ ReturnValue_t CcsdsIpCoreHandler::initialize() {
return ObjectManagerIF::CHILD_INIT_FAILED;
}
transmitterCountdown.setTimeout(transmitterTimeout);
transmitterCountdown.timeOut();
#if OBSW_SYRLINKS_SIMULATED == 1
// Update data on rising edge
ptmeConfig->invertTxClock(false);
transmitterCountdown.setTimeout(transmitterTimeout);
linkState = UP;
forwardLinkstate();
#endif /* OBSW_SYRLINKS_SIMULATED == 1*/
@ -348,6 +350,9 @@ void CcsdsIpCoreHandler::enableTransmit() {
gpioIF->pullHigh(enTxClock);
gpioIF->pullHigh(enTxData);
#endif
linkState = UP;
forwardLinkstate();
transmitterCountdown.resetTimer();
}
void CcsdsIpCoreHandler::checkTxTimer() {
@ -356,6 +361,7 @@ void CcsdsIpCoreHandler::checkTxTimer() {
}
if (transmitterCountdown.hasTimedOut()) {
disableTransmit();
//TODO: set mode to off (move timer to subsystem)
}
}
@ -425,7 +431,7 @@ void CcsdsIpCoreHandler::disableTransmit() {
#endif
linkState = DOWN;
forwardLinkstate();
transmitterCountdown.setTimeout(0);
transmitterCountdown.timeOut();
}
const char* CcsdsIpCoreHandler::getName() const { return "CCSDS Handler"; }