Merge remote-tracking branch 'origin/develop' into thermal_controller
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2023-03-21 23:44:25 +01:00
23 changed files with 247 additions and 81 deletions

View File

@ -1,7 +1,7 @@
/**
* @brief Auto-generated event translation file. Contains 277 translations.
* @brief Auto-generated event translation file. Contains 278 translations.
* @details
* Generated on: 2023-03-21 14:18:44
* Generated on: 2023-03-21 23:43:05
*/
#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";
@ -790,6 +791,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):

View File

@ -2,7 +2,7 @@
* @brief Auto-generated object translation file.
* @details
* Contains 173 translations.
* Generated on: 2023-03-21 14:18:44
* Generated on: 2023-03-21 23:43:05
*/
#include "translateObjects.h"

View File

@ -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);

View File

@ -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;

View File

@ -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();
}
}

View File

@ -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;