ploc supervisor mram dump

This commit is contained in:
Jakob.Meier 2021-07-29 09:21:33 +02:00
parent 4f3a680a07
commit 6cd4f6cfe3
3 changed files with 18 additions and 1 deletions

View File

@ -194,6 +194,11 @@ ReturnValue_t PlocSupervisorHandler::buildCommandFromCommand(
prepareWipeMramCmd(commandData);
result = RETURN_OK;
break;
}
case(PLOC_SPV::DUMP_MRAM): {
prepareDumpMramCmd(commandData);
result = RETURN_OK;
break;
}
default:
sif::debug << "PlocSupervisorHandler::buildCommandFromCommand: Command not implemented"
@ -242,6 +247,7 @@ void PlocSupervisorHandler::fillCommandAndReplyMap() {
this->insertInCommandMap(PLOC_SPV::SELECT_NVM);
this->insertInCommandMap(PLOC_SPV::RUN_AUTO_EM_TESTS);
this->insertInCommandMap(PLOC_SPV::WIPE_MRAM);
this->insertInCommandMap(PLOC_SPV::DUMP_MRAM);
this->insertInReplyMap(PLOC_SPV::ACK_REPORT, 3, nullptr, PLOC_SPV::SIZE_ACK_REPORT);
this->insertInReplyMap(PLOC_SPV::EXE_REPORT, 3, nullptr, PLOC_SPV::SIZE_EXE_REPORT);
this->insertInReplyMap(PLOC_SPV::HK_REPORT, 3, &hkset, PLOC_SPV::SIZE_HK_REPORT);
@ -1099,6 +1105,16 @@ void PlocSupervisorHandler::prepareWipeMramCmd(const uint8_t* commandData) {
packetToOutBuffer(packet.getWholeData(), packet.getFullSize());
}
void PlocSupervisorHandler::prepareDumpMramCmd(const uint8_t* commandData) {
uint32_t start = 0;
uint32_t stop = 0;
size_t size = sizeof(start) + sizeof(stop);
SerializeAdapter::deSerialize(&start, &commandData, &size, SerializeIF::Endianness::BIG);
SerializeAdapter::deSerialize(&stop, &commandData, &size, SerializeIF::Endianness::BIG);
PLOC_SPV::MramCmd packet(start, stop, PLOC_SPV::MramCmd::MramAction::DUMP);
packetToOutBuffer(packet.getWholeData(), packet.getFullSize());
}
void PlocSupervisorHandler::packetToOutBuffer(uint8_t* packetData, size_t fullSize) {
memcpy(commandBuffer, packetData, fullSize);
rawPacket = commandBuffer;

View File

@ -237,6 +237,7 @@ private:
void prepareSelectNvmCmd(const uint8_t* commandData);
ReturnValue_t prepareRunAutoEmTest(const uint8_t* commandData);
void prepareWipeMramCmd(const uint8_t* commandData);
void prepareDumpMramCmd(const uint8_t* commandData);
/**

2
tmtc

@ -1 +1 @@
Subproject commit 6601233f419fd395111c9f98043f3e687ee23dc3
Subproject commit 1b1f26ac3a948a320a29a16083613ea29789a378