diff --git a/linux/devices/devicedefinitions/PlocSupervisorDefinitions.h b/linux/devices/devicedefinitions/PlocSupervisorDefinitions.h index a0592ce3..f77fad3b 100644 --- a/linux/devices/devicedefinitions/PlocSupervisorDefinitions.h +++ b/linux/devices/devicedefinitions/PlocSupervisorDefinitions.h @@ -55,6 +55,7 @@ static const DeviceCommandId_t LOGGING_REQUEST_EVENT_BUFFERS = 54; static const DeviceCommandId_t LOGGING_CLEAR_COUNTERS = 55; static const DeviceCommandId_t LOGGING_SET_TOPIC = 56; static const DeviceCommandId_t REQUEST_ADC_REPORT = 57; +static const DeviceCommandId_t RESET_PL = 58; /** Reply IDs */ static const DeviceCommandId_t ACK_REPORT = 50; @@ -101,6 +102,7 @@ static const uint16_t APID_SEL_MPSOC_BOOT_IMAGE = 0xA3; static const uint16_t APID_SET_BOOT_TIMEOUT = 0xA4; static const uint16_t APID_SET_MAX_RESTART_TRIES = 0xA5; static const uint16_t APID_RESET_MPSOC = 0xA6; +static const uint16_t APID_RESET_PL = 0xA7; static const uint16_t APID_GET_BOOT_STATUS_RPT = 0xA8; static const uint16_t APID_PREPARE_UPDATE = 0xA9; static const uint16_t APID_START_MPSOC_QUIET = 0xAA; diff --git a/linux/devices/ploc/PlocSupervisorHandler.cpp b/linux/devices/ploc/PlocSupervisorHandler.cpp index 35a11124..fd7406cf 100644 --- a/linux/devices/ploc/PlocSupervisorHandler.cpp +++ b/linux/devices/ploc/PlocSupervisorHandler.cpp @@ -344,6 +344,11 @@ ReturnValue_t PlocSupervisorHandler::buildCommandFromCommand(DeviceCommandId_t d result = RETURN_OK; break; } + case RESET_PL: { + prepareEmptyCmd(APID_RESET_PL); + result = RETURN_OK; + break; + } default: sif::debug << "PlocSupervisorHandler::buildCommandFromCommand: Command not implemented" << std::endl; @@ -399,6 +404,7 @@ void PlocSupervisorHandler::fillCommandAndReplyMap() { this->insertInCommandMap(LOGGING_REQUEST_COUNTERS); this->insertInCommandMap(LOGGING_CLEAR_COUNTERS); this->insertInCommandMap(LOGGING_SET_TOPIC); + this->insertInCommandMap(RESET_PL); this->insertInCommandAndReplyMap(FIRST_MRAM_DUMP, 3); this->insertInCommandAndReplyMap(CONSECUTIVE_MRAM_DUMP, 3); this->insertInReplyMap(ACK_REPORT, 3, nullptr, SIZE_ACK_REPORT); @@ -521,6 +527,7 @@ ReturnValue_t PlocSupervisorHandler::enableReplyInReplyMap(DeviceCommandMap::ite case DISABLE_AUTO_TM: case LOGGING_CLEAR_COUNTERS: case LOGGING_SET_TOPIC: + case RESET_PL: enabledReplies = 2; break; default: