EIR-OPS-006.7: EMOD Reprogramming
Objective
To reprogramme EMOD with an EMOD experiment firmware.
Introduction
Using this procedure the Operator will write an EMOD experiment firmware image to the EMOD MSP.
Procedure
This procedure has the following subsections:
Note
A communication pass is required for Sections B - F of this procedure.
A. Pre-pass Preparations
A.1.
Prior to the pass in which we reprogramme the MSP, the Operators must ensure they have access to details on the image to be programmed.
These details must include:
The length of the image in rows (needed for Step B.12.), and
The CRC of the image (Step B.14.).
Note
As this image is already stored in the OBC’s flash memory, no image file or image uplink is required for this procedure.
A.2.
If not already known, the Operators should now consult with the Software Engineer to determine:
The flight-ready ADM firmware version (needed for Step B.4),
The ID of the OBC flash channel that holds EMOD’s experiment firmware (Step B.8), and
The flight-ready EMOD firmware version (Step D.1).
B. Rewrite Preparations
Important
You are about to send the first TC of this procedure - Have you completed the EIR-OPS-003: Start a Communication Pass procedure? A Communication Pass must be started prior to carrying out the operations planned for the pass. Don’t forget to open and set-up the parameters/actions that will be required before the pass starts!
B.1.
To first check if the EMOD MSP is powered on,
Gettheplatform.EPS.actualSwitchStatesparameter, withFirst row=Last row= 9.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
Yes |
Data Info |
|
Allowed Value(s) |
0-9, 0-9 |
Expected Value(s) |
9, 9 |
TM Details |
|
Data Expected from TC |
|
Data Size |
Boolean |
Data Info |
SwitchState = 0 (Off), SwitchState=1 (On) |
Allowed Value(s) |
0-1 |
B.2.
If the TM returned from the above step shows that the MSP is powered ON (i.e. if 1 is returned), proceed now to Step B.4.
Else,
Invoketheplatform.EPS.TurnOnEMODaction.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
No |
TM Details |
|
Data Expected from TC |
No ( + ACK ) |
B.3.
To confirm that the MSP is now powered on, again
Gettheplatform.EPS.actualSwitchStatesparameter, withFirst row=Last row= 9.Ensure that row 9/PDM 10 of the parameter is now equal to 1 (i.e. ensure that the EMOD PDM is powered on).
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
Yes |
Data Info |
|
Allowed Value(s) |
0-9, 0-9 |
Expected Value(s) |
9, 9 |
TM Details |
|
Data Expected from TC |
|
Data Size |
Boolean |
Data Info |
SwitchState = 0 (Off), SwitchState=1 (On) |
Allowed Value(s) |
0-1 |
Expected Value(s) |
1 |
B.4.
Gettheplatform.ADM.FirmwareVersionparameter to further confirm that EMOD is powered ON and that the ADM firmware currently on the MSP is responsive.Confirm the returned data is as expected given the expected ADM firmware version determined in Section A.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
No |
TM Details |
|
Data Expected from TC |
|
Data Size |
2 bytes |
Data Info |
The version of the ADM firmware currently on the MSP |
Allowed Value(s) |
0000 - FFFF (hex) |
Expected Value(s) |
Firmware version from Section A |
B.5.
Gettheplatform.obc.EMODSerial.baudRateParamparameter.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
No |
TM Details |
|
Data Expected from TC |
|
Data Size |
4 bytes |
Data Info |
The baud rate used for EMOD serial communications |
Allowed Value(s) |
00000000 - FFFFFFFF (hex) |
Expected Value(s) |
125000 (dec) |
B.6.
When the EMOD firmware is operating in experiment mode, the serial port will be used for science data transfer and it will do this at a high baud rate (125 KBaud). However, a lower baud rate of 9600 Baud is required for reprogramming the MSP.
Therefore, the Operator must now
Settheplatform.obc.EMODSerial.baudRateParamparameter to 9600 (decimal).
Note
The Operator should be aware of the fact that multiple different SCDB paths are used for this procedure (i.e. payload.EMOD, platform.obc.EMODSerial and payload.FirmwareImageAccess). However, this is not a major concern as it will become obvious if an SCDB is mistaken as the parameter/action will only exist in the correct SCDB path.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
Yes |
Data Info |
The desired baud rate for EMOD serial communications |
Allowed Value(s) |
00000000 - FFFFFFFF (hex) |
Expected Value(s) |
9600 (dec) / 0x2580 (hex) |
TM Details |
|
Data Expected from TC |
No ( + ACK ) |
B.7.
Confirm the
Setin the previous step with aGet(i.e. confirm the value was set successfully).
B.8.
To programme an image from the OBC onto the MSP, the desired image must first be loaded from an OBC storage channel to the buffer provided in
payload.FirmwareImageAccess.To start this, first
Setthepayload.FirmwareImageAccess.ImageStorageChIDparameter to the OBC flash channel ID, corresponding to the channel with the EMOD experiment firmware, as determined in Section A.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
Yes |
Data Info |
ID of the storage channel from where the firmware is to be loaded |
Allowed Value(s) |
0000 - FFFF (hex) |
Expected Value(s) |
Flash channel ID from Section A |
TM Details |
|
Data Expected from TC |
No ( + ACK ) |
B.9.
Confirm the
Setin the previous step with aGet(i.e. confirm the value was set successfully).
B.10.
Before loading the firmware to the buffer
Invokethepayload.FirmwareImageAccess.ClearImageBufferaction to clear any previous data being held in the buffer.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
No |
TM Details |
|
Data Expected from TC |
No ( + ACK ) |
B.11.
The buffer should now be empty. However, to verify this,
Querythepayload.FirmwareImageAccess.ImageBufferparameter.Ensure that 0 (rows) is returned.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
No |
TM Details |
|
Data Expected from TC |
Rows ( + ACK ) |
Data Size |
2 bytes |
Data Info |
The number of rows of data in the buffer |
Allowed Value(s) |
0000 - FFFF (Hex) |
Expected Value |
0 |
B.12.
Now,
Invokethepayload.FirmwareImageAccess.LoadImageFromStorageaction with the input argument,Last row= (the size of the image in rows - 1).Refer to Section A for the size of the image in rows.
Warning
MCS does not allow the Operator to provide a decimal action argument for this action. Operators will need to input the action argument (i.e. Last row ) in hexadecimal format.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
Yes |
Data Info |
|
TM Details |
|
Data Expected from TC |
No ( + ACK ) |
B.13.
Again,
Querythepayload.FirmwareImageAccess.ImageBufferparameter.Ensure the data equals the size of the image (in rows).
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
No |
TM Details |
|
Data Expected from TC |
Rows ( + ACK ) |
Data Size |
2 bytes |
Data Info |
The number of rows of data in the buffer |
Allowed Value(s) |
0000 - FFFF (Hex) |
Expected Value |
|
B.14.
The image has now been loaded from the storage channel to the
ImageBuffer.As a final verification before reprogramming that the image in the buffer is as expected (i.e. the same as what was originally uplinked to the spacecraft),
Getthepayload.FirmwareImageAccess.ImageCRCparameter and ensure that the data returned is equal to the CRC calculated on the ground (see Section A).
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
No |
TM Details |
|
Data Expected from TC |
|
Data Size |
4 bytes |
Data Info |
CRC for the data currently being held in the |
Allowed Value(s) |
00000000 - FFFFFFFF (hex) |
Expected Value(s) |
Image CRC from Section A |
C. Reprogramming the MSP
C.1.
The final step prior to reprogramming the MSP is to
Getthepayload.EMOD.LineNoLastProgrammedparameter.Confirm that 0 is returned.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
No |
TM Details |
|
Data Expected from TC |
|
Data Size |
2 bytes |
Data Info |
Line number last programmed from the OBC to the MSP |
Allowed Value(s) |
0000 - FFFF (hex) |
Expected Value(s) |
0 |
C.2.
To now start the reprogramming process,
Invokethepayload.EMOD.FirmwareReprogrammeaction to first erase the firmware currently on the MSP.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
No |
TM Details |
|
Data Expected from TC |
No ( + ACK ) |
C.3.
Wait ~10 seconds to allow the firmware on the MSP to be erased.
C.4.
Invokethepayload.EMOD.FirmwareReprogrammeaction again to programme the data in thepayload.FirmwareImageAccess.ImageBufferto the MSP.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
No |
TM Details |
|
Data Expected from TC |
No ( + ACK ) |
C.5.
Get, and continue toGet, thepayload.EMOD.LineNoLastProgrammedparameter until the TM returned equals the size of the image in rows.Refer to Step A.1 for the size of the image in rows.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
No |
TM Details |
|
Data Expected from TC |
|
Data Size |
4 bytes |
Data Info |
Line number last programmed from the OBC to the MSP |
Allowed Value(s) |
0000 - FFFF (hex) |
Expected Value(s) |
Increasing until equal to the size of the image in rows |
Note
The reprogramming will take ~minutes. At the end of the reprogramming process, the MSP will automatically be reset and will be ready for Image Verification (Section D).
D. Image Verification
D.1.
Getthepayload.EMOD.FirmwareVersionparameter.Ensure that the returned data is as expected given the expected EMOD firmware version determined in Section A.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
No |
TM Details |
|
Data Expected from TC |
|
Data Size |
3 bytes |
Data Info |
the version of the firmware currently on the MSP |
Allowed Value(s) |
0000 - FFFF (hex) |
Expected Value(s) |
EMOD firmware version from Section A |
E. Post-Programming
E.1.
When the firmware on the MSP is operating in an experiment mode, the serial port is used for science data transfer and does this at a high baud rate (125 KBaud). However, a lower baud rate of 9600 Baud is required for reprogramming the MSP.
Therefore, the Operator must now
Settheplatform.obc.EMODSerial.baudRateParamparameter back to 125000 Baud (decimal).
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Action/Param ID |
1222 |
Data Expected with TC |
Yes |
Data Info |
the desired baud rate |
Allowed Value(s) |
00000000 - FFFFFFFF (hex) |
Expected Value(s) |
125000 (dec) |
TM Details |
|
Data Expected from TC |
No ( + ACK ) |
E.2.
Confirm the
Setin the previous step with aGet(i.e. confirm the value was set successfully).
E.3.
In preparation for the next reprogramming,
Setthepayload.EMOD.LineNoLastProgrammedparameter back to 0.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Action/Param ID |
1222 |
Data Expected with TC |
Yes |
Data Info |
Line number last programmed from the OBC to the MSP |
Allowed Value(s) |
0000 - FFFF (hex) |
Expected Value(s) |
0 |
TM Details |
|
Data Expected from TC |
No ( + ACK ) |
E.4.
Confirm the
Setin the previous step with aGet(i.e. confirm the value was set successfully).
E.5.
Reprogramming the EMOD MSP with EMOD experiment firmware is now complete.
The Operator should now proceed with one of the sub-procedures listed in EIR-OPS-006: Commissioning that is yet to be completed.
Note
The sub-procedures listed in EIR-OPS-006: Commissioning do not necessarily need to be carried out in the order given. However, procedures ending in ‘Operation’ should only be completed after the relevant ‘Health Check’ procedure for that subsystem has been performed. The ‘EMOD Reprogramming’ procedure must also be performed prior to any EMOD activities. Lastly, ideally, payload operations should be the last item to consider in the commissioning of the spacecraft.
Alternatively, if all sub-procedures listed in EIR-OPS-006: Commissioning have been successfully completed, the Operator may now proceed to EIR-OPS-012: Set Up Nominal Operations.
F. Turn Off EMOD
Important
The Operator may now choose to 1) turn off the EMOD payload and set it up again later via the EIR-OPS-022: EMOD Configuration procedure, 2) leave EMOD powered on and experiment running as is, OR 3) leave EMOD powered on but reconfigure the experiment settings via the EIR-OPS-022: EMOD Configuration procedure. If the first option is preferred, the Operator should now proceed with this section of the procedure to power off the EMOD payload. If the operator plans to proceed shortly to EIR-OPS-006.8: EMOD Health Check then they should skip this section of the procedure.
F.1.
To turn off EMOD,
Invokethe actionplatform.EPS.turnOffEMOD.
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Data Expected with TC |
Yes |
TM Details |
|
Data Expected from TC |
No ( + ACK ) |
F.2.
To ensure the EMOD PDM (i.e PDM 10) is now off,
Getthe parameterplatform.EPS.actualSwitchStates, withFirst row=Last row= 9.Ensure that PDM 10/row 9 = 0 (off).
TC Details |
|
MCS Operation |
|
Action/Param Name |
|
Action/Param ID |
1222 |
Data Expected with TC |
Yes |
Data Info |
|
Allowed Value(s) |
0-9, 0-9 |
Expected Value(s) |
9, 9 |
TM Details |
|
Data Expected from TC |
|
Data Size |
Boolean |
Data Info |
SwitchState = 0 (Off), SwitchState=1 (On) |
Allowed Value(s) |
0-1 |
Expected Value(s) |
0 |
END OF PROCEDURE