PLOC MPSoC dir content report #634

Merged
meggert merged 54 commits from ploc_mpsoc_dir_content_report_2 into v2.1.0-dev 2023-05-15 09:40:03 +02:00
3 changed files with 16 additions and 8 deletions
Showing only changes of commit 90d289f56e - Show all commits

View File

@ -172,16 +172,18 @@ void PlocMPSoCHandler::doStartUp() {
}
#else
uartIsolatorSwitch.pullHigh();
startupState = StartupState::WAIT_CYCLE;
startupState = StartupState::WAIT_CYCLES;
#endif /* not MSPOC_JTAG_BOOT == 1 */
#else
startupState = StartupState::WAIT_CYCLES;
powerState = PowerState::ON;
#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) {
waitCycles++;
if (waitCycles == 2) {
if (waitCycles >= 10) {
startupState = StartupState::DONE;
waitCycles = 0;
}
@ -222,9 +224,9 @@ void PlocMPSoCHandler::doShutDown() {
}
ReturnValue_t PlocMPSoCHandler::buildNormalDeviceCommand(DeviceCommandId_t* id) {
// testCycles ++;
if (getPendingCommand() == DeviceHandlerIF::NO_COMMAND_ID) {
if (not normalCmdPending) {
*id = mpsoc::TC_GET_HK_REPORT;
normalCmdPending = true;
return buildCommandFromCommand(*id, nullptr, 0);
}
return NOTHING_TO_SEND;
@ -364,7 +366,6 @@ ReturnValue_t PlocMPSoCHandler::scanForReply(const uint8_t* start, size_t remain
switch (apid) {
case (mpsoc::apid::ACK_SUCCESS):
sif::debug << "recv ack success" << std::endl;
*foundLen = mpsoc::SIZE_ACK_REPORT;
*foundId = mpsoc::ACK_REPORT;
break;
@ -447,7 +448,7 @@ ReturnValue_t PlocMPSoCHandler::interpretDeviceReply(DeviceCommandId_t id, const
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,
LocalDataPoolManager& poolManager) {
@ -767,9 +768,15 @@ ReturnValue_t PlocMPSoCHandler::handleExecutionReport(const uint8_t* data) {
switch (apid) {
case (mpsoc::apid::EXE_SUCCESS): {
if (normalCmdPending) {
normalCmdPending = false;
}
break;
}
case (mpsoc::apid::EXE_FAILURE): {
if (normalCmdPending) {
normalCmdPending = false;
}
// TODO: Interpretation of status field in execution report
sif::warning << "PlocMPSoCHandler::handleExecutionReport: Received execution failure report"
<< std::endl;

View File

@ -108,6 +108,7 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
mpsoc::HkReport hkReport;
bool normalCmdPending = false;
MessageQueueIF* eventQueue = nullptr;
MessageQueueIF* commandActionHelperQueue = nullptr;
@ -185,7 +186,7 @@ class PlocMPSoCHandler : public DeviceHandlerBase, public CommandsActionsIF {
TelemetryBuffer tmBuffer;
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 };
PowerState powerState = PowerState::OFF;

2
tmtc

@ -1 +1 @@
Subproject commit 87e5abe8ebb6a33d36445d43bcb6674b313626f1
Subproject commit 377e98b5c2da12f10cdd12b027548a8075fdcb58