This commit is contained in:
parent
9391949369
commit
90d289f56e
@ -172,16 +172,18 @@ void PlocMPSoCHandler::doStartUp() {
|
|||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
uartIsolatorSwitch.pullHigh();
|
uartIsolatorSwitch.pullHigh();
|
||||||
startupState = StartupState::WAIT_CYCLE;
|
startupState = StartupState::WAIT_CYCLES;
|
||||||
#endif /* not MSPOC_JTAG_BOOT == 1 */
|
#endif /* not MSPOC_JTAG_BOOT == 1 */
|
||||||
#else
|
#else
|
||||||
startupState = StartupState::WAIT_CYCLES;
|
startupState = StartupState::WAIT_CYCLES;
|
||||||
powerState = PowerState::ON;
|
powerState = PowerState::ON;
|
||||||
#endif /* XIPHOS_Q7S */
|
#endif /* XIPHOS_Q7S */
|
||||||
}
|
}
|
||||||
|
// Need to wait, MPSoC still not booted properly, requesting HK without these wait cycles does
|
||||||
|
// not work, no replies..
|
||||||
if (startupState == StartupState::WAIT_CYCLES) {
|
if (startupState == StartupState::WAIT_CYCLES) {
|
||||||
waitCycles++;
|
waitCycles++;
|
||||||
if (waitCycles == 2) {
|
if (waitCycles >= 10) {
|
||||||
startupState = StartupState::DONE;
|
startupState = StartupState::DONE;
|
||||||
waitCycles = 0;
|
waitCycles = 0;
|
||||||
}
|
}
|
||||||
@ -222,9 +224,9 @@ void PlocMPSoCHandler::doShutDown() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
|
ReturnValue_t PlocMPSoCHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
|
||||||
// testCycles ++;
|
if (not normalCmdPending) {
|
||||||
if (getPendingCommand() == DeviceHandlerIF::NO_COMMAND_ID) {
|
|
||||||
*id = mpsoc::TC_GET_HK_REPORT;
|
*id = mpsoc::TC_GET_HK_REPORT;
|
||||||
|
normalCmdPending = true;
|
||||||
return buildCommandFromCommand(*id, nullptr, 0);
|
return buildCommandFromCommand(*id, nullptr, 0);
|
||||||
}
|
}
|
||||||
return NOTHING_TO_SEND;
|
return NOTHING_TO_SEND;
|
||||||
@ -364,7 +366,6 @@ ReturnValue_t PlocMPSoCHandler::scanForReply(const uint8_t* start, size_t remain
|
|||||||
|
|
||||||
switch (apid) {
|
switch (apid) {
|
||||||
case (mpsoc::apid::ACK_SUCCESS):
|
case (mpsoc::apid::ACK_SUCCESS):
|
||||||
sif::debug << "recv ack success" << std::endl;
|
|
||||||
*foundLen = mpsoc::SIZE_ACK_REPORT;
|
*foundLen = mpsoc::SIZE_ACK_REPORT;
|
||||||
*foundId = mpsoc::ACK_REPORT;
|
*foundId = mpsoc::ACK_REPORT;
|
||||||
break;
|
break;
|
||||||
@ -447,7 +448,7 @@ ReturnValue_t PlocMPSoCHandler::interpretDeviceReply(DeviceCommandId_t id, const
|
|||||||
|
|
||||||
void PlocMPSoCHandler::setNormalDatapoolEntriesInvalid() { hkReport.setValidity(false, true); }
|
void PlocMPSoCHandler::setNormalDatapoolEntriesInvalid() { hkReport.setValidity(false, true); }
|
||||||
|
|
||||||
uint32_t PlocMPSoCHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 5000; }
|
uint32_t PlocMPSoCHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) { return 10000; }
|
||||||
|
|
||||||
ReturnValue_t PlocMPSoCHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
ReturnValue_t PlocMPSoCHandler::initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||||
LocalDataPoolManager& poolManager) {
|
LocalDataPoolManager& poolManager) {
|
||||||
@ -767,9 +768,15 @@ ReturnValue_t PlocMPSoCHandler::handleExecutionReport(const uint8_t* data) {
|
|||||||
|
|
||||||
switch (apid) {
|
switch (apid) {
|
||||||
case (mpsoc::apid::EXE_SUCCESS): {
|
case (mpsoc::apid::EXE_SUCCESS): {
|
||||||
|
if (normalCmdPending) {
|
||||||
|
normalCmdPending = false;
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case (mpsoc::apid::EXE_FAILURE): {
|
case (mpsoc::apid::EXE_FAILURE): {
|
||||||
|
if (normalCmdPending) {
|
||||||
|
normalCmdPending = false;
|
||||||
|
}
|
||||||
// TODO: Interpretation of status field in execution report
|
// TODO: Interpretation of status field in execution report
|
||||||
sif::warning << "PlocMPSoCHandler::handleExecutionReport: Received execution failure report"
|
sif::warning << "PlocMPSoCHandler::handleExecutionReport: Received execution failure report"
|
||||||
<< std::endl;
|
<< std::endl;
|
||||||
|
@ -108,6 +108,7 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
|||||||
|
|
||||||
mpsoc::HkReport hkReport;
|
mpsoc::HkReport hkReport;
|
||||||
|
|
||||||
|
bool normalCmdPending = false;
|
||||||
MessageQueueIF* eventQueue = nullptr;
|
MessageQueueIF* eventQueue = nullptr;
|
||||||
MessageQueueIF* commandActionHelperQueue = nullptr;
|
MessageQueueIF* commandActionHelperQueue = nullptr;
|
||||||
|
|
||||||
@ -185,7 +186,7 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
|
|||||||
TelemetryBuffer tmBuffer;
|
TelemetryBuffer tmBuffer;
|
||||||
uint32_t waitCycles = 0;
|
uint32_t waitCycles = 0;
|
||||||
|
|
||||||
enum class StartupState { IDLE, HW_INIT, WAIT_CYCLES, DONE } startupState;
|
enum class StartupState { IDLE, HW_INIT, WAIT_CYCLES, DONE } startupState = StartupState::IDLE;
|
||||||
enum class PowerState { OFF, BOOTING, SHUTDOWN, ON };
|
enum class PowerState { OFF, BOOTING, SHUTDOWN, ON };
|
||||||
|
|
||||||
PowerState powerState = PowerState::OFF;
|
PowerState powerState = PowerState::OFF;
|
||||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
|||||||
Subproject commit 87e5abe8ebb6a33d36445d43bcb6674b313626f1
|
Subproject commit 377e98b5c2da12f10cdd12b027548a8075fdcb58
|
Loading…
Reference in New Issue
Block a user