Merge branch 'develop' into acs-flp-safe
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit
This commit is contained in:
commit
d6331aab0b
25
CHANGELOG.md
25
CHANGELOG.md
@ -16,18 +16,33 @@ will consitute of a breaking change warranting a new major release:
|
||||
|
||||
# [unreleased]
|
||||
|
||||
## Fixed
|
||||
|
||||
- Bugfix for STR: Some action commands wrongfully declined.
|
||||
- STR: No normal command handling while a special request like an image upload is active.
|
||||
|
||||
# [v1.39.0] 2023-03-21
|
||||
|
||||
Requires firmware update for new FPGA design where reset line is routed into the software.
|
||||
2 relevant PRs:
|
||||
- https://egit.irs.uni-stuttgart.de/eive/q7s-vivado/pulls/53
|
||||
- https://egit.irs.uni-stuttgart.de/eive/q7s-vivado/pulls/54
|
||||
|
||||
eive-tmtc: v2.19.3
|
||||
|
||||
## Added
|
||||
|
||||
- Added NaN and Inf check for the `MEKF`. If these are detected, the `AcsController` will reset
|
||||
the `MEKF` on its own once. This way, there will not be an event spam and operators will have
|
||||
to look into the reason of wrong outputs. To restore the reset ability, an action command has
|
||||
been added.
|
||||
|
||||
- Contingency handling for non-working I2C bus bug. Reboot the system if the I2C is not working.
|
||||
|
||||
## Fixed
|
||||
|
||||
- Fixed transition for dual power lane assemblies: When going from dual side submode to single side
|
||||
submode, perform logical commanding first, similarly to when going to OFF mode.
|
||||
- GPS time is only set to valid if at least one satellite is in view.
|
||||
|
||||
## Changed
|
||||
|
||||
@ -35,6 +50,14 @@ will consitute of a breaking change warranting a new major release:
|
||||
Furthermore, the submode in the NORMAL mode now should be 0 instead of some ON mode submode.
|
||||
- Updated GYR bias values to newest measurements. This also corrects the ADIS values to always
|
||||
consit of just one digit.
|
||||
- The CCSDS IP core handler now exposes a parameter to enable the priority select mode
|
||||
for the PTME core. This mode prioritizes virtual channels with a lower index, so for example
|
||||
the virtual channel (VC0) will have the highest priority, while VC3 will have the lowestg
|
||||
priority. This mode will be enabled by default for now, but can be set via the parameter IF with
|
||||
the unique parameter ID 0. The update of this mode requires a PTME reset. Therefore, it will only
|
||||
be performed when the transmitter is off to avoid weird bugs.
|
||||
- Connect and handle reset line for the PTME core in the software now.
|
||||
- Safe mode controller failure event now only triggers once per minute.
|
||||
|
||||
# [v1.38.0] 2023-03-17
|
||||
|
||||
|
@ -10,7 +10,7 @@
|
||||
cmake_minimum_required(VERSION 3.13)
|
||||
|
||||
set(OBSW_VERSION_MAJOR 1)
|
||||
set(OBSW_VERSION_MINOR 38)
|
||||
set(OBSW_VERSION_MINOR 39)
|
||||
set(OBSW_VERSION_REVISION 0)
|
||||
|
||||
# set(CMAKE_VERBOSE TRUE)
|
||||
|
20
automation/Jenkinsfile
vendored
20
automation/Jenkinsfile
vendored
@ -1,6 +1,7 @@
|
||||
pipeline {
|
||||
environment {
|
||||
BUILDDIR_Q7 = 'build_q7'
|
||||
BUILDDIR_Q7S = 'build_q7s_fm'
|
||||
BUILDDIR_Q7S_EM = 'build_q7s_em'
|
||||
BUILDDIR_LINUX = 'build_linux'
|
||||
}
|
||||
agent {
|
||||
@ -12,15 +13,24 @@ pipeline {
|
||||
stages {
|
||||
stage('Clean') {
|
||||
steps {
|
||||
sh 'rm -rf $BUILDDIR_Q7'
|
||||
sh 'rm -rf $BUILDDIR_Q7S'
|
||||
sh 'rm -rf $BUILDDIR_Q7S_EM'
|
||||
sh 'rm -rf $BUILDDIR_LINUX'
|
||||
}
|
||||
}
|
||||
stage('Build Q7S') {
|
||||
steps {
|
||||
dir(BUILDDIR_Q7) {
|
||||
dir(BUILDDIR_Q7S) {
|
||||
sh 'cmake -DTGT_BSP="arm/q7s" -DCMAKE_BUILD_TYPE=Debug ..'
|
||||
sh 'cmake --build . -j4'
|
||||
sh 'cmake --build . -j6'
|
||||
}
|
||||
}
|
||||
}
|
||||
stage('Build Q7S EM') {
|
||||
steps {
|
||||
dir(BUILDDIR_Q7S_EM) {
|
||||
sh 'cmake -DTGT_BSP="arm/q7s" -DEIVE_Q7S_EM=ON -DCMAKE_BUILD_TYPE=Debug ..'
|
||||
sh 'cmake --build . -j6'
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -28,7 +38,7 @@ pipeline {
|
||||
steps {
|
||||
dir(BUILDDIR_LINUX) {
|
||||
sh 'cmake ..'
|
||||
sh 'cmake --build . -j4'
|
||||
sh 'cmake --build . -j6'
|
||||
sh './eive-unittest'
|
||||
}
|
||||
}
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 278 translations.
|
||||
* @brief Auto-generated event translation file. Contains 279 translations.
|
||||
* @details
|
||||
* Generated on: 2023-03-21 12:45:57
|
||||
* Generated on: 2023-03-21 23:59:36
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
@ -260,6 +260,7 @@ const char *VERSION_INFO_STRING = "VERSION_INFO";
|
||||
const char *CURRENT_IMAGE_INFO_STRING = "CURRENT_IMAGE_INFO";
|
||||
const char *REBOOT_COUNTER_STRING = "REBOOT_COUNTER";
|
||||
const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS";
|
||||
const char *I2C_UNAVAILABLE_REBOOT_STRING = "I2C_UNAVAILABLE_REBOOT";
|
||||
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
||||
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
||||
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
||||
@ -791,6 +792,8 @@ const char *translateEvents(Event event) {
|
||||
return REBOOT_COUNTER_STRING;
|
||||
case (14008):
|
||||
return INDIVIDUAL_BOOT_COUNTS_STRING;
|
||||
case (14010):
|
||||
return I2C_UNAVAILABLE_REBOOT_STRING;
|
||||
case (14100):
|
||||
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
||||
case (14101):
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 169 translations.
|
||||
* Generated on: 2023-03-21 12:45:57
|
||||
* Generated on: 2023-03-21 23:59:36
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
|
@ -90,6 +90,8 @@ static constexpr char PAPB_BUSY_SIGNAL_VC2[] = "papb_busy_signal_vc2";
|
||||
static constexpr char PAPB_EMPTY_SIGNAL_VC2[] = "papb_empty_signal_vc2";
|
||||
static constexpr char PAPB_BUSY_SIGNAL_VC3[] = "papb_busy_signal_vc3";
|
||||
static constexpr char PAPB_EMPTY_SIGNAL_VC3[] = "papb_empty_signal_vc3";
|
||||
static constexpr char PTME_RESETN[] = "ptme_resetn";
|
||||
|
||||
static constexpr char RS485_EN_TX_CLOCK[] = "tx_clock_enable_ltc2872";
|
||||
static constexpr char RS485_EN_TX_DATA[] = "tx_data_enable_ltc2872";
|
||||
static constexpr char RS485_EN_RX_CLOCK[] = "rx_clock_enable_ltc2872";
|
||||
|
@ -31,14 +31,15 @@
|
||||
xsc::Chip CoreController::CURRENT_CHIP = xsc::Chip::NO_CHIP;
|
||||
xsc::Copy CoreController::CURRENT_COPY = xsc::Copy::NO_COPY;
|
||||
|
||||
CoreController::CoreController(object_id_t objectId)
|
||||
CoreController::CoreController(object_id_t objectId, const std::atomic_uint16_t &i2cErrors)
|
||||
: ExtendedControllerBase(objectId, 5),
|
||||
cmdExecutor(4096),
|
||||
cmdReplyBuf(4096, true),
|
||||
cmdRepliesSizes(128),
|
||||
opDivider5(5),
|
||||
opDivider10(10),
|
||||
hkSet(this) {
|
||||
hkSet(this),
|
||||
i2cErrors(i2cErrors) {
|
||||
cmdExecutor.setRingBuffer(&cmdReplyBuf, &cmdRepliesSizes);
|
||||
try {
|
||||
sdcMan = SdCardManager::instance();
|
||||
@ -107,6 +108,12 @@ void CoreController::performControlOperation() {
|
||||
sdStateMachine();
|
||||
performMountedSdCardOperations();
|
||||
readHkData();
|
||||
if (i2cErrors >= 5) {
|
||||
bool protOpPerformed = false;
|
||||
triggerEvent(I2C_UNAVAILABLE_REBOOT);
|
||||
gracefulShutdownTasks(CURRENT_CHIP, CURRENT_COPY, protOpPerformed);
|
||||
std::system("xsc_boot_copy -r");
|
||||
}
|
||||
if (shellCmdIsExecuting) {
|
||||
bool replyReceived = false;
|
||||
// TODO: We could read the data in the ring buffer and send it as an action data reply.
|
||||
|
@ -6,6 +6,7 @@
|
||||
#include <fsfw/globalfunctions/PeriodicOperationDivider.h>
|
||||
#include <libxiphos.h>
|
||||
|
||||
#include <atomic>
|
||||
#include <cstddef>
|
||||
|
||||
#include "CoreDefinitions.h"
|
||||
@ -131,8 +132,10 @@ class CoreController : public ExtendedControllerBase {
|
||||
//! P1: First 16 bits boot count of image 0 0, last 16 bits boot count of image 0 1.
|
||||
//! P2: First 16 bits boot count of image 1 0, last 16 bits boot count of image 1 1.
|
||||
static constexpr Event INDIVIDUAL_BOOT_COUNTS = event::makeEvent(SUBSYSTEM_ID, 8, severity::INFO);
|
||||
static constexpr Event I2C_UNAVAILABLE_REBOOT =
|
||||
event::makeEvent(SUBSYSTEM_ID, 10, severity::MEDIUM);
|
||||
|
||||
CoreController(object_id_t objectId);
|
||||
CoreController(object_id_t objectId, const std::atomic_uint16_t& i2cErrors);
|
||||
virtual ~CoreController();
|
||||
|
||||
ReturnValue_t initialize() override;
|
||||
@ -262,6 +265,7 @@ class CoreController : public ExtendedControllerBase {
|
||||
PoolEntry<float> plVoltageEntry = PoolEntry<float>(0.0);
|
||||
|
||||
core::HkSet hkSet;
|
||||
const std::atomic_uint16_t& i2cErrors;
|
||||
|
||||
#if OBSW_SD_CARD_MUST_BE_ON == 1
|
||||
bool remountAttemptFlag = true;
|
||||
|
@ -123,6 +123,7 @@ using gpio::Levels;
|
||||
|
||||
ResetArgs RESET_ARGS_GNSS;
|
||||
std::atomic_bool LINK_STATE = CcsdsIpCoreHandler::LINK_DOWN;
|
||||
std::atomic_uint16_t I2C_FATAL_ERRORS = 0;
|
||||
|
||||
void Factory::setStaticFrameworkObjectIds() {
|
||||
PusServiceBase::PUS_DISTRIBUTOR = objects::PUS_PACKET_DISTRIBUTOR;
|
||||
@ -747,6 +748,9 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(CcsdsComponentArgs& args) {
|
||||
gpioCookiePtmeIp->addGpio(gpioIds::VC3_PAPB_BUSY, gpio);
|
||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC3, "PAPB VC3");
|
||||
gpioCookiePtmeIp->addGpio(gpioIds::VC3_PAPB_EMPTY, gpio);
|
||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PTME_RESETN, "PTME RESETN",
|
||||
gpio::Direction::OUT, gpio::Levels::HIGH);
|
||||
gpioCookiePtmeIp->addGpio(gpioIds::PTME_RESETN, gpio);
|
||||
gpioChecker(args.gpioComIF.addGpios(gpioCookiePtmeIp), "PTME PAPB VCs");
|
||||
// Creating virtual channel interfaces
|
||||
VirtualChannelIF* vc0 =
|
||||
@ -771,9 +775,14 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(CcsdsComponentArgs& args) {
|
||||
new AxiPtmeConfig(objects::AXI_PTME_CONFIG, q7s::UIO_PTME, q7s::uiomapids::PTME_CONFIG);
|
||||
PtmeConfig* ptmeConfig = new PtmeConfig(objects::PTME_CONFIG, axiPtmeConfig);
|
||||
|
||||
*args.ipCoreHandler = new CcsdsIpCoreHandler(
|
||||
objects::CCSDS_HANDLER, objects::CCSDS_PACKET_DISTRIBUTOR, *ptmeConfig, LINK_STATE,
|
||||
&args.gpioComIF, gpioIds::RS485_EN_TX_CLOCK, gpioIds::RS485_EN_TX_DATA);
|
||||
PtmeGpios gpios;
|
||||
gpios.enableTxClock = gpioIds::RS485_EN_TX_CLOCK;
|
||||
gpios.enableTxData = gpioIds::RS485_EN_TX_CLOCK;
|
||||
gpios.ptmeResetn = gpioIds::PTME_RESETN;
|
||||
|
||||
*args.ipCoreHandler =
|
||||
new CcsdsIpCoreHandler(objects::CCSDS_HANDLER, objects::CCSDS_PACKET_DISTRIBUTOR, *ptmeConfig,
|
||||
LINK_STATE, &args.gpioComIF, gpios);
|
||||
// This VC will receive all live TM
|
||||
auto* vcWithQueue =
|
||||
new VirtualChannelWithQueue(objects::PTME_VC0_LIVE_TM, ccsds::VC0, "PTME VC0 LIVE TM", *ptme,
|
||||
@ -953,7 +962,7 @@ void ObjectFactory::createImtqComponents(PowerSwitchIF* pwrSwitcher) {
|
||||
auto* imtqAssy = new ImtqAssembly(objects::IMTQ_ASSY);
|
||||
imtqAssy->connectModeTreeParent(satsystem::acs::ACS_SUBSYSTEM);
|
||||
|
||||
new ImtqPollingTask(objects::IMTQ_POLLING);
|
||||
new ImtqPollingTask(objects::IMTQ_POLLING, I2C_FATAL_ERRORS);
|
||||
I2cCookie* imtqI2cCookie = new I2cCookie(addresses::IMTQ, imtq::MAX_REPLY_SIZE, q7s::I2C_PL_EIVE);
|
||||
auto imtqHandler = new ImtqHandler(objects::IMTQ_HANDLER, objects::IMTQ_POLLING, imtqI2cCookie,
|
||||
pcdu::Switches::PDU1_CH3_MGT_5V);
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <mission/tmtc/PersistentLogTmStoreTask.h>
|
||||
#include <mission/tmtc/PusTmFunnel.h>
|
||||
|
||||
#include <atomic>
|
||||
#include <string>
|
||||
|
||||
class LinuxLibgpioIF;
|
||||
@ -22,6 +23,8 @@ class HealthTableIF;
|
||||
class AcsBoardAssembly;
|
||||
class GpioIF;
|
||||
|
||||
extern std::atomic_uint16_t I2C_FATAL_ERRORS;
|
||||
|
||||
namespace ObjectFactory {
|
||||
|
||||
struct CcsdsComponentArgs {
|
||||
|
@ -66,7 +66,7 @@ void ObjectFactory::produce(void* args) {
|
||||
|
||||
dummy::createDummies(dummyCfg, *pwrSwitcher, gpioComIF);
|
||||
|
||||
new CoreController(objects::CORE_CONTROLLER);
|
||||
new CoreController(objects::CORE_CONTROLLER, I2C_FATAL_ERRORS);
|
||||
|
||||
// Regular FM code, does not work for EM if the hardware is not connected
|
||||
// createPcduComponents(gpioComIF, &pwrSwitcher);
|
||||
|
@ -38,7 +38,7 @@ void ObjectFactory::produce(void* args) {
|
||||
q7s::gpioCallbacks::initSpiCsDecoder(gpioComIF);
|
||||
gpioCallbacks::disableAllDecoder(gpioComIF);
|
||||
|
||||
new CoreController(objects::CORE_CONTROLLER);
|
||||
new CoreController(objects::CORE_CONTROLLER, I2C_FATAL_ERRORS);
|
||||
createPcduComponents(gpioComIF, &pwrSwitcher);
|
||||
auto* stackHandler = new Stack5VHandler(*pwrSwitcher);
|
||||
|
||||
|
@ -102,6 +102,7 @@ enum gpioId_t {
|
||||
VC2_PAPB_BUSY,
|
||||
VC3_PAPB_EMPTY,
|
||||
VC3_PAPB_BUSY,
|
||||
PTME_RESETN,
|
||||
|
||||
PDEC_RESET,
|
||||
|
||||
|
@ -259,6 +259,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
14006;0x36b6;CURRENT_IMAGE_INFO;INFO;P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
||||
14007;0x36b7;REBOOT_COUNTER;INFO;Total reboot counter, which is the sum of the boot count of all individual images.;bsp_q7s/core/CoreController.h
|
||||
14008;0x36b8;INDIVIDUAL_BOOT_COUNTS;INFO;Get the boot count of the individual images. P1: First 16 bits boot count of image 0 0, last 16 bits boot count of image 0 1. P2: First 16 bits boot count of image 1 0, last 16 bits boot count of image 1 1.;bsp_q7s/core/CoreController.h
|
||||
14010;0x36ba;I2C_UNAVAILABLE_REBOOT;MEDIUM;No description;bsp_q7s/core/CoreController.h
|
||||
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/ThermalController.h
|
||||
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/ThermalController.h
|
||||
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||
|
|
@ -190,8 +190,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x2207;TMF_AllDeleted;No description;7;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2208;TMF_InvalidData;No description;8;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2209;TMF_NotReady;No description;9;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2401;MT_TooDetailedRequest;No description;1;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x2402;MT_TooGeneralRequest;No description;2;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x2401;MT_NoPacketFound;No description;1;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x2402;MT_PossiblePacketLoss;No description;2;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x2403;MT_NoMatch;No description;3;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x2404;MT_Full;No description;4;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x2405;MT_NewNodeCreated;No description;5;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
@ -370,8 +370,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x3e03;HKM_PeriodicHelperInvalid;No description;3;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3e04;HKM_PoolobjectNotFound;No description;4;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3e05;HKM_DatasetNotFound;No description;5;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3f01;DLEE_NoPacketFound;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x3f02;DLEE_PossiblePacketLoss;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x3f01;DLEE_StreamTooShort;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
|
||||
0x3f02;DLEE_DecodingError;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
|
||||
0x4201;PUS11_InvalidTypeTimeWindow;No description;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
0x4202;PUS11_InvalidTimeWindow;No description;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
0x4203;PUS11_TimeshiftingNotPossible;No description;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
@ -401,9 +401,9 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x4403;UXOS_CommandError;Command execution failed;3;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||
0x4404;UXOS_NoCommandLoadedOrPending;;4;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||
0x4406;UXOS_PcloseCallError;No description;6;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||
0x4500;HSPI_OpeningFileFailed;No description;0;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||
0x4501;HSPI_FullDuplexTransferFailed;No description;1;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||
0x4502;HSPI_HalfDuplexTransferFailed;No description;2;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||
0x4500;HSPI_HalTimeoutRetval;No description;0;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
||||
0x4501;HSPI_HalBusyRetval;No description;1;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
||||
0x4502;HSPI_HalErrorRetval;No description;2;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
||||
0x4601;HURT_UartReadFailure;No description;1;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||
0x4602;HURT_UartReadSizeMissmatch;No description;2;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||
0x4603;HURT_UartRxBufferTooSmall;No description;3;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||
@ -456,14 +456,19 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x5d03;GOMS_InvalidParamSize;No description;3;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x5d04;GOMS_InvalidPayloadSize;No description;4;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x5d05;GOMS_UnknownReplyId;No description;5;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x5da0;GOMS_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x5da1;GOMS_InvalidRampTime;Action Message with invalid ramp time was received.;161;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x5da2;GOMS_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x5da3;GOMS_ExecutionFailed;Command execution failed;163;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x5da4;GOMS_CrcError;Reaction wheel reply has invalid crc;164;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x5da5;GOMS_ValueNotRead;No description;165;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x60a0;CCSDS_CommandNotImplemented;Received action message with unknown action id;160;CCSDS_HANDLER;mission/tmtc/CcsdsIpCoreHandler.h
|
||||
0x63a0;NVMB_KeyNotExists;Specified key does not exist in json file;160;NVM_PARAM_BASE;mission/memory/NvmParameterBase.h
|
||||
0x66a0;SADPL_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a1;SADPL_InvalidRampTime;Action Message with invalid ramp time was received.;161;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a2;SADPL_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a3;SADPL_ExecutionFailed;Command execution failed;163;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a4;SADPL_CrcError;Reaction wheel reply has invalid crc;164;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a5;SADPL_ValueNotRead;No description;165;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a0;SADPL_CommandNotSupported;No description;160;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a1;SADPL_DeploymentAlreadyExecuting;No description;161;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a2;SADPL_MainSwitchTimeoutFailure;No description;162;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a3;SADPL_SwitchingDeplSa1Failed;No description;163;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a4;SADPL_SwitchingDeplSa2Failed;No description;164;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x6900;ACSCTRL_FileDeletionFailed;No description;0;ACS_CTRL;mission/controller/AcsController.h
|
||||
0x6a02;ACSMEKF_MekfUninitialized;No description;2;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
0x6a03;ACSMEKF_MekfNoGyrData;No description;3;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h
|
||||
|
|
@ -259,6 +259,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
||||
14006;0x36b6;CURRENT_IMAGE_INFO;INFO;P1: Current Chip, P2: Current Copy;bsp_q7s/core/CoreController.h
|
||||
14007;0x36b7;REBOOT_COUNTER;INFO;Total reboot counter, which is the sum of the boot count of all individual images.;bsp_q7s/core/CoreController.h
|
||||
14008;0x36b8;INDIVIDUAL_BOOT_COUNTS;INFO;Get the boot count of the individual images. P1: First 16 bits boot count of image 0 0, last 16 bits boot count of image 0 1. P2: First 16 bits boot count of image 1 0, last 16 bits boot count of image 1 1.;bsp_q7s/core/CoreController.h
|
||||
14010;0x36ba;I2C_UNAVAILABLE_REBOOT;MEDIUM;No description;bsp_q7s/core/CoreController.h
|
||||
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/ThermalController.h
|
||||
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/ThermalController.h
|
||||
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/ThermalController.h
|
||||
|
|
@ -190,8 +190,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x2207;TMF_AllDeleted;No description;7;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2208;TMF_InvalidData;No description;8;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2209;TMF_NotReady;No description;9;TM_STORE_FRONTEND_IF;fsfw/src/fsfw/tmstorage/TmStoreFrontendIF.h
|
||||
0x2401;MT_TooDetailedRequest;No description;1;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x2402;MT_TooGeneralRequest;No description;2;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x2401;MT_NoPacketFound;No description;1;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x2402;MT_PossiblePacketLoss;No description;2;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x2403;MT_NoMatch;No description;3;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x2404;MT_Full;No description;4;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
0x2405;MT_NewNodeCreated;No description;5;MATCH_TREE_CLASS;fsfw/src/fsfw/globalfunctions/matching/MatchTree.h
|
||||
@ -370,8 +370,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x3e03;HKM_PeriodicHelperInvalid;No description;3;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3e04;HKM_PoolobjectNotFound;No description;4;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3e05;HKM_DatasetNotFound;No description;5;HOUSEKEEPING_MANAGER;fsfw/src/fsfw/datapoollocal/LocalDataPoolManager.h
|
||||
0x3f01;DLEE_NoPacketFound;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x3f02;DLEE_PossiblePacketLoss;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleParser.h
|
||||
0x3f01;DLEE_StreamTooShort;No description;1;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
|
||||
0x3f02;DLEE_DecodingError;No description;2;DLE_ENCODER;fsfw/src/fsfw/globalfunctions/DleEncoder.h
|
||||
0x4201;PUS11_InvalidTypeTimeWindow;No description;1;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
0x4202;PUS11_InvalidTimeWindow;No description;2;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
0x4203;PUS11_TimeshiftingNotPossible;No description;3;PUS_SERVICE_11;fsfw/src/fsfw/pus/Service11TelecommandScheduling.h
|
||||
@ -401,9 +401,9 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x4403;UXOS_CommandError;Command execution failed;3;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||
0x4404;UXOS_NoCommandLoadedOrPending;;4;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||
0x4406;UXOS_PcloseCallError;No description;6;LINUX_OSAL;fsfw/src/fsfw_hal/linux/CommandExecutor.h
|
||||
0x4500;HSPI_OpeningFileFailed;No description;0;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||
0x4501;HSPI_FullDuplexTransferFailed;No description;1;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||
0x4502;HSPI_HalfDuplexTransferFailed;No description;2;HAL_SPI;fsfw/src/fsfw_hal/linux/spi/SpiComIF.h
|
||||
0x4500;HSPI_HalTimeoutRetval;No description;0;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
||||
0x4501;HSPI_HalBusyRetval;No description;1;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
||||
0x4502;HSPI_HalErrorRetval;No description;2;HAL_SPI;fsfw/src/fsfw_hal/stm32h7/spi/spiDefinitions.h
|
||||
0x4601;HURT_UartReadFailure;No description;1;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||
0x4602;HURT_UartReadSizeMissmatch;No description;2;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||
0x4603;HURT_UartRxBufferTooSmall;No description;3;HAL_UART;fsfw/src/fsfw_hal/linux/serial/SerialComIF.h
|
||||
@ -448,8 +448,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x52b5;RWHA_NoReply;Reaction wheel only responds with empty frames.;181;RW_HANDLER;mission/devices/devicedefinitions/rwHelpers.h
|
||||
0x52b6;RWHA_NoStartMarker;Expected a start marker as first byte;182;RW_HANDLER;mission/devices/devicedefinitions/rwHelpers.h
|
||||
0x52b7;RWHA_SpiReadTimeout;Timeout when reading reply;183;RW_HANDLER;mission/devices/devicedefinitions/rwHelpers.h
|
||||
0x5300;STRH_NoReplyAvailable;No description;0;STR_HANDLER;linux/devices/ImtqPollingTask.h
|
||||
0x5302;STRH_InvalidCrc;No description;2;STR_HANDLER;linux/devices/ScexHelper.h
|
||||
0x53a0;STRH_TemperatureReqFailed;Status in temperature reply signals error;160;STR_HANDLER;linux/devices/startracker/StarTrackerHandler.h
|
||||
0x53a1;STRH_PingFailed;Ping command failed;161;STR_HANDLER;linux/devices/startracker/StarTrackerHandler.h
|
||||
0x53a2;STRH_VersionReqFailed;Status in version reply signals error;162;STR_HANDLER;linux/devices/startracker/StarTrackerHandler.h
|
||||
@ -473,8 +471,10 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x53b4;STRH_CrcFailure;Received reply with invalid CRC;180;STR_HANDLER;linux/devices/startracker/StarTrackerHandler.h
|
||||
0x53b5;STRH_StrHelperExecuting;Star tracker handler currently executing a command and using the communication interface;181;STR_HANDLER;linux/devices/startracker/StarTrackerHandler.h
|
||||
0x53b6;STRH_StartrackerAlreadyBooted;Star tracker is already in firmware mode;182;STR_HANDLER;linux/devices/startracker/StarTrackerHandler.h
|
||||
0x53b7;STRH_StartrackerRunningFirmware;Star tracker is in firmware mode but must be in bootloader mode to execute this command;183;STR_HANDLER;linux/devices/startracker/StarTrackerHandler.h
|
||||
0x53b8;STRH_StartrackerRunningBootloader;Star tracker is in bootloader mode but must be in firmware mode to execute this command;184;STR_HANDLER;linux/devices/startracker/StarTrackerHandler.h
|
||||
0x53b7;STRH_StartrackerNotRunningFirmware;Star tracker must be in firmware mode to run this command;183;STR_HANDLER;linux/devices/startracker/StarTrackerHandler.h
|
||||
0x53b8;STRH_StartrackerNotRunningBootloader;Star tracker must be in bootloader mode to run this command;184;STR_HANDLER;linux/devices/startracker/StarTrackerHandler.h
|
||||
0x5400;DWLPWRON_NoReplyAvailable;No description;0;DWLPWRON_CMD;linux/devices/ImtqPollingTask.h
|
||||
0x5402;DWLPWRON_InvalidCrc;No description;2;DWLPWRON_CMD;linux/devices/ScexHelper.h
|
||||
0x54e0;DWLPWRON_InvalidMode;Received command has invalid JESD mode (valid modes are 0 - 5);224;DWLPWRON_CMD;linux/devices/devicedefinitions/PlocMPSoCDefinitions.h
|
||||
0x54e1;DWLPWRON_InvalidLaneRate;Received command has invalid lane rate (valid lane rate are 0 - 9);225;DWLPWRON_CMD;linux/devices/devicedefinitions/PlocMPSoCDefinitions.h
|
||||
0x5700;PLSPVhLP_RequestDone;No description;0;PLOC_SUPV_HELPER;linux/devices/ploc/PlocSupvUartMan.h
|
||||
@ -506,6 +506,12 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x5d03;GOMS_InvalidParamSize;No description;3;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x5d04;GOMS_InvalidPayloadSize;No description;4;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x5d05;GOMS_UnknownReplyId;No description;5;GOM_SPACE_HANDLER;mission/devices/GomspaceDeviceHandler.h
|
||||
0x5da0;GOMS_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x5da1;GOMS_InvalidRampTime;Action Message with invalid ramp time was received.;161;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x5da2;GOMS_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x5da3;GOMS_ExecutionFailed;Command execution failed;163;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x5da4;GOMS_CrcError;Reaction wheel reply has invalid crc;164;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x5da5;GOMS_ValueNotRead;No description;165;GOM_SPACE_HANDLER;mission/devices/RwHandler.h
|
||||
0x5ea0;PLMEMDUMP_MramAddressTooHigh;The capacity of the MRAM amounts to 512 kB. Thus the maximum address must not be higher than 0x7d000.;160;PLOC_MEMORY_DUMPER;linux/devices/ploc/PlocMemoryDumper.h
|
||||
0x5ea1;PLMEMDUMP_MramInvalidAddressCombination;The specified end address is lower than the start address;161;PLOC_MEMORY_DUMPER;linux/devices/ploc/PlocMemoryDumper.h
|
||||
0x5fa0;PDEC_AbandonedCltuRetval;No description;160;PDEC_HANDLER;linux/ipcore/PdecHandler.h
|
||||
@ -535,12 +541,11 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path
|
||||
0x64a0;FSHLP_SdNotMounted;SD card specified with path string not mounted;160;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
|
||||
0x64a1;FSHLP_FileNotExists;Specified file does not exist on filesystem;161;FILE_SYSTEM_HELPER;bsp_q7s/fs/FilesystemHelper.h
|
||||
0x65a0;PLMPHLP_FileClosedAccidentally;File accidentally close;160;PLOC_MPSOC_HELPER;linux/devices/ploc/PlocMPSoCHelper.h
|
||||
0x66a0;SADPL_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a1;SADPL_InvalidRampTime;Action Message with invalid ramp time was received.;161;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a2;SADPL_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a3;SADPL_ExecutionFailed;Command execution failed;163;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a4;SADPL_CrcError;Reaction wheel reply has invalid crc;164;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a5;SADPL_ValueNotRead;No description;165;SA_DEPL_HANDLER;mission/devices/RwHandler.h
|
||||
0x66a0;SADPL_CommandNotSupported;No description;160;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a1;SADPL_DeploymentAlreadyExecuting;No description;161;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a2;SADPL_MainSwitchTimeoutFailure;No description;162;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a3;SADPL_SwitchingDeplSa1Failed;No description;163;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x66a4;SADPL_SwitchingDeplSa2Failed;No description;164;SA_DEPL_HANDLER;mission/devices/SolarArrayDeploymentHandler.h
|
||||
0x67a0;MPSOCRTVIF_CrcFailure;Space Packet received from PLOC has invalid CRC;160;MPSOC_RETURN_VALUES_IF;linux/devices/devicedefinitions/MPSoCReturnValuesIF.h
|
||||
0x67a1;MPSOCRTVIF_ReceivedAckFailure;Received ACK failure reply from PLOC;161;MPSOC_RETURN_VALUES_IF;linux/devices/devicedefinitions/MPSoCReturnValuesIF.h
|
||||
0x67a2;MPSOCRTVIF_ReceivedExeFailure;Received execution failure reply from PLOC;162;MPSOC_RETURN_VALUES_IF;linux/devices/devicedefinitions/MPSoCReturnValuesIF.h
|
||||
|
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 278 translations.
|
||||
* @brief Auto-generated event translation file. Contains 279 translations.
|
||||
* @details
|
||||
* Generated on: 2023-03-21 12:45:57
|
||||
* Generated on: 2023-03-21 23:59:36
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
@ -260,6 +260,7 @@ const char *VERSION_INFO_STRING = "VERSION_INFO";
|
||||
const char *CURRENT_IMAGE_INFO_STRING = "CURRENT_IMAGE_INFO";
|
||||
const char *REBOOT_COUNTER_STRING = "REBOOT_COUNTER";
|
||||
const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS";
|
||||
const char *I2C_UNAVAILABLE_REBOOT_STRING = "I2C_UNAVAILABLE_REBOOT";
|
||||
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
||||
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
||||
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
||||
@ -791,6 +792,8 @@ const char *translateEvents(Event event) {
|
||||
return REBOOT_COUNTER_STRING;
|
||||
case (14008):
|
||||
return INDIVIDUAL_BOOT_COUNTS_STRING;
|
||||
case (14010):
|
||||
return I2C_UNAVAILABLE_REBOOT_STRING;
|
||||
case (14100):
|
||||
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
||||
case (14101):
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 173 translations.
|
||||
* Generated on: 2023-03-21 12:45:57
|
||||
* Generated on: 2023-03-21 23:59:36
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
|
@ -302,7 +302,10 @@ ReturnValue_t GpsHyperionLinuxController::handleGpsReadData() {
|
||||
// TIME is set for every message, no need for a counter
|
||||
bool timeValid = false;
|
||||
if (TIME_SET == (TIME_SET & gps.set)) {
|
||||
timeValid = true;
|
||||
// To prevent totally incorrect times from being declared valid.
|
||||
if (gpsSet.satInView.isValid() and gpsSet.satInView.value >= 1) {
|
||||
timeValid = true;
|
||||
}
|
||||
timeval time = {};
|
||||
#if LIBGPS_VERSION_MINOR <= 17
|
||||
gpsSet.unixSeconds.value = std::floor(gps.fix.time);
|
||||
|
@ -10,7 +10,8 @@
|
||||
|
||||
#include "fsfw/FSFW.h"
|
||||
|
||||
ImtqPollingTask::ImtqPollingTask(object_id_t imtqPollingTask) : SystemObject(imtqPollingTask) {
|
||||
ImtqPollingTask::ImtqPollingTask(object_id_t imtqPollingTask, std::atomic_uint16_t& i2cFatalErrors)
|
||||
: SystemObject(imtqPollingTask), i2cFatalErrors(i2cFatalErrors) {
|
||||
semaphore = SemaphoreFactory::instance()->createBinarySemaphore();
|
||||
semaphore->acquire();
|
||||
ipcLock = MutexFactory::instance()->createMutex();
|
||||
@ -427,12 +428,20 @@ ReturnValue_t ImtqPollingTask::performI2cFullRequest(uint8_t* reply, size_t repl
|
||||
if (ioctl(fd, I2C_SLAVE, i2cAddr) < 0) {
|
||||
sif::warning << "Opening IMTQ slave device failed with code " << errno << ": "
|
||||
<< strerror(errno) << std::endl;
|
||||
if (errno == EBUSY) {
|
||||
i2cFatalErrors++;
|
||||
}
|
||||
}
|
||||
|
||||
int written = write(fd, cmdBuf.data(), cmdLen);
|
||||
if (written < 0) {
|
||||
sif::error << "IMTQ: Failed to send with error code " << errno
|
||||
<< ". Error description: " << strerror(errno) << std::endl;
|
||||
// This is a weird issue which sometimes occurs on debug builds. All I2C buses are busy
|
||||
// for all writes,
|
||||
if (errno == EBUSY) {
|
||||
i2cFatalErrors++;
|
||||
}
|
||||
return returnvalue::FAILED;
|
||||
} else if (static_cast<size_t>(written) != cmdLen) {
|
||||
sif::error << "IMTQ: Could not write all bytes" << std::endl;
|
||||
|
@ -4,6 +4,8 @@
|
||||
#include <fsfw/tasks/SemaphoreIF.h>
|
||||
#include <fsfw_hal/linux/i2c/I2cCookie.h>
|
||||
|
||||
#include <atomic>
|
||||
|
||||
#include "fsfw/devicehandlers/DeviceCommunicationIF.h"
|
||||
#include "fsfw/objectmanager/SystemObject.h"
|
||||
#include "fsfw/tasks/ExecutableObjectIF.h"
|
||||
@ -13,7 +15,7 @@ class ImtqPollingTask : public SystemObject,
|
||||
public ExecutableObjectIF,
|
||||
public DeviceCommunicationIF {
|
||||
public:
|
||||
ImtqPollingTask(object_id_t imtqPollingTask);
|
||||
ImtqPollingTask(object_id_t imtqPollingTask, std::atomic_uint16_t& i2cFatalErrors);
|
||||
|
||||
ReturnValue_t performOperation(uint8_t operationCode) override;
|
||||
ReturnValue_t initialize() override;
|
||||
@ -28,6 +30,7 @@ class ImtqPollingTask : public SystemObject,
|
||||
ReturnValue_t comStatus = returnvalue::OK;
|
||||
MutexIF* ipcLock;
|
||||
MutexIF* bufLock;
|
||||
std::atomic_uint16_t& i2cFatalErrors;
|
||||
I2cCookie* i2cCookie = nullptr;
|
||||
const char* i2cDev = nullptr;
|
||||
address_t i2cAddr = 0;
|
||||
|
@ -49,7 +49,7 @@ uint8_t ArcsecDatalinkLayer::getReplyFrameType() { return decodedFrame[0]; }
|
||||
|
||||
const uint8_t* ArcsecDatalinkLayer::getReply() { return &decodedFrame[1]; }
|
||||
|
||||
void ArcsecDatalinkLayer::encodeFrame(const uint8_t* data, uint32_t length) {
|
||||
void ArcsecDatalinkLayer::encodeFrame(const uinah uint32_t length) {
|
||||
arc_transport_encode_body(data, length, encBuffer, &encFrameSize);
|
||||
}
|
||||
|
||||
|
@ -129,7 +129,7 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu
|
||||
break;
|
||||
}
|
||||
|
||||
if (strHelperExecuting == true) {
|
||||
if (strHelperHandlingSpecialRequest == true) {
|
||||
return STR_HELPER_EXECUTING;
|
||||
}
|
||||
|
||||
@ -157,7 +157,7 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
strHelperExecuting = true;
|
||||
strHelperHandlingSpecialRequest = true;
|
||||
return EXECUTION_FINISHED;
|
||||
}
|
||||
case (startracker::DOWNLOAD_IMAGE): {
|
||||
@ -173,7 +173,7 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
strHelperExecuting = true;
|
||||
strHelperHandlingSpecialRequest = true;
|
||||
return EXECUTION_FINISHED;
|
||||
}
|
||||
case (startracker::FLASH_READ): {
|
||||
@ -185,7 +185,7 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
strHelperExecuting = true;
|
||||
strHelperHandlingSpecialRequest = true;
|
||||
return EXECUTION_FINISHED;
|
||||
}
|
||||
case (startracker::CHANGE_IMAGE_DOWNLOAD_FILE): {
|
||||
@ -215,7 +215,7 @@ ReturnValue_t StarTrackerHandler::executeAction(ActionId_t actionId, MessageQueu
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
strHelperExecuting = true;
|
||||
strHelperHandlingSpecialRequest = true;
|
||||
return EXECUTION_FINISHED;
|
||||
}
|
||||
default:
|
||||
@ -283,6 +283,9 @@ void StarTrackerHandler::doShutDown() {
|
||||
}
|
||||
|
||||
ReturnValue_t StarTrackerHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
|
||||
if (strHelperHandlingSpecialRequest) {
|
||||
return NOTHING_TO_SEND;
|
||||
}
|
||||
switch (normalState) {
|
||||
case NormalState::TEMPERATURE_REQUEST:
|
||||
*id = startracker::REQ_TEMPERATURE;
|
||||
@ -1296,7 +1299,7 @@ size_t StarTrackerHandler::getNextReplyLength(DeviceCommandId_t commandId) {
|
||||
|
||||
ReturnValue_t StarTrackerHandler::doSendReadHook() {
|
||||
// Prevent DHB from polling UART during commands executed by the image loader task
|
||||
if (strHelperExecuting) {
|
||||
if (strHelperHandlingSpecialRequest) {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
@ -1538,7 +1541,7 @@ void StarTrackerHandler::handleEvent(EventMessage* eventMessage) {
|
||||
case objects::STR_HELPER: {
|
||||
// All events from image loader signal either that the operation was successful or that it
|
||||
// failed
|
||||
strHelperExecuting = false;
|
||||
strHelperHandlingSpecialRequest = false;
|
||||
break;
|
||||
}
|
||||
default:
|
||||
@ -2147,14 +2150,14 @@ ReturnValue_t StarTrackerHandler::checkCommand(ActionId_t actionId) {
|
||||
case startracker::REQ_SUBSCRIPTION:
|
||||
case startracker::REQ_LOG_SUBSCRIPTION:
|
||||
case startracker::REQ_DEBUG_CAMERA:
|
||||
if (not(getMode() == MODE_ON && getSubmode() == startracker::Program::FIRMWARE)) {
|
||||
return STARTRACKER_RUNNING_BOOTLOADER;
|
||||
if (getMode() == MODE_ON and getSubmode() != startracker::Program::FIRMWARE) {
|
||||
return STARTRACKER_NOT_RUNNING_FIRMWARE;
|
||||
}
|
||||
break;
|
||||
case startracker::FIRMWARE_UPDATE:
|
||||
case startracker::FLASH_READ:
|
||||
if (not(getMode() == MODE_ON && getSubmode() == startracker::Program::BOOTLOADER)) {
|
||||
return STARTRACKER_RUNNING_FIRMWARE;
|
||||
if (getMode() != MODE_ON or getSubmode() != startracker::Program::BOOTLOADER) {
|
||||
return STARTRACKER_NOT_RUNNING_BOOTLOADER;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
|
@ -132,12 +132,10 @@ class StarTrackerHandler : public DeviceHandlerBase {
|
||||
static const ReturnValue_t STR_HELPER_EXECUTING = MAKE_RETURN_CODE(0xB5);
|
||||
//! [EXPORT] : [COMMENT] Star tracker is already in firmware mode
|
||||
static const ReturnValue_t STARTRACKER_ALREADY_BOOTED = MAKE_RETURN_CODE(0xB6);
|
||||
//! [EXPORT] : [COMMENT] Star tracker is in firmware mode but must be in bootloader mode to
|
||||
//! execute this command
|
||||
static const ReturnValue_t STARTRACKER_RUNNING_FIRMWARE = MAKE_RETURN_CODE(0xB7);
|
||||
//! [EXPORT] : [COMMENT] Star tracker is in bootloader mode but must be in firmware mode to
|
||||
//! execute this command
|
||||
static const ReturnValue_t STARTRACKER_RUNNING_BOOTLOADER = MAKE_RETURN_CODE(0xB8);
|
||||
//! [EXPORT] : [COMMENT] Star tracker must be in firmware mode to run this command
|
||||
static const ReturnValue_t STARTRACKER_NOT_RUNNING_FIRMWARE = MAKE_RETURN_CODE(0xB7);
|
||||
//! [EXPORT] : [COMMENT] Star tracker must be in bootloader mode to run this command
|
||||
static const ReturnValue_t STARTRACKER_NOT_RUNNING_BOOTLOADER = MAKE_RETURN_CODE(0xB8);
|
||||
|
||||
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::STR_HANDLER;
|
||||
|
||||
@ -291,7 +289,7 @@ class StarTrackerHandler : public DeviceHandlerBase {
|
||||
|
||||
InternalState internalState = InternalState::IDLE;
|
||||
|
||||
bool strHelperExecuting = false;
|
||||
bool strHelperHandlingSpecialRequest = false;
|
||||
|
||||
const power::Switch_t powerSwitch = power::NO_SWITCH;
|
||||
|
||||
|
@ -263,6 +263,10 @@ ReturnValue_t StrHelper::performImageUpload() {
|
||||
return returnvalue::FAILED;
|
||||
}
|
||||
std::ifstream file(uploadImage.uploadFile, std::ifstream::binary);
|
||||
if (file.bad()) {
|
||||
return HasFileSystemIF::GENERIC_FILE_ERROR;
|
||||
}
|
||||
|
||||
// Set position of next character to end of file input stream
|
||||
file.seekg(0, file.end);
|
||||
// tellg returns position of character in input stream
|
||||
|
@ -1,7 +1,7 @@
|
||||
/**
|
||||
* @brief Auto-generated event translation file. Contains 278 translations.
|
||||
* @brief Auto-generated event translation file. Contains 279 translations.
|
||||
* @details
|
||||
* Generated on: 2023-03-21 12:45:57
|
||||
* Generated on: 2023-03-21 23:59:36
|
||||
*/
|
||||
#include "translateEvents.h"
|
||||
|
||||
@ -260,6 +260,7 @@ const char *VERSION_INFO_STRING = "VERSION_INFO";
|
||||
const char *CURRENT_IMAGE_INFO_STRING = "CURRENT_IMAGE_INFO";
|
||||
const char *REBOOT_COUNTER_STRING = "REBOOT_COUNTER";
|
||||
const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS";
|
||||
const char *I2C_UNAVAILABLE_REBOOT_STRING = "I2C_UNAVAILABLE_REBOOT";
|
||||
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
||||
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
||||
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
||||
@ -791,6 +792,8 @@ const char *translateEvents(Event event) {
|
||||
return REBOOT_COUNTER_STRING;
|
||||
case (14008):
|
||||
return INDIVIDUAL_BOOT_COUNTS_STRING;
|
||||
case (14010):
|
||||
return I2C_UNAVAILABLE_REBOOT_STRING;
|
||||
case (14100):
|
||||
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
||||
case (14101):
|
||||
|
@ -2,7 +2,7 @@
|
||||
* @brief Auto-generated object translation file.
|
||||
* @details
|
||||
* Contains 173 translations.
|
||||
* Generated on: 2023-03-21 12:45:57
|
||||
* Generated on: 2023-03-21 23:59:36
|
||||
*/
|
||||
#include "translateObjects.h"
|
||||
|
||||
|
@ -71,6 +71,22 @@ ReturnValue_t AxiPtmeConfig::disableTxclockInversion() {
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t AxiPtmeConfig::enableBatPriorityBit() {
|
||||
ReturnValue_t result = writeBit(COMMON_CONFIG_REG, true, BitPos::EN_BAT_PRIORITY);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t AxiPtmeConfig::disableBatPriorityBit() {
|
||||
ReturnValue_t result = writeBit(COMMON_CONFIG_REG, false, BitPos::EN_BAT_PRIORITY);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
|
||||
ReturnValue_t AxiPtmeConfig::writeReg(uint32_t regOffset, uint32_t writeVal) {
|
||||
ReturnValue_t result = returnvalue::OK;
|
||||
result = mutex->lockMutex(timeoutType, mutexTimeout);
|
||||
|
@ -54,6 +54,9 @@ class AxiPtmeConfig : public SystemObject {
|
||||
ReturnValue_t enableTxclockInversion();
|
||||
ReturnValue_t disableTxclockInversion();
|
||||
|
||||
ReturnValue_t enableBatPriorityBit();
|
||||
ReturnValue_t disableBatPriorityBit();
|
||||
|
||||
private:
|
||||
// Address of register storing the bitrate configuration parameter
|
||||
static const uint32_t CADU_BITRATE_REG = 0x0;
|
||||
@ -61,7 +64,7 @@ class AxiPtmeConfig : public SystemObject {
|
||||
static const uint32_t COMMON_CONFIG_REG = 0x4;
|
||||
static const uint32_t ADRESS_DIVIDER = 4;
|
||||
|
||||
enum class BitPos : uint32_t { EN_TX_CLK_MANIPULATOR, INVERT_CLOCK };
|
||||
enum class BitPos : uint32_t { EN_TX_CLK_MANIPULATOR = 0, INVERT_CLOCK = 1, EN_BAT_PRIORITY = 2 };
|
||||
|
||||
std::string axiUio;
|
||||
std::string uioMap;
|
||||
|
@ -48,3 +48,11 @@ ReturnValue_t PtmeConfig::configTxManipulator(bool enable) {
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
ReturnValue_t PtmeConfig::enableBatPriorityBit(bool enable) {
|
||||
if (enable) {
|
||||
return axiPtmeConfig->enableBatPriorityBit();
|
||||
} else {
|
||||
return axiPtmeConfig->disableBatPriorityBit();
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,8 @@
|
||||
#ifndef LINUX_OBC_PTMECONFIG_H_
|
||||
#define LINUX_OBC_PTMECONFIG_H_
|
||||
|
||||
#include <fsfw_hal/common/gpio/gpioDefinitions.h>
|
||||
|
||||
#include "AxiPtmeConfig.h"
|
||||
#include "fsfw/objectmanager/SystemObject.h"
|
||||
#include "fsfw/returnvalues/returnvalue.h"
|
||||
@ -53,6 +55,15 @@ class PtmeConfig : public SystemObject {
|
||||
*/
|
||||
ReturnValue_t configTxManipulator(bool enable);
|
||||
|
||||
/**
|
||||
* Enable the bat priority bit in the PTME wrapper component.
|
||||
* Please note that a reset of the PTME is still required as specified in the documentation.
|
||||
* This is done by a higher level component.
|
||||
* @param enable
|
||||
* @return
|
||||
*/
|
||||
ReturnValue_t enableBatPriorityBit(bool enable);
|
||||
|
||||
private:
|
||||
static const uint8_t INTERFACE_ID = CLASS_ID::RATE_SETTER;
|
||||
|
||||
|
@ -186,7 +186,7 @@ void AcsController::performSafe() {
|
||||
safeCtrlFailureFlag = true;
|
||||
}
|
||||
safeCtrlFailureCounter++;
|
||||
if (safeCtrlFailureCounter > 50) {
|
||||
if (safeCtrlFailureCounter > 150) {
|
||||
safeCtrlFailureFlag = false;
|
||||
safeCtrlFailureCounter = 0;
|
||||
}
|
||||
|
@ -14,7 +14,7 @@
|
||||
|
||||
CcsdsIpCoreHandler::CcsdsIpCoreHandler(object_id_t objectId, object_id_t tcDestination,
|
||||
PtmeConfig& ptmeConfig, std::atomic_bool& linkState,
|
||||
GpioIF* gpioIF, gpioId_t enTxClock, gpioId_t enTxData)
|
||||
GpioIF* gpioIF, PtmeGpios gpioIds)
|
||||
: SystemObject(objectId),
|
||||
linkState(linkState),
|
||||
tcDestination(tcDestination),
|
||||
@ -22,9 +22,8 @@ CcsdsIpCoreHandler::CcsdsIpCoreHandler(object_id_t objectId, object_id_t tcDesti
|
||||
actionHelper(this, nullptr),
|
||||
modeHelper(this),
|
||||
ptmeConfig(ptmeConfig),
|
||||
gpioIF(gpioIF),
|
||||
enTxClock(enTxClock),
|
||||
enTxData(enTxData) {
|
||||
ptmeGpios(gpioIds),
|
||||
gpioIF(gpioIF) {
|
||||
commandQueue = QueueFactory::instance()->createMessageQueue(QUEUE_SIZE);
|
||||
auto mqArgs = MqArgs(objectId, static_cast<void*>(this));
|
||||
eventQueue =
|
||||
@ -71,6 +70,12 @@ ReturnValue_t CcsdsIpCoreHandler::initialize() {
|
||||
return ObjectManagerIF::CHILD_INIT_FAILED;
|
||||
}
|
||||
|
||||
if (batPriorityParam == 0) {
|
||||
disablePrioritySelectMode();
|
||||
} else {
|
||||
enablePrioritySelectMode();
|
||||
}
|
||||
|
||||
#if OBSW_SYRLINKS_SIMULATED == 1
|
||||
// Update data on rising edge
|
||||
ptmeConfig.invertTxClock(false);
|
||||
@ -111,7 +116,24 @@ ReturnValue_t CcsdsIpCoreHandler::getParameter(uint8_t domainId, uint8_t uniqueI
|
||||
ParameterWrapper* parameterWrapper,
|
||||
const ParameterWrapper* newValues,
|
||||
uint16_t startAtIndex) {
|
||||
return returnvalue::OK;
|
||||
if ((domainId == 0) and (uniqueIdentifier == ParamId::BAT_PRIORITY)) {
|
||||
uint8_t newVal = 0;
|
||||
ReturnValue_t result = newValues->getElement(&newVal);
|
||||
if (result != returnvalue::OK) {
|
||||
return result;
|
||||
}
|
||||
if (newVal > 1) {
|
||||
return HasParametersIF::INVALID_VALUE;
|
||||
}
|
||||
parameterWrapper->set(batPriorityParam);
|
||||
if (mode == MODE_ON) {
|
||||
updateBatPriorityOnTxOff = true;
|
||||
} else if (mode == MODE_OFF) {
|
||||
updateBatPriorityFromParam();
|
||||
}
|
||||
return returnvalue::OK;
|
||||
}
|
||||
return HasParametersIF::INVALID_IDENTIFIER_ID;
|
||||
}
|
||||
|
||||
uint32_t CcsdsIpCoreHandler::getIdentifier() const { return 0; }
|
||||
@ -184,8 +206,8 @@ void CcsdsIpCoreHandler::updateLinkState() { linkState = LINK_UP; }
|
||||
|
||||
void CcsdsIpCoreHandler::enableTransmit() {
|
||||
#ifndef TE0720_1CFA
|
||||
gpioIF->pullHigh(enTxClock);
|
||||
gpioIF->pullHigh(enTxData);
|
||||
gpioIF->pullHigh(ptmeGpios.enableTxClock);
|
||||
gpioIF->pullHigh(ptmeGpios.enableTxData);
|
||||
#endif
|
||||
linkState = LINK_UP;
|
||||
}
|
||||
@ -211,14 +233,8 @@ ReturnValue_t CcsdsIpCoreHandler::checkModeCommand(Mode_t mode, Submode_t submod
|
||||
}
|
||||
|
||||
void CcsdsIpCoreHandler::startTransition(Mode_t mode, Submode_t submode) {
|
||||
auto rateHigh = [&]() {
|
||||
ReturnValue_t result = ptmeConfig.setRate(RATE_500KBPS);
|
||||
if (result == returnvalue::OK) {
|
||||
this->mode = HasModesIF::MODE_ON;
|
||||
}
|
||||
};
|
||||
auto rateLow = [&]() {
|
||||
ReturnValue_t result = ptmeConfig.setRate(RATE_100KBPS);
|
||||
auto rateSet = [&](uint32_t rate) {
|
||||
ReturnValue_t result = ptmeConfig.setRate(rate);
|
||||
if (result == returnvalue::OK) {
|
||||
this->mode = HasModesIF::MODE_ON;
|
||||
}
|
||||
@ -228,14 +244,14 @@ void CcsdsIpCoreHandler::startTransition(Mode_t mode, Submode_t submode) {
|
||||
if (submode == static_cast<Submode_t>(com::CcsdsSubmode::DATARATE_DEFAULT)) {
|
||||
com::Datarate currentDatarate = com::getCurrentDatarate();
|
||||
if (currentDatarate == com::Datarate::LOW_RATE_MODULATION_BPSK) {
|
||||
rateLow();
|
||||
rateSet(RATE_100KBPS);
|
||||
} else if (currentDatarate == com::Datarate::HIGH_RATE_MODULATION_0QPSK) {
|
||||
rateHigh();
|
||||
rateSet(RATE_500KBPS);
|
||||
}
|
||||
} else if (submode == static_cast<Submode_t>(com::CcsdsSubmode::DATARATE_HIGH)) {
|
||||
rateHigh();
|
||||
rateSet(RATE_500KBPS);
|
||||
} else if (submode == static_cast<Submode_t>(com::CcsdsSubmode::DATARATE_LOW)) {
|
||||
rateLow();
|
||||
rateSet(RATE_100KBPS);
|
||||
}
|
||||
|
||||
} else if (mode == HasModesIF::MODE_OFF) {
|
||||
@ -250,11 +266,16 @@ void CcsdsIpCoreHandler::startTransition(Mode_t mode, Submode_t submode) {
|
||||
void CcsdsIpCoreHandler::announceMode(bool recursive) { triggerEvent(MODE_INFO, mode, submode); }
|
||||
|
||||
void CcsdsIpCoreHandler::disableTransmit() {
|
||||
ptmeConfig.enableBatPriorityBit(false);
|
||||
#ifndef TE0720_1CFA
|
||||
gpioIF->pullLow(enTxClock);
|
||||
gpioIF->pullLow(enTxData);
|
||||
gpioIF->pullLow(ptmeGpios.enableTxClock);
|
||||
gpioIF->pullLow(ptmeGpios.enableTxData);
|
||||
#endif
|
||||
linkState = LINK_DOWN;
|
||||
if (updateBatPriorityOnTxOff) {
|
||||
updateBatPriorityFromParam();
|
||||
updateBatPriorityOnTxOff = false;
|
||||
}
|
||||
}
|
||||
|
||||
const char* CcsdsIpCoreHandler::getName() const { return "CCSDS Handler"; }
|
||||
@ -270,3 +291,25 @@ ReturnValue_t CcsdsIpCoreHandler::connectModeTreeParent(HasModeTreeChildrenIF& p
|
||||
ModeTreeChildIF& CcsdsIpCoreHandler::getModeTreeChildIF() { return *this; }
|
||||
|
||||
object_id_t CcsdsIpCoreHandler::getObjectId() const { return SystemObject::getObjectId(); }
|
||||
|
||||
void CcsdsIpCoreHandler::enablePrioritySelectMode() {
|
||||
ptmeConfig.enableBatPriorityBit(true);
|
||||
// Reset the PTME
|
||||
gpioIF->pullLow(ptmeGpios.ptmeResetn);
|
||||
gpioIF->pullHigh(ptmeGpios.ptmeResetn);
|
||||
}
|
||||
|
||||
void CcsdsIpCoreHandler::disablePrioritySelectMode() {
|
||||
ptmeConfig.enableBatPriorityBit(false);
|
||||
// Reset the PTME
|
||||
gpioIF->pullLow(ptmeGpios.ptmeResetn);
|
||||
gpioIF->pullHigh(ptmeGpios.ptmeResetn);
|
||||
}
|
||||
|
||||
void CcsdsIpCoreHandler::updateBatPriorityFromParam() {
|
||||
if (batPriorityParam == 0) {
|
||||
disablePrioritySelectMode();
|
||||
} else {
|
||||
enablePrioritySelectMode();
|
||||
}
|
||||
}
|
||||
|
@ -25,12 +25,25 @@
|
||||
#include "linux/ipcore/PtmeConfig.h"
|
||||
#include "mission/comDefs.h"
|
||||
|
||||
struct PtmeGpios {
|
||||
gpioId_t enableTxClock = gpio::NO_GPIO;
|
||||
gpioId_t enableTxData = gpio::NO_GPIO;
|
||||
gpioId_t ptmeResetn = gpio::NO_GPIO;
|
||||
};
|
||||
|
||||
/**
|
||||
* @brief This class handles the data exchange with the CCSDS IP cores implemented in the
|
||||
* programmable logic of the Q7S.
|
||||
*
|
||||
* @details After reboot default CADU bitrate is always set to 100 kbps (results in downlink rate
|
||||
* of 200 kbps due to convolutional code added by syrlinks transceiver)
|
||||
* @details
|
||||
* After reboot default CADU bitrate is always set to 100 kbps (results in downlink rate
|
||||
* of 200 kbps due to convolutional code added by syrlinks transceiver). The IP core handler exposes
|
||||
* a parameter to enable the priority selection mode for the PTME core.
|
||||
*
|
||||
* If the transmitter is on, the selection mode will be enabled when the transmitter goes off.
|
||||
* If the transmitter is off, the update of the PTME will be done immediately on a parameter update.
|
||||
* This is done because changing this parameter requires a reset of the PTME core to avoid bugs
|
||||
* while the transmitter is enabled.
|
||||
*
|
||||
* @author J. Meier
|
||||
*/
|
||||
@ -39,11 +52,12 @@ class CcsdsIpCoreHandler : public SystemObject,
|
||||
public ModeTreeChildIF,
|
||||
public ModeTreeConnectionIF,
|
||||
public HasModesIF,
|
||||
// public AcceptsTelemetryIF,
|
||||
public AcceptsTelecommandsIF,
|
||||
public ReceivesParameterMessagesIF,
|
||||
public HasActionsIF {
|
||||
public:
|
||||
enum ParamId : uint8_t { BAT_PRIORITY = 0 };
|
||||
|
||||
static const bool LINK_UP = true;
|
||||
static const bool LINK_DOWN = false;
|
||||
using VcId_t = uint8_t;
|
||||
@ -61,8 +75,7 @@ class CcsdsIpCoreHandler : public SystemObject,
|
||||
* @param enTxData GPIO ID of RS485 tx data enable
|
||||
*/
|
||||
CcsdsIpCoreHandler(object_id_t objectId, object_id_t tcDestination, PtmeConfig& ptmeConfig,
|
||||
std::atomic_bool& linkState, GpioIF* gpioIF, gpioId_t enTxClock,
|
||||
gpioId_t enTxData);
|
||||
std::atomic_bool& linkState, GpioIF* gpioIF, PtmeGpios gpioIds);
|
||||
|
||||
~CcsdsIpCoreHandler();
|
||||
|
||||
@ -138,15 +151,14 @@ class CcsdsIpCoreHandler : public SystemObject,
|
||||
MessageQueueId_t tcDistributorQueueId = MessageQueueIF::NO_QUEUE;
|
||||
|
||||
PtmeConfig& ptmeConfig;
|
||||
PtmeGpios ptmeGpios;
|
||||
// BAT priority bit on by default to enable priority selection mode for the PTME.
|
||||
uint8_t batPriorityParam = 1;
|
||||
bool updateBatPriorityOnTxOff = false;
|
||||
|
||||
GpioIF* gpioIF = nullptr;
|
||||
// GPIO to enable RS485 transceiver for TX clock
|
||||
gpioId_t enTxClock = gpio::NO_GPIO;
|
||||
// GPIO to enable RS485 transceiver for TX data signal
|
||||
gpioId_t enTxData = gpio::NO_GPIO;
|
||||
|
||||
void readCommandQueue(void);
|
||||
void handleTelemetry();
|
||||
|
||||
/**
|
||||
* @brief Forward link state to virtual channels.
|
||||
@ -163,6 +175,16 @@ class CcsdsIpCoreHandler : public SystemObject,
|
||||
* RS485 transceiver chips to high.
|
||||
*/
|
||||
void disableTransmit();
|
||||
|
||||
/**
|
||||
* The following set of functions configure the mode of the PTME bandwith allocation table (BAT)
|
||||
* module. This consists of the following 2 steps:
|
||||
* 1. Update the BAT priority bit in the PTME wrapper
|
||||
* 2. Reset the PTME as specified in the datasheet.
|
||||
*/
|
||||
void enablePrioritySelectMode();
|
||||
void disablePrioritySelectMode();
|
||||
void updateBatPriorityFromParam();
|
||||
};
|
||||
|
||||
#endif /* CCSDSHANDLER_H_ */
|
||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
||||
Subproject commit b32a9273ae4186a440685ffde7618f017cfdb268
|
||||
Subproject commit c171654d2b18547249ee03ace3a4016e8837cf4a
|
Loading…
Reference in New Issue
Block a user