Merge branch 'v4.0.0-dev' into sus-converter-h-fix
Some checks are pending
EIVE/eive-obsw/pipeline/pr-v4.0.0-dev Build started...
Some checks are pending
EIVE/eive-obsw/pipeline/pr-v4.0.0-dev Build started...
This commit is contained in:
commit
f40348904c
15
CHANGELOG.md
15
CHANGELOG.md
@ -18,10 +18,24 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
|
|
||||||
# [v4.0.0] to be released
|
# [v4.0.0] to be released
|
||||||
|
|
||||||
|
- `eive-tmtc` version v4.0.0
|
||||||
|
- `q7s-package` version v3.0.0
|
||||||
|
|
||||||
## Fixed
|
## Fixed
|
||||||
|
|
||||||
|
- Important bugfixes for PTME. See `q7s-package` CHANGELOG.
|
||||||
- Fixed H parameter in SUS converter from 1 mm to 2.5 mm.
|
- Fixed H parameter in SUS converter from 1 mm to 2.5 mm.
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- Removed PTME busy/ready signals. Those were not used anyway because register reads are used now.
|
||||||
|
- APB bus access busy checking is not done anymore as this is performed by the bus itself now.
|
||||||
|
|
||||||
|
## Added
|
||||||
|
|
||||||
|
- Added PL I2C reset pin. It is not used for now but could be used for FDIR procedures to restore
|
||||||
|
the PL I2C.
|
||||||
|
|
||||||
# [v3.3.0] 2023-06-21
|
# [v3.3.0] 2023-06-21
|
||||||
|
|
||||||
Like v3.2.0 but without the custom FM changes related to VC0.
|
Like v3.2.0 but without the custom FM changes related to VC0.
|
||||||
@ -160,6 +174,7 @@ Like v3.2.0 but without the custom FM changes related to VC0.
|
|||||||
|
|
||||||
# [v2.0.5] 2023-05-11
|
# [v2.0.5] 2023-05-11
|
||||||
|
|
||||||
|
|
||||||
- The dual lane assembly transition failed handler started new transitions towards the current mode
|
- The dual lane assembly transition failed handler started new transitions towards the current mode
|
||||||
instead of the target mode. This means that if the dual lane assembly never reached the initial
|
instead of the target mode. This means that if the dual lane assembly never reached the initial
|
||||||
submode (e.g. mode normal and submode dual side), it will transition back to the current mode,
|
submode (e.g. mode normal and submode dual side), it will transition back to the current mode,
|
||||||
|
@ -9,8 +9,8 @@
|
|||||||
# ##############################################################################
|
# ##############################################################################
|
||||||
cmake_minimum_required(VERSION 3.13)
|
cmake_minimum_required(VERSION 3.13)
|
||||||
|
|
||||||
set(OBSW_VERSION_MAJOR 3)
|
set(OBSW_VERSION_MAJOR 4)
|
||||||
set(OBSW_VERSION_MINOR 3)
|
set(OBSW_VERSION_MINOR 0)
|
||||||
set(OBSW_VERSION_REVISION 0)
|
set(OBSW_VERSION_REVISION 0)
|
||||||
|
|
||||||
# set(CMAKE_VERBOSE TRUE)
|
# set(CMAKE_VERBOSE TRUE)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 295 translations.
|
* @brief Auto-generated event translation file. Contains 296 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2023-05-17 17:15:34
|
* Generated on: 2023-06-21 19:01:02
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -277,6 +277,7 @@ const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS";
|
|||||||
const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
|
const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
|
||||||
const char *I2C_REBOOT_STRING = "I2C_REBOOT";
|
const char *I2C_REBOOT_STRING = "I2C_REBOOT";
|
||||||
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
|
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
|
||||||
|
const char *FIRMWARE_INFO_STRING = "FIRMWARE_INFO";
|
||||||
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
||||||
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
||||||
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
||||||
@ -847,6 +848,8 @@ const char *translateEvents(Event event) {
|
|||||||
return I2C_REBOOT_STRING;
|
return I2C_REBOOT_STRING;
|
||||||
case (14012):
|
case (14012):
|
||||||
return PDEC_REBOOT_STRING;
|
return PDEC_REBOOT_STRING;
|
||||||
|
case (14013):
|
||||||
|
return FIRMWARE_INFO_STRING;
|
||||||
case (14100):
|
case (14100):
|
||||||
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
||||||
case (14101):
|
case (14101):
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 171 translations.
|
* Contains 171 translations.
|
||||||
* Generated on: 2023-05-17 17:15:34
|
* Generated on: 2023-06-21 19:01:02
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
|
@ -23,6 +23,7 @@ static constexpr char UART_SCEX_DEV[] = "/dev/scex";
|
|||||||
static constexpr char UIO_PDEC_REGISTERS[] = "/dev/uio_pdec_regs";
|
static constexpr char UIO_PDEC_REGISTERS[] = "/dev/uio_pdec_regs";
|
||||||
static constexpr char UIO_PTME[] = "/dev/uio_ptme";
|
static constexpr char UIO_PTME[] = "/dev/uio_ptme";
|
||||||
static constexpr char UIO_PDEC_CONFIG_MEMORY[] = "/dev/uio_pdec_cfg_mem";
|
static constexpr char UIO_PDEC_CONFIG_MEMORY[] = "/dev/uio_pdec_cfg_mem";
|
||||||
|
static constexpr char UIO_SYS_ROM[] = "/dev/uio_sys_rom";
|
||||||
static constexpr char UIO_PDEC_RAM[] = "/dev/uio_pdec_ram";
|
static constexpr char UIO_PDEC_RAM[] = "/dev/uio_pdec_ram";
|
||||||
static constexpr char UIO_PDEC_IRQ[] = "/dev/uio_pdec_irq";
|
static constexpr char UIO_PDEC_IRQ[] = "/dev/uio_pdec_irq";
|
||||||
static constexpr int MAP_ID_PTME_CONFIG = 3;
|
static constexpr int MAP_ID_PTME_CONFIG = 3;
|
||||||
@ -57,6 +58,7 @@ static constexpr char GYRO_0_ENABLE[] = "enable_gyro_0";
|
|||||||
static constexpr char GYRO_2_ENABLE[] = "enable_gyro_2";
|
static constexpr char GYRO_2_ENABLE[] = "enable_gyro_2";
|
||||||
static constexpr char GNSS_SELECT[] = "gnss_mux_select";
|
static constexpr char GNSS_SELECT[] = "gnss_mux_select";
|
||||||
static constexpr char GNSS_MUX_SELECT[] = "gnss_mux_select";
|
static constexpr char GNSS_MUX_SELECT[] = "gnss_mux_select";
|
||||||
|
static constexpr char PL_I2C_ARESETN[] = "pl_i2c_aresetn";
|
||||||
|
|
||||||
static constexpr char HEATER_0[] = "heater0";
|
static constexpr char HEATER_0[] = "heater0";
|
||||||
static constexpr char HEATER_1[] = "heater1";
|
static constexpr char HEATER_1[] = "heater1";
|
||||||
@ -82,14 +84,12 @@ static constexpr char EN_RW_4[] = "enable_rw_4";
|
|||||||
|
|
||||||
static constexpr char RAD_SENSOR_CHIP_SELECT[] = "rad_sensor_chip_select";
|
static constexpr char RAD_SENSOR_CHIP_SELECT[] = "rad_sensor_chip_select";
|
||||||
static constexpr char ENABLE_RADFET[] = "enable_radfet";
|
static constexpr char ENABLE_RADFET[] = "enable_radfet";
|
||||||
static constexpr char PAPB_BUSY_SIGNAL_VC0[] = "papb_busy_signal_vc0";
|
|
||||||
static constexpr char PAPB_EMPTY_SIGNAL_VC0[] = "papb_empty_signal_vc0";
|
static constexpr char PAPB_EMPTY_SIGNAL_VC0[] = "papb_empty_signal_vc0";
|
||||||
static constexpr char PAPB_BUSY_SIGNAL_VC1[] = "papb_busy_signal_vc1";
|
|
||||||
static constexpr char PAPB_EMPTY_SIGNAL_VC1[] = "papb_empty_signal_vc1";
|
static constexpr char PAPB_EMPTY_SIGNAL_VC1[] = "papb_empty_signal_vc1";
|
||||||
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_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 PAPB_EMPTY_SIGNAL_VC3[] = "papb_empty_signal_vc3";
|
||||||
|
|
||||||
static constexpr char PTME_RESETN[] = "ptme_resetn";
|
static constexpr char PTME_RESETN[] = "ptme_resetn";
|
||||||
|
|
||||||
static constexpr char RS485_EN_TX_CLOCK[] = "tx_clock_enable_ltc2872";
|
static constexpr char RS485_EN_TX_CLOCK[] = "tx_clock_enable_ltc2872";
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
#include <fsfw/filesystem/HasFileSystemIF.h>
|
#include <fsfw/filesystem/HasFileSystemIF.h>
|
||||||
#include <fsfw/ipc/QueueFactory.h>
|
#include <fsfw/ipc/QueueFactory.h>
|
||||||
#include <fsfw/tasks/TaskFactory.h>
|
#include <fsfw/tasks/TaskFactory.h>
|
||||||
|
#include <fsfw_hal/linux/uio/UioMapper.h>
|
||||||
|
|
||||||
#include "commonConfig.h"
|
#include "commonConfig.h"
|
||||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||||
@ -22,6 +23,7 @@
|
|||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <filesystem>
|
#include <filesystem>
|
||||||
|
|
||||||
|
#include "bsp_q7s/boardconfig/busConf.h"
|
||||||
#include "bsp_q7s/fs/SdCardManager.h"
|
#include "bsp_q7s/fs/SdCardManager.h"
|
||||||
#include "bsp_q7s/memory/scratchApi.h"
|
#include "bsp_q7s/memory/scratchApi.h"
|
||||||
#include "bsp_q7s/xadc/Xadc.h"
|
#include "bsp_q7s/xadc/Xadc.h"
|
||||||
@ -185,6 +187,14 @@ ReturnValue_t CoreController::initialize() {
|
|||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "Subscribing for GPS GPS_FIX_CHANGE event failed" << std::endl;
|
sif::warning << "Subscribing for GPS GPS_FIX_CHANGE event failed" << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
UioMapper sysRomMapper(q7s::UIO_SYS_ROM);
|
||||||
|
result = sysRomMapper.getMappedAdress(&mappedSysRomAddr, UioMapper::Permissions::READ_ONLY);
|
||||||
|
if (result != returnvalue::OK) {
|
||||||
|
// TODO: This might be a reason to switch to another image..
|
||||||
|
sif::error << "Getting mapped SYS ROM UIO address failed" << std::endl;
|
||||||
|
return ObjectManager::CHILD_INIT_FAILED;
|
||||||
|
}
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -223,6 +233,11 @@ ReturnValue_t CoreController::executeAction(ActionId_t actionId, MessageQueueId_
|
|||||||
}
|
}
|
||||||
|
|
||||||
triggerEvent(VERSION_INFO, p1, p2);
|
triggerEvent(VERSION_INFO, p1, p2);
|
||||||
|
if (mappedSysRomAddr != nullptr) {
|
||||||
|
uint32_t p1Firmware = *(reinterpret_cast<uint32_t *>(mappedSysRomAddr));
|
||||||
|
uint32_t p2Firmware = *(reinterpret_cast<uint32_t *>(mappedSysRomAddr) + 1);
|
||||||
|
triggerEvent(FIRMWARE_INFO, p1Firmware, p2Firmware);
|
||||||
|
}
|
||||||
return HasActionsIF::EXECUTION_FINISHED;
|
return HasActionsIF::EXECUTION_FINISHED;
|
||||||
}
|
}
|
||||||
case (ANNOUNCE_BOOT_COUNTS): {
|
case (ANNOUNCE_BOOT_COUNTS): {
|
||||||
|
@ -6,6 +6,7 @@
|
|||||||
#include <fsfw/globalfunctions/PeriodicOperationDivider.h>
|
#include <fsfw/globalfunctions/PeriodicOperationDivider.h>
|
||||||
#include <fsfw/parameters/ParameterHelper.h>
|
#include <fsfw/parameters/ParameterHelper.h>
|
||||||
#include <fsfw/parameters/ReceivesParameterMessagesIF.h>
|
#include <fsfw/parameters/ReceivesParameterMessagesIF.h>
|
||||||
|
#include <fsfw_hal/linux/uio/UioMapper.h>
|
||||||
#include <libxiphos.h>
|
#include <libxiphos.h>
|
||||||
#include <mission/acs/archive/GPSDefinitions.h>
|
#include <mission/acs/archive/GPSDefinitions.h>
|
||||||
#include <mission/utility/trace.h>
|
#include <mission/utility/trace.h>
|
||||||
@ -142,6 +143,7 @@ class CoreController : public ExtendedControllerBase, public ReceivesParameterMe
|
|||||||
|
|
||||||
static constexpr bool BLOCKING_SD_INIT = false;
|
static constexpr bool BLOCKING_SD_INIT = false;
|
||||||
|
|
||||||
|
uint32_t* mappedSysRomAddr = nullptr;
|
||||||
SdCardManager* sdcMan = nullptr;
|
SdCardManager* sdcMan = nullptr;
|
||||||
MessageQueueIF* eventQueue = nullptr;
|
MessageQueueIF* eventQueue = nullptr;
|
||||||
|
|
||||||
|
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
#include <fsfw/devicehandlers/HealthDevice.h>
|
#include <fsfw/devicehandlers/HealthDevice.h>
|
||||||
#include <fsfw/subsystem/Subsystem.h>
|
#include <fsfw/subsystem/Subsystem.h>
|
||||||
|
#include <fsfw/tasks/TaskFactory.h>
|
||||||
#include <linux/acs/AcsBoardPolling.h>
|
#include <linux/acs/AcsBoardPolling.h>
|
||||||
#include <linux/acs/GpsHyperionLinuxController.h>
|
#include <linux/acs/GpsHyperionLinuxController.h>
|
||||||
#include <linux/acs/ImtqPollingTask.h>
|
#include <linux/acs/ImtqPollingTask.h>
|
||||||
@ -730,20 +731,12 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(CcsdsComponentArgs& args) {
|
|||||||
// GPIO definitions of signals connected to the virtual channel interfaces of the PTME IP Core
|
// GPIO definitions of signals connected to the virtual channel interfaces of the PTME IP Core
|
||||||
GpioCookie* gpioCookiePtmeIp = new GpioCookie;
|
GpioCookie* gpioCookiePtmeIp = new GpioCookie;
|
||||||
GpiodRegularByLineName* gpio = nullptr;
|
GpiodRegularByLineName* gpio = nullptr;
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_BUSY_SIGNAL_VC0, "PAPB VC0");
|
|
||||||
gpioCookiePtmeIp->addGpio(gpioIds::VC0_PAPB_BUSY, gpio);
|
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC0, "PAPB VC0");
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC0, "PAPB VC0");
|
||||||
gpioCookiePtmeIp->addGpio(gpioIds::VC0_PAPB_EMPTY, gpio);
|
gpioCookiePtmeIp->addGpio(gpioIds::VC0_PAPB_EMPTY, gpio);
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_BUSY_SIGNAL_VC1, "PAPB VC1");
|
|
||||||
gpioCookiePtmeIp->addGpio(gpioIds::VC1_PAPB_BUSY, gpio);
|
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC1, "PAPB VC1");
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC1, "PAPB VC1");
|
||||||
gpioCookiePtmeIp->addGpio(gpioIds::VC1_PAPB_EMPTY, gpio);
|
gpioCookiePtmeIp->addGpio(gpioIds::VC1_PAPB_EMPTY, gpio);
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_BUSY_SIGNAL_VC2, "PAPB VC2");
|
|
||||||
gpioCookiePtmeIp->addGpio(gpioIds::VC2_PAPB_BUSY, gpio);
|
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC2, "PAPB VC2");
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC2, "PAPB VC2");
|
||||||
gpioCookiePtmeIp->addGpio(gpioIds::VC2_PAPB_EMPTY, gpio);
|
gpioCookiePtmeIp->addGpio(gpioIds::VC2_PAPB_EMPTY, gpio);
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_BUSY_SIGNAL_VC3, "PAPB VC3");
|
|
||||||
gpioCookiePtmeIp->addGpio(gpioIds::VC3_PAPB_BUSY, gpio);
|
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC3, "PAPB VC3");
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PAPB_EMPTY_SIGNAL_VC3, "PAPB VC3");
|
||||||
gpioCookiePtmeIp->addGpio(gpioIds::VC3_PAPB_EMPTY, gpio);
|
gpioCookiePtmeIp->addGpio(gpioIds::VC3_PAPB_EMPTY, gpio);
|
||||||
gpio = new GpiodRegularByLineName(q7s::gpioNames::PTME_RESETN, "PTME RESETN",
|
gpio = new GpiodRegularByLineName(q7s::gpioNames::PTME_RESETN, "PTME RESETN",
|
||||||
@ -752,18 +745,14 @@ ReturnValue_t ObjectFactory::createCcsdsComponents(CcsdsComponentArgs& args) {
|
|||||||
gpioChecker(args.gpioComIF.addGpios(gpioCookiePtmeIp), "PTME PAPB VCs");
|
gpioChecker(args.gpioComIF.addGpios(gpioCookiePtmeIp), "PTME PAPB VCs");
|
||||||
|
|
||||||
// Creating virtual channel interfaces
|
// Creating virtual channel interfaces
|
||||||
VirtualChannelIF* vc0 =
|
VirtualChannelIF* vc0 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC0_PAPB_EMPTY,
|
||||||
new PapbVcInterface(&args.gpioComIF, gpioIds::VC0_PAPB_BUSY, gpioIds::VC0_PAPB_EMPTY,
|
q7s::UIO_PTME, q7s::uiomapids::PTME_VC0);
|
||||||
q7s::UIO_PTME, q7s::uiomapids::PTME_VC0);
|
VirtualChannelIF* vc1 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC1_PAPB_EMPTY,
|
||||||
VirtualChannelIF* vc1 =
|
q7s::UIO_PTME, q7s::uiomapids::PTME_VC1);
|
||||||
new PapbVcInterface(&args.gpioComIF, gpioIds::VC1_PAPB_BUSY, gpioIds::VC1_PAPB_EMPTY,
|
VirtualChannelIF* vc2 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC2_PAPB_EMPTY,
|
||||||
q7s::UIO_PTME, q7s::uiomapids::PTME_VC1);
|
q7s::UIO_PTME, q7s::uiomapids::PTME_VC2);
|
||||||
VirtualChannelIF* vc2 =
|
VirtualChannelIF* vc3 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC3_PAPB_EMPTY,
|
||||||
new PapbVcInterface(&args.gpioComIF, gpioIds::VC2_PAPB_BUSY, gpioIds::VC2_PAPB_EMPTY,
|
q7s::UIO_PTME, q7s::uiomapids::PTME_VC3);
|
||||||
q7s::UIO_PTME, q7s::uiomapids::PTME_VC2);
|
|
||||||
VirtualChannelIF* vc3 =
|
|
||||||
new PapbVcInterface(&args.gpioComIF, gpioIds::VC3_PAPB_BUSY, gpioIds::VC3_PAPB_EMPTY,
|
|
||||||
q7s::UIO_PTME, q7s::uiomapids::PTME_VC3);
|
|
||||||
// Creating ptme object and adding virtual channel interfaces
|
// Creating ptme object and adding virtual channel interfaces
|
||||||
Ptme* ptme = new Ptme(objects::PTME);
|
Ptme* ptme = new Ptme(objects::PTME);
|
||||||
ptme->addVcInterface(ccsds::VC0, vc0);
|
ptme->addVcInterface(ccsds::VC0, vc0);
|
||||||
@ -1025,3 +1014,19 @@ void ObjectFactory::createRadSensorChipSelect(LinuxLibgpioIF* gpioIF) {
|
|||||||
gpioCookieRadSensor->addGpio(gpioIds::ENABLE_RADFET, gpio);
|
gpioCookieRadSensor->addGpio(gpioIds::ENABLE_RADFET, gpio);
|
||||||
gpioChecker(gpioIF->addGpios(gpioCookieRadSensor), "RAD sensor");
|
gpioChecker(gpioIF->addGpios(gpioCookieRadSensor), "RAD sensor");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void ObjectFactory::createPlI2cResetGpio(LinuxLibgpioIF* gpioIF) {
|
||||||
|
using namespace gpio;
|
||||||
|
if (gpioIF == nullptr) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
GpioCookie* gpioI2cResetnCookie = new GpioCookie;
|
||||||
|
GpiodRegularByLineName* gpioI2cResetn = new GpiodRegularByLineName(
|
||||||
|
q7s::gpioNames::PL_I2C_ARESETN, "PL_I2C_ARESETN", Direction::OUT, Levels::HIGH);
|
||||||
|
gpioI2cResetnCookie->addGpio(gpioIds::PL_I2C_ARESETN, gpioI2cResetn);
|
||||||
|
gpioChecker(gpioIF->addGpios(gpioI2cResetnCookie), "PL I2C ARESETN");
|
||||||
|
// Reset I2C explicitely again.
|
||||||
|
gpioIF->pullLow(gpioIds::PL_I2C_ARESETN);
|
||||||
|
TaskFactory::delayTask(1);
|
||||||
|
gpioIF->pullHigh(gpioIds::PL_I2C_ARESETN);
|
||||||
|
}
|
||||||
|
@ -78,6 +78,7 @@ ReturnValue_t createCcsdsComponents(CcsdsComponentArgs& args);
|
|||||||
void createMiscComponents();
|
void createMiscComponents();
|
||||||
|
|
||||||
void createTestComponents(LinuxLibgpioIF* gpioComIF);
|
void createTestComponents(LinuxLibgpioIF* gpioComIF);
|
||||||
|
void createPlI2cResetGpio(LinuxLibgpioIF* gpioComIF);
|
||||||
|
|
||||||
void testAcsBrdAss(AcsBoardAssembly* assAss);
|
void testAcsBrdAss(AcsBoardAssembly* assAss);
|
||||||
|
|
||||||
|
@ -47,6 +47,7 @@ void ObjectFactory::produce(void* args) {
|
|||||||
/* Adding gpios for chip select decoding to the gpioComIf */
|
/* Adding gpios for chip select decoding to the gpioComIf */
|
||||||
q7s::gpioCallbacks::initSpiCsDecoder(gpioComIF);
|
q7s::gpioCallbacks::initSpiCsDecoder(gpioComIF);
|
||||||
gpioCallbacks::disableAllDecoder(gpioComIF);
|
gpioCallbacks::disableAllDecoder(gpioComIF);
|
||||||
|
createPlI2cResetGpio(gpioComIF);
|
||||||
|
|
||||||
// Hardware is usually not connected to EM, so we need to create dummies which replace lower
|
// Hardware is usually not connected to EM, so we need to create dummies which replace lower
|
||||||
// level components.
|
// level components.
|
||||||
|
@ -45,6 +45,7 @@ void ObjectFactory::produce(void* args) {
|
|||||||
/* Adding gpios for chip select decoding to the gpioComIf */
|
/* Adding gpios for chip select decoding to the gpioComIf */
|
||||||
q7s::gpioCallbacks::initSpiCsDecoder(gpioComIF);
|
q7s::gpioCallbacks::initSpiCsDecoder(gpioComIF);
|
||||||
gpioCallbacks::disableAllDecoder(gpioComIF);
|
gpioCallbacks::disableAllDecoder(gpioComIF);
|
||||||
|
createPlI2cResetGpio(gpioComIF);
|
||||||
|
|
||||||
new CoreController(objects::CORE_CONTROLLER, enableHkSets);
|
new CoreController(objects::CORE_CONTROLLER, enableHkSets);
|
||||||
createPcduComponents(gpioComIF, &pwrSwitcher, enableHkSets);
|
createPcduComponents(gpioComIF, &pwrSwitcher, enableHkSets);
|
||||||
|
@ -77,6 +77,8 @@ enum gpioId_t {
|
|||||||
CS_RAD_SENSOR,
|
CS_RAD_SENSOR,
|
||||||
ENABLE_RADFET,
|
ENABLE_RADFET,
|
||||||
|
|
||||||
|
PL_I2C_ARESETN,
|
||||||
|
|
||||||
PAPB_BUSY_N,
|
PAPB_BUSY_N,
|
||||||
PAPB_EMPTY,
|
PAPB_EMPTY,
|
||||||
|
|
||||||
@ -93,15 +95,10 @@ enum gpioId_t {
|
|||||||
EN_RW_CS,
|
EN_RW_CS,
|
||||||
|
|
||||||
SPI_MUX,
|
SPI_MUX,
|
||||||
|
|
||||||
VC0_PAPB_EMPTY,
|
VC0_PAPB_EMPTY,
|
||||||
VC0_PAPB_BUSY,
|
|
||||||
VC1_PAPB_EMPTY,
|
VC1_PAPB_EMPTY,
|
||||||
VC1_PAPB_BUSY,
|
|
||||||
VC2_PAPB_EMPTY,
|
VC2_PAPB_EMPTY,
|
||||||
VC2_PAPB_BUSY,
|
|
||||||
VC3_PAPB_EMPTY,
|
VC3_PAPB_EMPTY,
|
||||||
VC3_PAPB_BUSY,
|
|
||||||
PTME_RESETN,
|
PTME_RESETN,
|
||||||
|
|
||||||
PDEC_RESET,
|
PDEC_RESET,
|
||||||
|
@ -271,6 +271,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
14010;0x36ba;TRYING_I2C_RECOVERY;HIGH;I2C is unavailable. Trying recovery of I2C bus by power cycling all I2C devices.;mission/sysDefs.h
|
14010;0x36ba;TRYING_I2C_RECOVERY;HIGH;I2C is unavailable. Trying recovery of I2C bus by power cycling all I2C devices.;mission/sysDefs.h
|
||||||
14011;0x36bb;I2C_REBOOT;HIGH;I2C is unavailable. Recovery did not work, performing full reboot.;mission/sysDefs.h
|
14011;0x36bb;I2C_REBOOT;HIGH;I2C is unavailable. Recovery did not work, performing full reboot.;mission/sysDefs.h
|
||||||
14012;0x36bc;PDEC_REBOOT;HIGH;PDEC recovery through reset was not possible, performing full reboot.;mission/sysDefs.h
|
14012;0x36bc;PDEC_REBOOT;HIGH;PDEC recovery through reset was not possible, performing full reboot.;mission/sysDefs.h
|
||||||
|
14013;0x36bd;FIRMWARE_INFO;INFO;Version information of the firmware (not OBSW). P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set.;mission/sysDefs.h
|
||||||
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/tcsDefs.h
|
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/tcsDefs.h
|
||||||
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/tcsDefs.h
|
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/tcsDefs.h
|
||||||
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
|
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
|
||||||
|
|
@ -271,6 +271,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path
|
|||||||
14010;0x36ba;TRYING_I2C_RECOVERY;HIGH;I2C is unavailable. Trying recovery of I2C bus by power cycling all I2C devices.;mission/sysDefs.h
|
14010;0x36ba;TRYING_I2C_RECOVERY;HIGH;I2C is unavailable. Trying recovery of I2C bus by power cycling all I2C devices.;mission/sysDefs.h
|
||||||
14011;0x36bb;I2C_REBOOT;HIGH;I2C is unavailable. Recovery did not work, performing full reboot.;mission/sysDefs.h
|
14011;0x36bb;I2C_REBOOT;HIGH;I2C is unavailable. Recovery did not work, performing full reboot.;mission/sysDefs.h
|
||||||
14012;0x36bc;PDEC_REBOOT;HIGH;PDEC recovery through reset was not possible, performing full reboot.;mission/sysDefs.h
|
14012;0x36bc;PDEC_REBOOT;HIGH;PDEC recovery through reset was not possible, performing full reboot.;mission/sysDefs.h
|
||||||
|
14013;0x36bd;FIRMWARE_INFO;INFO;Version information of the firmware (not OBSW). P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash P2: First four letters of Git SHA is the last byte of P1 is set.;mission/sysDefs.h
|
||||||
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/tcsDefs.h
|
14100;0x3714;NO_VALID_SENSOR_TEMPERATURE;MEDIUM;No description;mission/controller/tcsDefs.h
|
||||||
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/tcsDefs.h
|
14101;0x3715;NO_HEALTHY_HEATER_AVAILABLE;MEDIUM;No description;mission/controller/tcsDefs.h
|
||||||
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
|
14102;0x3716;SYRLINKS_OVERHEATING;HIGH;No description;mission/controller/tcsDefs.h
|
||||||
|
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 295 translations.
|
* @brief Auto-generated event translation file. Contains 296 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2023-05-17 17:15:34
|
* Generated on: 2023-06-21 19:01:02
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -277,6 +277,7 @@ const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS";
|
|||||||
const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
|
const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
|
||||||
const char *I2C_REBOOT_STRING = "I2C_REBOOT";
|
const char *I2C_REBOOT_STRING = "I2C_REBOOT";
|
||||||
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
|
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
|
||||||
|
const char *FIRMWARE_INFO_STRING = "FIRMWARE_INFO";
|
||||||
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
||||||
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
||||||
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
||||||
@ -847,6 +848,8 @@ const char *translateEvents(Event event) {
|
|||||||
return I2C_REBOOT_STRING;
|
return I2C_REBOOT_STRING;
|
||||||
case (14012):
|
case (14012):
|
||||||
return PDEC_REBOOT_STRING;
|
return PDEC_REBOOT_STRING;
|
||||||
|
case (14013):
|
||||||
|
return FIRMWARE_INFO_STRING;
|
||||||
case (14100):
|
case (14100):
|
||||||
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
||||||
case (14101):
|
case (14101):
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 175 translations.
|
* Contains 175 translations.
|
||||||
* Generated on: 2023-05-17 17:15:34
|
* Generated on: 2023-06-21 19:01:02
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/**
|
/**
|
||||||
* @brief Auto-generated event translation file. Contains 295 translations.
|
* @brief Auto-generated event translation file. Contains 296 translations.
|
||||||
* @details
|
* @details
|
||||||
* Generated on: 2023-05-17 17:15:34
|
* Generated on: 2023-06-21 19:01:02
|
||||||
*/
|
*/
|
||||||
#include "translateEvents.h"
|
#include "translateEvents.h"
|
||||||
|
|
||||||
@ -277,6 +277,7 @@ const char *INDIVIDUAL_BOOT_COUNTS_STRING = "INDIVIDUAL_BOOT_COUNTS";
|
|||||||
const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
|
const char *TRYING_I2C_RECOVERY_STRING = "TRYING_I2C_RECOVERY";
|
||||||
const char *I2C_REBOOT_STRING = "I2C_REBOOT";
|
const char *I2C_REBOOT_STRING = "I2C_REBOOT";
|
||||||
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
|
const char *PDEC_REBOOT_STRING = "PDEC_REBOOT";
|
||||||
|
const char *FIRMWARE_INFO_STRING = "FIRMWARE_INFO";
|
||||||
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
const char *NO_VALID_SENSOR_TEMPERATURE_STRING = "NO_VALID_SENSOR_TEMPERATURE";
|
||||||
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
const char *NO_HEALTHY_HEATER_AVAILABLE_STRING = "NO_HEALTHY_HEATER_AVAILABLE";
|
||||||
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
const char *SYRLINKS_OVERHEATING_STRING = "SYRLINKS_OVERHEATING";
|
||||||
@ -847,6 +848,8 @@ const char *translateEvents(Event event) {
|
|||||||
return I2C_REBOOT_STRING;
|
return I2C_REBOOT_STRING;
|
||||||
case (14012):
|
case (14012):
|
||||||
return PDEC_REBOOT_STRING;
|
return PDEC_REBOOT_STRING;
|
||||||
|
case (14013):
|
||||||
|
return FIRMWARE_INFO_STRING;
|
||||||
case (14100):
|
case (14100):
|
||||||
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
return NO_VALID_SENSOR_TEMPERATURE_STRING;
|
||||||
case (14101):
|
case (14101):
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
* @brief Auto-generated object translation file.
|
* @brief Auto-generated object translation file.
|
||||||
* @details
|
* @details
|
||||||
* Contains 175 translations.
|
* Contains 175 translations.
|
||||||
* Generated on: 2023-05-17 17:15:34
|
* Generated on: 2023-06-21 19:01:02
|
||||||
*/
|
*/
|
||||||
#include "translateObjects.h"
|
#include "translateObjects.h"
|
||||||
|
|
||||||
|
@ -7,20 +7,16 @@
|
|||||||
|
|
||||||
#include "fsfw/serviceinterface/ServiceInterface.h"
|
#include "fsfw/serviceinterface/ServiceInterface.h"
|
||||||
|
|
||||||
PapbVcInterface::PapbVcInterface(LinuxLibgpioIF* gpioComIF, gpioId_t papbBusyId,
|
PapbVcInterface::PapbVcInterface(LinuxLibgpioIF* gpioComIF, gpioId_t papbEmptyId,
|
||||||
gpioId_t papbEmptyId, std::string uioFile, int mapNum)
|
std::string uioFile, int mapNum)
|
||||||
: gpioComIF(gpioComIF),
|
: gpioComIF(gpioComIF), papbEmptyId(papbEmptyId), uioFile(std::move(uioFile)), mapNum(mapNum) {}
|
||||||
papbBusyId(papbBusyId),
|
|
||||||
papbEmptyId(papbEmptyId),
|
|
||||||
uioFile(std::move(uioFile)),
|
|
||||||
mapNum(mapNum) {}
|
|
||||||
|
|
||||||
PapbVcInterface::~PapbVcInterface() {}
|
PapbVcInterface::~PapbVcInterface() {}
|
||||||
|
|
||||||
ReturnValue_t PapbVcInterface::initialize() {
|
ReturnValue_t PapbVcInterface::initialize() {
|
||||||
UioMapper uioMapper(uioFile, mapNum);
|
UioMapper uioMapper(uioFile, mapNum);
|
||||||
ReturnValue_t result = uioMapper.getMappedAdress(const_cast<uint32_t**>(&vcBaseReg),
|
ReturnValue_t result = uioMapper.getMappedAdress(const_cast<uint32_t**>(&vcBaseReg),
|
||||||
UioMapper::Permissions::WRITE_ONLY);
|
UioMapper::Permissions::READ_WRITE);
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
@ -32,63 +28,16 @@ ReturnValue_t PapbVcInterface::write(const uint8_t* data, size_t size) {
|
|||||||
if (size < 4) {
|
if (size < 4) {
|
||||||
return returnvalue::FAILED;
|
return returnvalue::FAILED;
|
||||||
}
|
}
|
||||||
if (pollInterfaceReadiness(0, true) == returnvalue::OK) {
|
if (pollReadyForPacket()) {
|
||||||
startPacketTransfer(ByteWidthCfg::ONE);
|
startPacketTransfer(ByteWidthCfg::ONE);
|
||||||
} else {
|
} else {
|
||||||
return DirectTmSinkIF::IS_BUSY;
|
return DirectTmSinkIF::IS_BUSY;
|
||||||
}
|
}
|
||||||
// TODO: This should work but does not.. :(
|
|
||||||
// size_t idx = 0;
|
|
||||||
// while (idx < size) {
|
|
||||||
//
|
|
||||||
// nanosleep(&BETWEEN_POLL_DELAY, &remDelay);
|
|
||||||
// if ((size - idx) < 4) {
|
|
||||||
// *vcBaseReg = CONFIG_DATA_INPUT | (size - idx - 1);
|
|
||||||
// usleep(1);
|
|
||||||
// }
|
|
||||||
// if (pollPapbBusySignal(2) == returnvalue::OK) {
|
|
||||||
// // vcBaseReg + DATA_REG_OFFSET + 3 = static_cast<uint8_t>(data + idx);
|
|
||||||
// // vcBaseReg + DATA_REG_OFFSET + 2 = static_cast<uint8_t>(data + idx + 1);
|
|
||||||
// // vcBaseReg + DATA_REG_OFFSET + 1 = static_cast<uint8_t>(data + idx + 2);
|
|
||||||
// // vcBaseReg + DATA_REG_OFFSET = static_cast<uint8_t>(data + idx + 3);
|
|
||||||
//
|
|
||||||
// // std::memcpy((vcBaseReg + DATA_REG_OFFSET), data + idx , nextWriteSize);
|
|
||||||
// *(vcBaseReg + DATA_REG_OFFSET) = *reinterpret_cast<const uint32_t*>(data + idx);
|
|
||||||
// //uint8_t* byteReg = reinterpret_cast<uint8_t*>(vcBaseReg + DATA_REG_OFFSET);
|
|
||||||
//
|
|
||||||
// //byteReg[0] = data[idx];
|
|
||||||
// //byteReg[1] = data[idx];
|
|
||||||
// } else {
|
|
||||||
// abortPacketTransfer();
|
|
||||||
// return returnvalue::FAILED;
|
|
||||||
// }
|
|
||||||
// // TODO: Change this after the bugfix. Right now, the PAPB ignores the content of the byte
|
|
||||||
// // width configuration.5
|
|
||||||
// // It's okay to increment by a larger amount for the last segment here, loop will be over
|
|
||||||
// // in any case.
|
|
||||||
// idx += 4;
|
|
||||||
// }
|
|
||||||
for (size_t idx = 0; idx < size; idx++) {
|
for (size_t idx = 0; idx < size; idx++) {
|
||||||
// This delay is super-important, DO NOT REMOVE!
|
// if (pollInterfaceReadiness(2, false) == returnvalue::OK) {
|
||||||
// Polling the GPIO or the config register too often messes up the scheduler.
|
*(vcBaseReg + DATA_REG_OFFSET) = static_cast<uint32_t>(data[idx]);
|
||||||
// TODO: Maybe this should not be done like this. It would be better if there was a custom
|
|
||||||
// FPGA module which can accept packets and then takes care of dumping that packet into
|
|
||||||
// the PTME. DMA would be an ideal solution for this.
|
|
||||||
nanosleep(&BETWEEN_POLL_DELAY, &remDelay);
|
|
||||||
if (pollInterfaceReadiness(2, false) == returnvalue::OK) {
|
|
||||||
*(vcBaseReg + DATA_REG_OFFSET) = static_cast<uint32_t>(data[idx]);
|
|
||||||
} else {
|
|
||||||
abortPacketTransfer();
|
|
||||||
return returnvalue::FAILED;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
nanosleep(&BETWEEN_POLL_DELAY, &remDelay);
|
|
||||||
if (pollInterfaceReadiness(2, false) == returnvalue::OK) {
|
|
||||||
completePacketTransfer();
|
|
||||||
} else {
|
|
||||||
abortPacketTransfer();
|
|
||||||
return returnvalue::FAILED;
|
|
||||||
}
|
}
|
||||||
|
completePacketTransfer();
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -98,60 +47,33 @@ void PapbVcInterface::startPacketTransfer(ByteWidthCfg initWidth) {
|
|||||||
|
|
||||||
void PapbVcInterface::completePacketTransfer() { *vcBaseReg = CONFIG_END; }
|
void PapbVcInterface::completePacketTransfer() { *vcBaseReg = CONFIG_END; }
|
||||||
|
|
||||||
ReturnValue_t PapbVcInterface::pollInterfaceReadiness(uint32_t maxPollRetries,
|
bool PapbVcInterface::pollReadyForPacket() const {
|
||||||
bool checkReadyState) const {
|
// Check if PAPB interface is ready to receive data. Use the configuration register for this.
|
||||||
uint32_t busyIdx = 0;
|
// Bit 5, see PTME ptme_001_01-0-7-r2 Table 31.
|
||||||
nextDelay.tv_nsec = FIRST_DELAY_PAPB_POLLING_NS;
|
uint32_t reg = *vcBaseReg;
|
||||||
|
// bool busy = (reg >> 5) & 0b1;
|
||||||
while (true) {
|
return (reg >> 6) & 0b1;
|
||||||
// Check if PAPB interface is ready to receive data. Use the configuration register for this.
|
|
||||||
// Bit 5, see PTME ptme_001_01-0-7-r2 Table 31.
|
|
||||||
uint32_t reg = *vcBaseReg;
|
|
||||||
bool busy = (reg >> 5) & 0b1;
|
|
||||||
bool ready = (reg >> 6) & 0b1;
|
|
||||||
if (not busy) {
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
|
||||||
if (checkReadyState and not ready) {
|
|
||||||
return PAPB_BUSY;
|
|
||||||
}
|
|
||||||
|
|
||||||
busyIdx++;
|
|
||||||
if (busyIdx >= maxPollRetries) {
|
|
||||||
return PAPB_BUSY;
|
|
||||||
}
|
|
||||||
|
|
||||||
// Ignore signal handling here for now.
|
|
||||||
nanosleep(&nextDelay, &remDelay);
|
|
||||||
// Adaptive delay.
|
|
||||||
if (nextDelay.tv_nsec * 2 <= MAX_DELAY_PAPB_POLLING_NS) {
|
|
||||||
nextDelay.tv_nsec *= 2;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return returnvalue::OK;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void PapbVcInterface::isVcInterfaceBufferEmpty() {
|
bool PapbVcInterface::isVcInterfaceBufferEmpty() {
|
||||||
ReturnValue_t result = returnvalue::OK;
|
ReturnValue_t result = returnvalue::OK;
|
||||||
gpio::Levels papbEmptyState = gpio::Levels::HIGH;
|
gpio::Levels papbEmptyState = gpio::Levels::HIGH;
|
||||||
|
|
||||||
result = gpioComIF->readGpio(papbEmptyId, papbEmptyState);
|
result = gpioComIF->readGpio(papbEmptyId, papbEmptyState);
|
||||||
|
|
||||||
if (result != returnvalue::OK) {
|
if (result != returnvalue::OK) {
|
||||||
sif::warning << "PapbVcInterface::isVcInterfaceBufferEmpty: Failed to read papb empty signal"
|
sif::error << "PapbVcInterface::isVcInterfaceBufferEmpty: Failed to read papb empty signal"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
return;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (papbEmptyState == gpio::Levels::HIGH) {
|
if (papbEmptyState == gpio::Levels::HIGH) {
|
||||||
sif::debug << "PapbVcInterface::isVcInterfaceBufferEmpty: Buffer is empty" << std::endl;
|
return true;
|
||||||
} else {
|
|
||||||
sif::debug << "PapbVcInterface::isVcInterfaceBufferEmpty: Buffer is not empty" << std::endl;
|
|
||||||
}
|
}
|
||||||
return;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PapbVcInterface::isBusy() const { return pollInterfaceReadiness(0, true) == PAPB_BUSY; }
|
bool PapbVcInterface::isBusy() const { return not pollReadyForPacket(); }
|
||||||
|
|
||||||
void PapbVcInterface::cancelTransfer() { abortPacketTransfer(); }
|
void PapbVcInterface::cancelTransfer() { abortPacketTransfer(); }
|
||||||
|
|
||||||
|
@ -30,8 +30,7 @@ class PapbVcInterface : public VirtualChannelIF {
|
|||||||
* @param uioFile UIO file providing access to the PAPB bus
|
* @param uioFile UIO file providing access to the PAPB bus
|
||||||
* @param mapNum Map number of UIO map associated with this virtual channel
|
* @param mapNum Map number of UIO map associated with this virtual channel
|
||||||
*/
|
*/
|
||||||
PapbVcInterface(LinuxLibgpioIF* gpioComIF, gpioId_t papbBusyId, gpioId_t papbEmptyId,
|
PapbVcInterface(LinuxLibgpioIF* gpioComIF, gpioId_t papbEmptyId, std::string uioFile, int mapNum);
|
||||||
std::string uioFile, int mapNum);
|
|
||||||
virtual ~PapbVcInterface();
|
virtual ~PapbVcInterface();
|
||||||
|
|
||||||
bool isBusy() const override;
|
bool isBusy() const override;
|
||||||
@ -83,9 +82,6 @@ class PapbVcInterface : public VirtualChannelIF {
|
|||||||
static constexpr long int MAX_DELAY_PAPB_POLLING_NS = 40;
|
static constexpr long int MAX_DELAY_PAPB_POLLING_NS = 40;
|
||||||
|
|
||||||
LinuxLibgpioIF* gpioComIF = nullptr;
|
LinuxLibgpioIF* gpioComIF = nullptr;
|
||||||
|
|
||||||
/** Pulled to low when virtual channel not ready to receive data */
|
|
||||||
gpioId_t papbBusyId = gpio::NO_GPIO;
|
|
||||||
/** High when external buffer memory of virtual channel is empty */
|
/** High when external buffer memory of virtual channel is empty */
|
||||||
gpioId_t papbEmptyId = gpio::NO_GPIO;
|
gpioId_t papbEmptyId = gpio::NO_GPIO;
|
||||||
|
|
||||||
@ -120,13 +116,13 @@ class PapbVcInterface : public VirtualChannelIF {
|
|||||||
*
|
*
|
||||||
* @return returnvalue::OK when ready to receive data else PAPB_BUSY.
|
* @return returnvalue::OK when ready to receive data else PAPB_BUSY.
|
||||||
*/
|
*/
|
||||||
inline ReturnValue_t pollInterfaceReadiness(uint32_t maxPollRetries, bool checkReadyState) const;
|
inline bool pollReadyForPacket() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function can be used for debugging to check whether there are packets in
|
* @brief This function can be used for debugging to check whether there are packets in
|
||||||
* the packet buffer of the virtual channel or not.
|
* the packet buffer of the virtual channel or not.
|
||||||
*/
|
*/
|
||||||
void isVcInterfaceBufferEmpty();
|
bool isVcInterfaceBufferEmpty();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @brief This function sends a complete telemetry transfer frame data field (1105 bytes)
|
* @brief This function sends a complete telemetry transfer frame data field (1105 bytes)
|
||||||
|
@ -93,7 +93,8 @@ ReturnValue_t CfdpHandler::handleCfdpPacket(TmTcMessage& msg) {
|
|||||||
return INVALID_PDU_FORMAT;
|
return INVALID_PDU_FORMAT;
|
||||||
}
|
}
|
||||||
if (not FileDirectiveReader::checkFileDirective(pduDataField[0])) {
|
if (not FileDirectiveReader::checkFileDirective(pduDataField[0])) {
|
||||||
sif::error << "CfdpHandler: Invalid PDU directive field " << pduDataField[0] << std::endl;
|
sif::error << "CfdpHandler: Invalid PDU directive field " << static_cast<int>(pduDataField[0])
|
||||||
|
<< std::endl;
|
||||||
return INVALID_DIRECTIVE_FIELD;
|
return INVALID_DIRECTIVE_FIELD;
|
||||||
}
|
}
|
||||||
auto directive = static_cast<FileDirective>(pduDataField[0]);
|
auto directive = static_cast<FileDirective>(pduDataField[0]);
|
||||||
|
@ -42,13 +42,7 @@ ReturnValue_t PersistentLogTmStoreTask::performOperation(uint8_t opCode) {
|
|||||||
if (not someonesBusy) {
|
if (not someonesBusy) {
|
||||||
TaskFactory::delayTask(100);
|
TaskFactory::delayTask(100);
|
||||||
} else if (vcBusyDuringDump) {
|
} else if (vcBusyDuringDump) {
|
||||||
// TODO: Might not be necessary
|
|
||||||
sif::debug << "VC busy, delaying" << std::endl;
|
|
||||||
TaskFactory::delayTask(10);
|
TaskFactory::delayTask(10);
|
||||||
} else {
|
|
||||||
// TODO: Would be best to remove this, but not delaying here can lead to evil issues.
|
|
||||||
// Polling the PAPB of the PTME core too often leads to scheuduling issues.
|
|
||||||
TaskFactory::delayTask(2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,13 +24,7 @@ ReturnValue_t PersistentSingleTmStoreTask::performOperation(uint8_t opCode) {
|
|||||||
if (not busy) {
|
if (not busy) {
|
||||||
TaskFactory::delayTask(100);
|
TaskFactory::delayTask(100);
|
||||||
} else if (dumpContext.vcBusyDuringDump) {
|
} else if (dumpContext.vcBusyDuringDump) {
|
||||||
sif::debug << "VC busy, delaying" << std::endl;
|
|
||||||
// TODO: Might not be necessary
|
|
||||||
TaskFactory::delayTask(10);
|
TaskFactory::delayTask(10);
|
||||||
} else {
|
|
||||||
// TODO: Would be best to remove this, but not delaying here can lead to evil issues.
|
|
||||||
// Polling the PAPB of the PTME core too often leads to scheuduling issues.
|
|
||||||
TaskFactory::delayTask(2);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -66,7 +66,7 @@ void P60DockHandler::parseHkTableReply(const uint8_t *packet) {
|
|||||||
}
|
}
|
||||||
coreHk.battMode = newBattMode;
|
coreHk.battMode = newBattMode;
|
||||||
|
|
||||||
auxHk.heaterOn = *(packet + 0x57);
|
auxHk.heaterForBp4PackOn = *(packet + 0x57);
|
||||||
auxHk.converter5VStatus = *(packet + 0x58);
|
auxHk.converter5VStatus = *(packet + 0x58);
|
||||||
|
|
||||||
for (uint8_t idx = 0; idx < hk::CHNLS_LEN; idx++) {
|
for (uint8_t idx = 0; idx < hk::CHNLS_LEN; idx++) {
|
||||||
@ -111,6 +111,8 @@ void P60DockHandler::parseHkTableReply(const uint8_t *packet) {
|
|||||||
}
|
}
|
||||||
coreHk.setValidity(true, true);
|
coreHk.setValidity(true, true);
|
||||||
auxHk.setValidity(true, true);
|
auxHk.setValidity(true, true);
|
||||||
|
// No BP4 pack, no this is always invalid.
|
||||||
|
auxHk.heaterForBp4PackOn.setValid(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t P60DockHandler::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
ReturnValue_t P60DockHandler::initializeLocalDataPool(localpool::DataPool &localDataPoolMap,
|
||||||
|
@ -260,7 +260,8 @@ class HkTableDataset : public StaticLocalDataSet<32> {
|
|||||||
lp_var_t<uint16_t> resetcause = lp_var_t<uint16_t>(sid.objectId, pool::P60DOCK_RESETCAUSE, this);
|
lp_var_t<uint16_t> resetcause = lp_var_t<uint16_t>(sid.objectId, pool::P60DOCK_RESETCAUSE, this);
|
||||||
|
|
||||||
/** Battery heater control only possible on BP4 packs */
|
/** Battery heater control only possible on BP4 packs */
|
||||||
lp_var_t<uint8_t> heaterOn = lp_var_t<uint8_t>(sid.objectId, pool::P60DOCK_HEATER_ON, this);
|
lp_var_t<uint8_t> heaterForBp4PackOn =
|
||||||
|
lp_var_t<uint8_t>(sid.objectId, pool::P60DOCK_HEATER_ON, this);
|
||||||
lp_var_t<uint8_t> converter5VStatus =
|
lp_var_t<uint8_t> converter5VStatus =
|
||||||
lp_var_t<uint8_t>(sid.objectId, pool::P60DOCK_CONV_5V_ENABLE_STATUS, this);
|
lp_var_t<uint8_t>(sid.objectId, pool::P60DOCK_CONV_5V_ENABLE_STATUS, this);
|
||||||
|
|
||||||
|
@ -44,6 +44,8 @@ static constexpr char VERSION_FILE_NAME[] = "version.txt";
|
|||||||
static constexpr char REBOOT_FILE_NAME[] = "reboot.txt";
|
static constexpr char REBOOT_FILE_NAME[] = "reboot.txt";
|
||||||
static constexpr char TIME_FILE_NAME[] = "time_backup.txt";
|
static constexpr char TIME_FILE_NAME[] = "time_backup.txt";
|
||||||
|
|
||||||
|
static constexpr uint32_t SYS_ROM_BASE_ADDR = 0x80000000;
|
||||||
|
|
||||||
static constexpr ActionId_t ANNOUNCE_VERSION = 1;
|
static constexpr ActionId_t ANNOUNCE_VERSION = 1;
|
||||||
static constexpr ActionId_t ANNOUNCE_CURRENT_IMAGE = 2;
|
static constexpr ActionId_t ANNOUNCE_CURRENT_IMAGE = 2;
|
||||||
static constexpr ActionId_t ANNOUNCE_BOOT_COUNTS = 3;
|
static constexpr ActionId_t ANNOUNCE_BOOT_COUNTS = 3;
|
||||||
@ -113,6 +115,10 @@ static constexpr Event TRYING_I2C_RECOVERY = event::makeEvent(SUBSYSTEM_ID, 10,
|
|||||||
static constexpr Event I2C_REBOOT = event::makeEvent(SUBSYSTEM_ID, 11, severity::HIGH);
|
static constexpr Event I2C_REBOOT = event::makeEvent(SUBSYSTEM_ID, 11, severity::HIGH);
|
||||||
//! [EXPORT] : [COMMENT] PDEC recovery through reset was not possible, performing full reboot.
|
//! [EXPORT] : [COMMENT] PDEC recovery through reset was not possible, performing full reboot.
|
||||||
static constexpr Event PDEC_REBOOT = event::makeEvent(SUBSYSTEM_ID, 12, severity::HIGH);
|
static constexpr Event PDEC_REBOOT = event::makeEvent(SUBSYSTEM_ID, 12, severity::HIGH);
|
||||||
|
//! [EXPORT] : [COMMENT] Version information of the firmware (not OBSW).
|
||||||
|
//! P1: Byte 0: Major, Byte 1: Minor, Byte 2: Patch, Byte 3: Has Git Hash
|
||||||
|
//! P2: First four letters of Git SHA is the last byte of P1 is set.
|
||||||
|
static constexpr Event FIRMWARE_INFO = event::makeEvent(SUBSYSTEM_ID, 13, severity::INFO);
|
||||||
|
|
||||||
class ListDirectoryCmdBase {
|
class ListDirectoryCmdBase {
|
||||||
public: // TODO: Packet definition for clean deserialization
|
public: // TODO: Packet definition for clean deserialization
|
||||||
|
@ -268,7 +268,7 @@ ReturnValue_t PersistentTmStore::getNextDumpPacket(PusTmReader& reader, bool& fi
|
|||||||
// restore the file dump, but for now do not trust the file.
|
// restore the file dump, but for now do not trust the file.
|
||||||
std::error_code e;
|
std::error_code e;
|
||||||
std::filesystem::remove(dumpParams.dirEntry.path().c_str(), e);
|
std::filesystem::remove(dumpParams.dirEntry.path().c_str(), e);
|
||||||
if(dumpParams.dirEntry.path() == activeFile) {
|
if (dumpParams.dirEntry.path() == activeFile) {
|
||||||
activeFile == std::nullopt;
|
activeFile == std::nullopt;
|
||||||
assignAndOrCreateMostRecentFile();
|
assignAndOrCreateMostRecentFile();
|
||||||
}
|
}
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit 5f44cb96be1e5b7f1a49571b6420fa85d6bc847a
|
Subproject commit 1bb8bea8d92fef2c9ec58ea657b04b56635c16dd
|
Loading…
Reference in New Issue
Block a user