improvements for mram dump
This commit is contained in:
parent
5441520369
commit
8832d06d03
@ -17,6 +17,7 @@
|
||||
#include "fsfw_hal/linux/uart/UartCookie.h"
|
||||
#include "linux/devices/ploc/PlocMPSoCHandler.h"
|
||||
#include "linux/devices/ploc/PlocMPSoCHelper.h"
|
||||
#include "linux/devices/ploc/PlocMemoryDumper.h"
|
||||
#include "linux/devices/ploc/PlocSupervisorHandler.h"
|
||||
#include "linux/devices/ploc/PlocSupvHelper.h"
|
||||
#include "mission/core/GenericFactory.h"
|
||||
@ -70,6 +71,8 @@ new UartComIF(objects::UART_COM_IF);
|
||||
supervisorCookie, Gpio(gpioIds::ENABLE_SUPV_UART, supvGpioIF),
|
||||
pcdu::PDU1_CH6_PLOC_12V, supvHelper);
|
||||
plocSupervisor->setStartUpImmediately();
|
||||
|
||||
new PlocMemoryDumper(objects::PLOC_MEMORY_DUMPER);
|
||||
#endif
|
||||
|
||||
#if OBSW_TEST_LIBGPIOD == 1
|
||||
|
@ -149,10 +149,9 @@ void PlocMemoryDumper::completionFailedReceived(ActionId_t actionId, ReturnValue
|
||||
case (supv::FIRST_MRAM_DUMP):
|
||||
case (supv::CONSECUTIVE_MRAM_DUMP):
|
||||
triggerEvent(MRAM_DUMP_FAILED, mram.lastStartAddress);
|
||||
pendingCommand = NONE;
|
||||
break;
|
||||
default:
|
||||
sif::debug << "PlocMemoryDumper::completionFailedReceived: Invalid pending command "
|
||||
<< std::endl;
|
||||
break;
|
||||
}
|
||||
state = State::IDLE;
|
||||
|
@ -1549,6 +1549,16 @@ void PlocSupervisorHandler::disableAllReplies() {
|
||||
iter = deviceReplyMap.find(supv::GET_HK_REPORT);
|
||||
info = &(iter->second);
|
||||
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();
|
||||
break;
|
||||
}
|
||||
@ -1761,12 +1771,12 @@ ReturnValue_t PlocSupervisorHandler::createMramDumpFile() {
|
||||
#endif /* BOARD_TE0720 == 0 */
|
||||
|
||||
// Check if path to PLOC directory exists
|
||||
if (not std::filesystem::exists(std::string(currentMountPrefix + "/" + plocFilePath))) {
|
||||
sif::warning << "PlocSupervisorHandler::createMramDumpFile: Ploc path does not exist"
|
||||
if (not std::filesystem::exists(std::string(currentMountPrefix + "/" + supervisorFilePath))) {
|
||||
sif::warning << "PlocSupervisorHandler::createMramDumpFile: Supervisor path does not exist"
|
||||
<< std::endl;
|
||||
return SupvReturnValuesIF::PATH_DOES_NOT_EXIST;
|
||||
}
|
||||
activeMramFile = currentMountPrefix + "/" + plocFilePath + "/" + filename;
|
||||
activeMramFile = currentMountPrefix + "/" + supervisorFilePath + "/" + filename;
|
||||
// Create new file
|
||||
std::ofstream file(activeMramFile, std::ios_base::out);
|
||||
file.close();
|
||||
|
@ -137,8 +137,8 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
|
||||
SdCardManager* sdcMan = nullptr;
|
||||
#endif /* BOARD_TE0720 == 0 */
|
||||
|
||||
// Path to PLOC specific files on SD card
|
||||
std::string plocFilePath = "ploc";
|
||||
// Path to supervisor specific files on SD card
|
||||
std::string supervisorFilePath = "ploc/supervisor";
|
||||
std::string activeMramFile;
|
||||
|
||||
// Setting this variable to true will enable direct downlink of MRAM packets
|
||||
|
@ -464,10 +464,8 @@ ReturnValue_t pst::pstUart(FixedTimeslotTaskIF *thisSequence) {
|
||||
thisSequence->addSlot(objects::PLOC_MPSOC_HANDLER, length * 0.8, DeviceHandlerIF::GET_READ);
|
||||
#endif
|
||||
|
||||
#ifdef XIPHOS_Q7S
|
||||
thisSequence->addSlot(objects::PLOC_MEMORY_DUMPER, length * 0,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
#endif
|
||||
#if OBSW_ADD_PLOC_SUPERVISOR == 1
|
||||
thisSequence->addSlot(objects::PLOC_SUPERVISOR_HANDLER, length * 0,
|
||||
DeviceHandlerIF::PERFORM_OPERATION);
|
||||
|
Loading…
x
Reference in New Issue
Block a user