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
5 changed files with 20 additions and 4 deletions
Showing only changes of commit 412aaf93bd - Show all commits

View File

@ -48,6 +48,10 @@ will consitute of a breaking change warranting a new major release:
16505 type. 16505 type.
- Host build is working again. Added reduced live TM helper which schedules the PUS and CFDP - Host build is working again. Added reduced live TM helper which schedules the PUS and CFDP
funnel. funnel.
- PLOC Supervisor handler now has a power switcher assigned to make PLOC power switching work
without an additional PCDU power switch command.
- The PLOC Supervisor handler now waits for the replies to the `SET_TIME` command to verify working
communication.
# [v2.0.5] 2023-05-11 # [v2.0.5] 2023-05-11

View File

@ -644,6 +644,7 @@ void ObjectFactory::createPayloadComponents(LinuxLibgpioIF* gpioComIF, PowerSwit
auto* supvHandler = new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, supervisorCookie, auto* supvHandler = new PlocSupervisorHandler(objects::PLOC_SUPERVISOR_HANDLER, supervisorCookie,
Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF), Gpio(gpioIds::ENABLE_SUPV_UART, gpioComIF),
power::PDU1_CH6_PLOC_12V, *supvHelper); power::PDU1_CH6_PLOC_12V, *supvHelper);
supvHandler->setPowerSwitcher(&pwrSwitch);
supvHandler->connectModeTreeParent(satsystem::payload::SUBSYSTEM); supvHandler->connectModeTreeParent(satsystem::payload::SUBSYSTEM);
#endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */ #endif /* OBSW_ADD_PLOC_SUPERVISOR == 1 */
static_cast<void>(consumer); static_cast<void>(consumer);

View File

@ -151,7 +151,7 @@ void PlocSupervisorHandler::doStartUp() {
} }
} }
} }
if (startupState == StartupState::SET_TIME_EXECUTING) { if (startupState == StartupState::TIME_WAS_SET) {
startupState = StartupState::ON; startupState = StartupState::ON;
} }
if (startupState == StartupState::ON) { if (startupState == StartupState::ON) {
@ -176,7 +176,7 @@ ReturnValue_t PlocSupervisorHandler::buildNormalDeviceCommand(DeviceCommandId_t*
ReturnValue_t PlocSupervisorHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) { ReturnValue_t PlocSupervisorHandler::buildTransitionDeviceCommand(DeviceCommandId_t* id) {
if (startupState == StartupState::SET_TIME) { if (startupState == StartupState::SET_TIME) {
*id = supv::SET_TIME_REF; *id = supv::SET_TIME_REF;
startupState = StartupState::SET_TIME_EXECUTING; startupState = StartupState::WAIT_FOR_TIME_REPLY;
return buildCommandFromCommand(*id, nullptr, 0); return buildCommandFromCommand(*id, nullptr, 0);
} }
return NOTHING_TO_SEND; return NOTHING_TO_SEND;
@ -1909,6 +1909,10 @@ ReturnValue_t PlocSupervisorHandler::handleExecutionSuccessReport(ExecutionRepor
case supv::SET_TIME_REF: { case supv::SET_TIME_REF: {
// We could only allow proper bootup when the time was set successfully, but // We could only allow proper bootup when the time was set successfully, but
// this makes debugging difficult. // this makes debugging difficult.
if (startupState == StartupState::WAIT_FOR_TIME_REPLY) {
startupState = StartupState::TIME_WAS_SET;
}
break; break;
} }
default: default:

View File

@ -99,7 +99,14 @@ class PlocSupervisorHandler : public DeviceHandlerBase {
static const uint32_t MRAM_DUMP_TIMEOUT = 60000; static const uint32_t MRAM_DUMP_TIMEOUT = 60000;
// 4 s // 4 s
static const uint32_t BOOT_TIMEOUT = 4000; static const uint32_t BOOT_TIMEOUT = 4000;
enum class StartupState : uint8_t { OFF, BOOTING, SET_TIME, SET_TIME_EXECUTING, ON }; enum class StartupState : uint8_t {
OFF,
BOOTING,
SET_TIME,
WAIT_FOR_TIME_REPLY,
TIME_WAS_SET,
ON
};
static constexpr bool SET_TIME_DURING_BOOT = true; static constexpr bool SET_TIME_DURING_BOOT = true;

2
tmtc

@ -1 +1 @@
Subproject commit 5fbd19bb6cca0790373a809d78f2307adca9d0c8 Subproject commit f090c3af66d1a0b760344e80053d6e83895e661a