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, Get the platform.EPS.actualSwitchStates parameter, with First row = Last row = 9.

TC Details

MCS Operation

Get

Action/Param Name

platform.EPS.actualSwitchStates

Data Expected with TC

Yes

Data Info

First Row , Last Row

Allowed Value(s)

0-9, 0-9

Expected Value(s)

9, 9

TM Details

Data Expected from TC

actualSwitchStates ( + ACK )

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, Invoke the platform.EPS.TurnOnEMOD action.

TC Details

MCS Operation

Invoke

Action/Param Name

platform.EPS.TurnOnEMOD

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 Get the platform.EPS.actualSwitchStates parameter, with First 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

Get

Action/Param Name

platform.EPS.actualSwitchStates

Data Expected with TC

Yes

Data Info

First Row , Last Row

Allowed Value(s)

0-9, 0-9

Expected Value(s)

9, 9

TM Details

Data Expected from TC

actualSwitchStates ( + ACK )

Data Size

Boolean

Data Info

SwitchState = 0 (Off), SwitchState=1 (On)

Allowed Value(s)

0-1

Expected Value(s)

1


B.4.

  • Get the platform.ADM.FirmwareVersion parameter 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

Get

Action/Param Name

platform.ADM.FirmwareVersion

Data Expected with TC

No

TM Details

Data Expected from TC

FirmwareVersion ( + ACK )

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.

  • Get the platform.obc.EMODSerial.baudRateParam parameter.

TC Details

MCS Operation

Get

Action/Param Name

platform.obc.EMODSerial.baudRateParam

Data Expected with TC

No

TM Details

Data Expected from TC

baudRateParam ( + ACK )

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 Set the platform.obc.EMODSerial.baudRateParam parameter 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

Set

Action/Param Name

platform.obc.EMODSerial.baudRateParam

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 Set in the previous step with a Get (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 Set the payload.FirmwareImageAccess.ImageStorageChID parameter to the OBC flash channel ID, corresponding to the channel with the EMOD experiment firmware, as determined in Section A.

TC Details

MCS Operation

Set

Action/Param Name

payload.FirmwareImageAccess.ImageStorageChID

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 Set in the previous step with a Get (i.e. confirm the value was set successfully).


B.10.

  • Before loading the firmware to the buffer Invoke the payload.FirmwareImageAccess.ClearImageBuffer action to clear any previous data being held in the buffer.

TC Details

MCS Operation

Invoke

Action/Param Name

payload.FirmwareImageAccess.ClearImageBuffer

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, Query the payload.FirmwareImageAccess.ImageBuffer parameter.

  • Ensure that 0 (rows) is returned.

TC Details

MCS Operation

Query

Action/Param Name

payload.FirmwareImageAccess.ImageBuffer

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, Invoke the payload.FirmwareImageAccess.LoadImageFromStorage action 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

Invoke

Action/Param Name

payload.FirmwareImageAccess.LoadImageFromStorage

Data Expected with TC

Yes

Data Info

Last row = (the size of the image in rows from Section A - 1)

TM Details

Data Expected from TC

No ( + ACK )


B.13.

  • Again, Query the payload.FirmwareImageAccess.ImageBuffer parameter.

  • Ensure the data equals the size of the image (in rows).

TC Details

MCS Operation

Query

Action/Param Name

payload.FirmwareImageAccess.ImageBuffer

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

Last row + 1


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), Get the payload.FirmwareImageAccess.ImageCRC parameter and ensure that the data returned is equal to the CRC calculated on the ground (see Section A).

TC Details

MCS Operation

Get

Action/Param Name

payload.FirmwareImageAccess.ImageCRC

Data Expected with TC

No

TM Details

Data Expected from TC

ImageCRC ( + ACK )

Data Size

4 bytes

Data Info

CRC for the data currently being held in the ImageBuffer

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 Get the payload.EMOD.LineNoLastProgrammed parameter.

  • Confirm that 0 is returned.

TC Details

MCS Operation

Get

Action/Param Name

payload.EMOD.LineNoLastProgrammed

Data Expected with TC

No

TM Details

Data Expected from TC

LineNoLastProgrammed ( + ACK )

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, Invoke the payload.EMOD.FirmwareReprogramme action to first erase the firmware currently on the MSP.

TC Details

MCS Operation

Invoke

Action/Param Name

payload.EMOD.FirmwareReprogramme

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.

  • Invoke the payload.EMOD.FirmwareReprogramme action again to programme the data in the payload.FirmwareImageAccess.ImageBuffer to the MSP.

TC Details

MCS Operation

Invoke

Action/Param Name

payload.EMOD.FirmwareReprogramme

Data Expected with TC

No

TM Details

Data Expected from TC

No ( + ACK )


C.5.

  • Get , and continue to Get , the payload.EMOD.LineNoLastProgrammed parameter 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

Get

Action/Param Name

payload.EMOD.LineNoLastProgrammed

Data Expected with TC

No

TM Details

Data Expected from TC

LineNoLastProgrammed ( + ACK )

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.

  • Get the payload.EMOD.FirmwareVersion parameter.

  • Ensure that the returned data is as expected given the expected EMOD firmware version determined in Section A.

TC Details

MCS Operation

Get

Action/Param Name

payload.EMOD.FirmwareVersion

Data Expected with TC

No

TM Details

Data Expected from TC

FirmwareVersion ( + ACK )

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 Set the platform.obc.EMODSerial.baudRateParam parameter back to 125000 Baud (decimal).

TC Details

MCS Operation

Set

Action/Param Name

platform.obc.EMODSerial.baudRateParam

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 Set in the previous step with a Get (i.e. confirm the value was set successfully).


E.3.

  • In preparation for the next reprogramming, Set the payload.EMOD.LineNoLastProgrammed parameter back to 0.

TC Details

MCS Operation

Set

Action/Param Name

payload.EMOD.LineNoLastProgrammed

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 Set in the previous step with a Get (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.



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, Invoke the action platform.EPS.turnOffEMOD.

TC Details

MCS Operation

Invoke

Action/Param Name

platform.EPS.turnOffEMOD

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, Get the parameter platform.EPS.actualSwitchStates , with First row = Last row = 9.

  • Ensure that PDM 10/row 9 = 0 (off).

TC Details

MCS Operation

Get

Action/Param Name

platform.EPS.actualSwitchStates

Action/Param ID

1222

Data Expected with TC

Yes

Data Info

First row, Last row

Allowed Value(s)

0-9, 0-9

Expected Value(s)

9, 9

TM Details

Data Expected from TC

actualSwitchStates ( + ACK )

Data Size

Boolean

Data Info

SwitchState = 0 (Off), SwitchState=1 (On)

Allowed Value(s)

0-1

Expected Value(s)

0


END OF PROCEDURE