Skip to main content
. 2024 Feb 23;24(5):1447. doi: 10.3390/s24051447
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:

        userConfirmationGetUserConfirmationForUpdate()

  • 6:

        if not userConfirmation then

  • 7:

            return “User has cancelled the firmware update.”

  • 8:

        end if

  • 9:

        secureConnectionVerifyInternalNetworkConnectionWithECU()

  • 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