Squashed commit of the following:
commitc137df64ab
Merge:a919b3d1
4179e8e1
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 15:38:52 2023 +0200 Merge remote-tracking branch 'origin/main' into update_ptme_code commit4179e8e124
Merge:26f5eff6
51f9d5e1
Author: Robin Müller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 15:35:54 2023 +0200 Merge pull request 'This bugfix might be super important' (#621) from possible_bugfix_dual_lane_assy into main Reviewed-on: #621 Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de> Reviewed-by: Steffen Gaisser <gaisser@irs.uni-stuttgart.de> commit51f9d5e1fe
Merge:a17f57cb
26f5eff6
Author: Robin Müller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 15:35:10 2023 +0200 Merge branch 'main' into possible_bugfix_dual_lane_assy commita17f57cbb5
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 15:34:45 2023 +0200 changelog commit26f5eff6d5
Merge:4074e084
8a0f13ba
Author: Robin Müller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 15:32:03 2023 +0200 Merge pull request 'More System Modes' (#612) from more-system-modes into main Reviewed-on: #612 commit8a0f13bafb
Merge:14baa356
4074e084
Author: Robin Müller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 15:31:51 2023 +0200 Merge branch 'main' into more-system-modes commit14baa3563c
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 15:30:09 2023 +0200 hello commit7045b6034a
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 15:18:47 2023 +0200 changelog commit37b9615525
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 15:18:16 2023 +0200 changelog commit4074e08480
Merge:862a4f26
38686ac3
Author: Robin Müller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 15:12:46 2023 +0200 Merge pull request 'Adaption for EM: Add P60 dock without ACU' (#620) from adaption_em_p60_dock_without_acu into main Reviewed-on: #620 Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de> commit23796345d9
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 15:04:30 2023 +0200 changelog and stop payload tracking commitb10275ca43
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 14:28:05 2023 +0200 changelog commit383849c5cb
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 14:25:14 2023 +0200 that is more robust commitc66cef9129
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 14:23:21 2023 +0200 changelog commit02ea8a7298
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 14:22:21 2023 +0200 changelog commit38686ac3f6
Merge:189a3126
74d5d709
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 14:04:03 2023 +0200 Merge branch 'possible_bugfix_dual_lane_assy' into adaption_em_p60_dock_without_acu commit74d5d70973
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 13:58:08 2023 +0200 this bugfix might be super important commit48355e8263
Merge:5691fe8e
862a4f26
Author: Robin Müller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 10:25:50 2023 +0200 Merge branch 'main' into more-system-modes commit189a312628
Merge:a1279428
862a4f26
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 10:23:46 2023 +0200 Merge remote-tracking branch 'origin/main' into adaption_em_p60_dock_without_acu commita12794281b
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 10:20:31 2023 +0200 changelog commitfcaabb4e42
Merge:6c326489
4aafca64
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 10:20:02 2023 +0200 Merge remote-tracking branch 'origin/main' into adaption_em_p60_dock_without_acu commit6c326489cb
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 10:18:46 2023 +0200 adapt EM SW: GS PCDU added, but use dummy for ACU commit862a4f2685
Merge:4aafca64
2daca272
Author: Robin Müller <muellerr@irs.uni-stuttgart.de> Date: Fri Apr 28 09:37:55 2023 +0200 Merge pull request 'Host SW bugfixes' (#618) from try_fix_host_obsw into main Reviewed-on: #618 Reviewed-by: Marius Eggert <eggertm@irs.uni-stuttgart.de> commit5691fe8e72
Merge:097be17a
4aafca64
Author: meggert <eggertm@irs.uni-stuttgart.de> Date: Thu Apr 27 15:40:31 2023 +0200 Merge branch 'main' into more-system-modes commit2daca272f8
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Thu Apr 27 11:29:18 2023 +0200 changelog commit03762f9620
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Wed Apr 26 17:38:06 2023 +0200 lower live TM handler frequency commita296f16e5c
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Wed Apr 26 17:36:38 2023 +0200 host SW works properly again commit83f07a6e16
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Wed Apr 26 17:26:32 2023 +0200 configurable event manager queue depth commit00dab64628
Merge:641b8e84
4aafca64
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Wed Apr 26 17:03:35 2023 +0200 Merge remote-tracking branch 'origin/main' into try_fix_host_obsw commit4aafca64a6
Merge:f271242d
6901eae8
Author: Robin Müller <muellerr@irs.uni-stuttgart.de> Date: Wed Apr 26 17:03:01 2023 +0200 Merge pull request 'EM adaptions' (#619) from em_adaptions into main Reviewed-on: #619 commit6901eae816
Merge:7d630ebc
f271242d
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Wed Apr 26 17:02:24 2023 +0200 Merge remote-tracking branch 'origin/main' into em_adaptions commit7d630ebcf3
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Wed Apr 26 17:00:04 2023 +0200 EM adaptions commit641b8e847d
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Wed Apr 26 16:41:40 2023 +0200 add back tm funnel handler for hosted build commit1314268682
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Wed Apr 26 16:23:50 2023 +0200 host build requires dedicated live TM task.. commit4040304ef0
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Wed Apr 26 13:15:42 2023 +0200 this is annoying commita919b3d164
Merge:e22f2a53
9672d6d6
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Wed Apr 26 11:11:30 2023 +0200 Merge remote-tracking branch 'origin/develop' into update_ptme_code commit9672d6d6cc
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Wed Apr 26 11:11:09 2023 +0200 changelog commite22f2a53ea
Merge:b076e80b
0eb6b7cc
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Wed Apr 26 11:05:58 2023 +0200 Merge remote-tracking branch 'origin/develop' into update_ptme_code commitb076e80b44
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Wed Apr 26 11:04:10 2023 +0200 changelog commit269aa6f7b0
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Wed Apr 26 11:03:42 2023 +0200 changelog commitcaae2b4ba9
Author: Robin Mueller <muellerr@irs.uni-stuttgart.de> Date: Wed Apr 26 11:02:24 2023 +0200 update PTME code commit097be17a29
Author: meggert <eggertm@irs.uni-stuttgart.de> Date: Wed Apr 19 15:07:21 2023 +0200 added remaining acs modes as system modes
This commit is contained in:
parent
ef039c47b8
commit
7e6c25901b
11
CHANGELOG.md
11
CHANGELOG.md
@ -18,6 +18,16 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
|
|
||||||
# [v2.2.0] to be released
|
# [v2.2.0] to be released
|
||||||
|
|
||||||
|
TODO: New firmware package version.
|
||||||
|
|
||||||
|
## Changed
|
||||||
|
|
||||||
|
- Removed PTME busy/ready signals. Those were not used anyway because register reads are used now.
|
||||||
|
|
||||||
|
## Fixed
|
||||||
|
|
||||||
|
- Important bugfixes for PTME. See `q7s-package` CHANGELOG.
|
||||||
|
|
||||||
# [v2.1.0] to be released
|
# [v2.1.0] to be released
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
@ -49,6 +59,7 @@ will consitute of a breaking change warranting a new major release:
|
|||||||
|
|
||||||
# [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,
|
||||||
|
@ -82,14 +82,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";
|
||||||
|
@ -729,20 +729,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",
|
||||||
@ -751,17 +743,13 @@ 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 =
|
VirtualChannelIF* vc1 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC1_PAPB_EMPTY,
|
||||||
new PapbVcInterface(&args.gpioComIF, gpioIds::VC1_PAPB_BUSY, gpioIds::VC1_PAPB_EMPTY,
|
|
||||||
q7s::UIO_PTME, q7s::uiomapids::PTME_VC1);
|
q7s::UIO_PTME, q7s::uiomapids::PTME_VC1);
|
||||||
VirtualChannelIF* vc2 =
|
VirtualChannelIF* vc2 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC2_PAPB_EMPTY,
|
||||||
new PapbVcInterface(&args.gpioComIF, gpioIds::VC2_PAPB_BUSY, gpioIds::VC2_PAPB_EMPTY,
|
|
||||||
q7s::UIO_PTME, q7s::uiomapids::PTME_VC2);
|
q7s::UIO_PTME, q7s::uiomapids::PTME_VC2);
|
||||||
VirtualChannelIF* vc3 =
|
VirtualChannelIF* vc3 = new PapbVcInterface(&args.gpioComIF, gpioIds::VC3_PAPB_EMPTY,
|
||||||
new PapbVcInterface(&args.gpioComIF, gpioIds::VC3_PAPB_BUSY, gpioIds::VC3_PAPB_EMPTY,
|
|
||||||
q7s::UIO_PTME, q7s::uiomapids::PTME_VC3);
|
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);
|
||||||
|
@ -93,15 +93,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,
|
||||||
|
@ -7,13 +7,9 @@
|
|||||||
|
|
||||||
#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() {}
|
||||||
|
|
||||||
@ -99,7 +95,7 @@ void PapbVcInterface::startPacketTransfer(ByteWidthCfg initWidth) {
|
|||||||
void PapbVcInterface::completePacketTransfer() { *vcBaseReg = CONFIG_END; }
|
void PapbVcInterface::completePacketTransfer() { *vcBaseReg = CONFIG_END; }
|
||||||
|
|
||||||
ReturnValue_t PapbVcInterface::pollInterfaceReadiness(uint32_t maxPollRetries,
|
ReturnValue_t PapbVcInterface::pollInterfaceReadiness(uint32_t maxPollRetries,
|
||||||
bool checkReadyState) const {
|
bool checkReadyForPacketState) const {
|
||||||
uint32_t busyIdx = 0;
|
uint32_t busyIdx = 0;
|
||||||
nextDelay.tv_nsec = FIRST_DELAY_PAPB_POLLING_NS;
|
nextDelay.tv_nsec = FIRST_DELAY_PAPB_POLLING_NS;
|
||||||
|
|
||||||
@ -108,13 +104,16 @@ ReturnValue_t PapbVcInterface::pollInterfaceReadiness(uint32_t maxPollRetries,
|
|||||||
// Bit 5, see PTME ptme_001_01-0-7-r2 Table 31.
|
// Bit 5, see PTME ptme_001_01-0-7-r2 Table 31.
|
||||||
uint32_t reg = *vcBaseReg;
|
uint32_t reg = *vcBaseReg;
|
||||||
bool busy = (reg >> 5) & 0b1;
|
bool busy = (reg >> 5) & 0b1;
|
||||||
bool ready = (reg >> 6) & 0b1;
|
bool readyForPacket = (reg >> 6) & 0b1;
|
||||||
if (not busy) {
|
if (checkReadyForPacketState) {
|
||||||
|
if (not busy and readyForPacket) {
|
||||||
return returnvalue::OK;
|
return returnvalue::OK;
|
||||||
}
|
} else if (not busy and not readyForPacket) {
|
||||||
if (checkReadyState and not ready) {
|
|
||||||
return PAPB_BUSY;
|
return PAPB_BUSY;
|
||||||
}
|
}
|
||||||
|
} else if (not busy) {
|
||||||
|
return returnvalue::OK;
|
||||||
|
}
|
||||||
|
|
||||||
busyIdx++;
|
busyIdx++;
|
||||||
if (busyIdx >= maxPollRetries) {
|
if (busyIdx >= maxPollRetries) {
|
||||||
@ -131,24 +130,22 @@ ReturnValue_t PapbVcInterface::pollInterfaceReadiness(uint32_t maxPollRetries,
|
|||||||
return returnvalue::OK;
|
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 pollInterfaceReadiness(0, true) == PAPB_BUSY; }
|
||||||
|
@ -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,14 @@ 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 ReturnValue_t pollInterfaceReadiness(uint32_t maxPollRetries,
|
||||||
|
bool checkReadyForPacketState) 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)
|
||||||
|
Loading…
Reference in New Issue
Block a user