MPSoC Overhaul #296

Merged
muellerr merged 18 commits from mpsoc-overhaul into main 2024-05-06 14:18:04 +02:00
Showing only changes of commit de34952df5 - Show all commits

View File

@ -112,7 +112,7 @@ class SupvActionId(enum.IntEnum):
REQUEST_ADC_REPORT = 57
RESET_PL = 58
ENABLE_NVMS = 59
CONTINUE_UPDATE = 60
RESUME_UPDATE = 60
MEM_CHECK = 61
@ -137,7 +137,7 @@ class OpCode:
SET_TIME_REF = "set_time_ref"
FACTORY_FLASH = "factory_flash"
START_UPDATE = "start_update"
PERFORM_UPDATE = "update"
RESUME_UPDATE = "resum_update"
FACTORY_RESET = "factory_reset"
MEM_CHECK = "mem_check"
RESET_MPSOC = "reset_mpsoc"
@ -156,7 +156,7 @@ class Info(str, enum.Enum):
SHUTDOWN_MPSOC = "Shutdown MPSoC"
SET_TIME_REF = "Set time reference"
FACTORY_FLASH = "Factory Flash Mode"
PERFORM_UPDATE = "Start or continue MPSoC SW update at starting bytes"
RESUME_UPDATE = "Start or continue MPSoC SW update at starting bytes"
START_UPDATE = "Start new MPSoC SW update"
FACTORY_RESET = "Factory Reset of loggers"
MEM_CHECK = "Memory Check"
@ -331,7 +331,7 @@ def pack_ploc_supv_commands(q: DefaultPusQueueHelper, cmd_str: str): # noqa C90
q.add_log_cmd("PLOC Supversior: Start new MPSoC SW update")
command = pack_update_command(object_id.as_bytes, True)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
if cmd_str in OpCode.PERFORM_UPDATE:
if cmd_str in OpCode.RESUME_UPDATE:
q.add_log_cmd("PLOC Supervisor: Perform MPSoC SW update")
command = pack_update_command(object_id.as_bytes, False)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
@ -370,7 +370,7 @@ def pack_ploc_supv_commands(q: DefaultPusQueueHelper, cmd_str: str): # noqa C90
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
if cmd_str == "58":
q.add_log_cmd("PLOC Supervisor: Continue update")
command = object_id.as_bytes + struct.pack("!I", SupvActionId.CONTINUE_UPDATE)
command = object_id.as_bytes + struct.pack("!I", SupvActionId.RESUME_UPDATE)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
if cmd_str == OpCode.MEM_CHECK:
custom_data = bytearray()