| Algorithm 3 Firmware update algorithm |
-
1:
procedure UpdateFirmwareInMCU(firmware)
-
2:
if not IsVehicleParked() then
-
3:
return “Vehicle is not in a parked state.”
-
4:
end if
-
5:
← GetUserConfirmationForUpdate()
-
6:
if not userConfirmation then
-
7:
return “User has cancelled the firmware update.”
-
8:
end if
-
9:
← VerifyInternalNetworkConnectionWithECU()
-
10:
if not secureConnection then
-
11:
return “Failed to establish a secure network connection with the internal ECU.”
-
12:
end if
-
13:
UploadToFirmware(MCU, firmware)
-
14:
VerifyUpdateSuccess()
-
15:
PerformPostProcessing()
-
16:
end procedure
|