factory flash op code

This commit is contained in:
Robin Müller 2022-11-17 16:51:12 +01:00
parent f730ff4180
commit ef23aced2b
No known key found for this signature in database
GPG Key ID: 11D4952C8CCEF814

View File

@ -126,6 +126,7 @@ class OpCodes:
SHUTDOWN_MPSOC = ["6", "stop_mpsoc"] SHUTDOWN_MPSOC = ["6", "stop_mpsoc"]
SEL_NVM = ["7", "sel_nvm"] SEL_NVM = ["7", "sel_nvm"]
SET_TIME_REF = ["set_time_ref"] SET_TIME_REF = ["set_time_ref"]
FACTORY_FLASH = ["factory_flash"]
REQ_BOOT_STATUS_REPORT = ["13", "boot_report"] REQ_BOOT_STATUS_REPORT = ["13", "boot_report"]
START_UPDATE = ["42", "start_update"] START_UPDATE = ["42", "start_update"]
PERFORM_UPDATE = ["update"] PERFORM_UPDATE = ["update"]
@ -140,6 +141,7 @@ class Info(str, enum.Enum):
HK_TO_OBC = "Request HK from PLOC SUPV" HK_TO_OBC = "Request HK from PLOC SUPV"
REQUEST_HK = "Request HK set from PLOC Handler" REQUEST_HK = "Request HK set from PLOC Handler"
SET_TIME_REF = "Set time reference" SET_TIME_REF = "Set time reference"
FACTORY_FLASH = "Factory Flash Mode"
PERFORM_UPDATE = "Start or continue MPSoC SW update at starting bytes" PERFORM_UPDATE = "Start or continue MPSoC SW update at starting bytes"
START_UPDATE = "Start new MPSoC SW update" START_UPDATE = "Start new MPSoC SW update"
REQ_BOOT_STATUS_REPORT = "Request boot status report and HK" REQ_BOOT_STATUS_REPORT = "Request boot status report and HK"
@ -186,7 +188,7 @@ def add_ploc_supv_cmds(defs: TmtcDefinitionWrapper):
oce.add("43", "PLOC Supervisor: Terminate supervisor process") oce.add("43", "PLOC Supervisor: Terminate supervisor process")
oce.add("44", "PLOC Supervisor: Start MPSoC quiet") oce.add("44", "PLOC Supervisor: Start MPSoC quiet")
oce.add("45", "PLOC Supervisor: Set shutdown timeout") oce.add("45", "PLOC Supervisor: Set shutdown timeout")
oce.add("46", "PLOC Supervisor: Factory flash") oce.add(OpCodes.FACTORY_FLASH, Info.FACTORY_FLASH)
oce.add("47", "PLOC Supervisor: Enable auto TM") oce.add("47", "PLOC Supervisor: Enable auto TM")
oce.add("48", "PLOC Supervisor: Disable auto TM") oce.add("48", "PLOC Supervisor: Disable auto TM")
oce.add("51", "PLOC Supervisor: Logging request event buffers") oce.add("51", "PLOC Supervisor: Logging request event buffers")
@ -386,8 +388,8 @@ def pack_ploc_supv_commands(p: ServiceProviderParams):
q.add_log_cmd("PLOC Supervisor: Set shutdown timeout") q.add_log_cmd("PLOC Supervisor: Set shutdown timeout")
command = pack_set_shutdown_timeout_command(object_id.as_bytes) command = pack_set_shutdown_timeout_command(object_id.as_bytes)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command)) q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
if op_code == "46": if op_code in OpCodes.FACTORY_FLASH:
q.add_log_cmd("PLOC Supervisor: Factory flash") q.add_log_cmd(Info.FACTORY_FLASH)
command = object_id.as_bytes + struct.pack("!I", SupvActionIds.FACTORY_FLASH) command = object_id.as_bytes + struct.pack("!I", SupvActionIds.FACTORY_FLASH)
q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command)) q.add_pus_tc(PusTelecommand(service=8, subservice=128, app_data=command))
if op_code == "47": if op_code == "47":