improvements for mram dump
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
Jakob Meier 2022-05-05 08:55:45 +02:00
parent 5441520369
commit 8832d06d03
5 changed files with 19 additions and 9 deletions

View File

@ -17,6 +17,7 @@
#include "fsfw_hal/linux/uart/UartCookie.h" #include "fsfw_hal/linux/uart/UartCookie.h"
#include "linux/devices/ploc/PlocMPSoCHandler.h" #include "linux/devices/ploc/PlocMPSoCHandler.h"
#include "linux/devices/ploc/PlocMPSoCHelper.h" #include "linux/devices/ploc/PlocMPSoCHelper.h"
#include "linux/devices/ploc/PlocMemoryDumper.h"
#include "linux/devices/ploc/PlocSupervisorHandler.h" #include "linux/devices/ploc/PlocSupervisorHandler.h"
#include "linux/devices/ploc/PlocSupvHelper.h" #include "linux/devices/ploc/PlocSupvHelper.h"
#include "mission/core/GenericFactory.h" #include "mission/core/GenericFactory.h"
@ -70,6 +71,8 @@ new UartComIF(objects::UART_COM_IF);
supervisorCookie, Gpio(gpioIds::ENABLE_SUPV_UART, supvGpioIF), supervisorCookie, Gpio(gpioIds::ENABLE_SUPV_UART, supvGpioIF),
pcdu::PDU1_CH6_PLOC_12V, supvHelper); pcdu::PDU1_CH6_PLOC_12V, supvHelper);
plocSupervisor->setStartUpImmediately(); plocSupervisor->setStartUpImmediately();
new PlocMemoryDumper(objects::PLOC_MEMORY_DUMPER);
#endif #endif
#if OBSW_TEST_LIBGPIOD == 1 #if OBSW_TEST_LIBGPIOD == 1

View File

@ -149,10 +149,9 @@ void PlocMemoryDumper::completionFailedReceived(ActionId_t actionId, ReturnValue
case (supv::FIRST_MRAM_DUMP): case (supv::FIRST_MRAM_DUMP):
case (supv::CONSECUTIVE_MRAM_DUMP): case (supv::CONSECUTIVE_MRAM_DUMP):
triggerEvent(MRAM_DUMP_FAILED, mram.lastStartAddress); triggerEvent(MRAM_DUMP_FAILED, mram.lastStartAddress);
pendingCommand = NONE;
break; break;
default: default:
sif::debug << "PlocMemoryDumper::completionFailedReceived: Invalid pending command "
<< std::endl;
break; break;
} }
state = State::IDLE; state = State::IDLE;

View File

@ -1549,6 +1549,16 @@ void PlocSupervisorHandler::disableAllReplies() {
iter = deviceReplyMap.find(supv::GET_HK_REPORT); iter = deviceReplyMap.find(supv::GET_HK_REPORT);
info = &(iter->second); info = &(iter->second);
info->delayCycles = 0; info->delayCycles = 0;
info->active = false;
info->command = deviceCommandMap.end();
break;
}
case supv::FIRST_MRAM_DUMP:
case supv::CONSECUTIVE_MRAM_DUMP: {
iter = deviceReplyMap.find(commandId);
info = &(iter->second);
info->delayCycles = 0;
info->active = false;
info->command = deviceCommandMap.end(); info->command = deviceCommandMap.end();
break; break;
} }
@ -1761,12 +1771,12 @@ ReturnValue_t PlocSupervisorHandler::createMramDumpFile() {
#endif /* BOARD_TE0720 == 0 */ #endif /* BOARD_TE0720 == 0 */
// Check if path to PLOC directory exists // Check if path to PLOC directory exists
if (not std::filesystem::exists(std::string(currentMountPrefix + "/" + plocFilePath))) { if (not std::filesystem::exists(std::string(currentMountPrefix + "/" + supervisorFilePath))) {
sif::warning << "PlocSupervisorHandler::createMramDumpFile: Ploc path does not exist" sif::warning << "PlocSupervisorHandler::createMramDumpFile: Supervisor path does not exist"
<< std::endl; << std::endl;
return SupvReturnValuesIF::PATH_DOES_NOT_EXIST; return SupvReturnValuesIF::PATH_DOES_NOT_EXIST;
} }
activeMramFile = currentMountPrefix + "/" + plocFilePath + "/" + filename; activeMramFile = currentMountPrefix + "/" + supervisorFilePath + "/" + filename;
// Create new file // Create new file
std::ofstream file(activeMramFile, std::ios_base::out); std::ofstream file(activeMramFile, std::ios_base::out);
file.close(); file.close();

View File

@ -137,8 +137,8 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
SdCardManager* sdcMan = nullptr; SdCardManager* sdcMan = nullptr;
#endif /* BOARD_TE0720 == 0 */ #endif /* BOARD_TE0720 == 0 */
// Path to PLOC specific files on SD card // Path to supervisor specific files on SD card
std::string plocFilePath = "ploc"; std::string supervisorFilePath = "ploc/supervisor";
std::string activeMramFile; std::string activeMramFile;
// Setting this variable to true will enable direct downlink of MRAM packets // Setting this variable to true will enable direct downlink of MRAM packets

View File

@ -464,10 +464,8 @@ ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) {
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ); thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ);
#endif #endif
#ifdef XIPHOS_Q7S
thisSequence->addSlot(objects::PLOC_MEMORY_DUMPER, length * 0, thisSequence->addSlot(objects::PLOC_MEMORY_DUMPER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION); DeviceHandlerIF::PERFORM_OPERATION);
#endif
#if OBSW_ADD_PLOC_SUPERVISOR == 1 #if OBSW_ADD_PLOC_SUPERVISOR == 1
thisSequence->addSlot(objects::PLOC_SUPERVISOR_HANDLER, length * 0, thisSequence->addSlot(objects::PLOC_SUPERVISOR_HANDLER, length * 0,
DeviceHandlerIF::PERFORM_OPERATION); DeviceHandlerIF::PERFORM_OPERATION);