From 5dd0c2a5cbf581747fa5f4b55e4b64a2e2d97715 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 5 Jun 2024 12:47:17 +0200 Subject: [PATCH] let's not do that for now.. --- CHANGELOG.md | 9 +++++++++ linux/payload/PlocSupvUartMan.cpp | 10 +++++++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 784ec061..8f92ffec 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,15 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +# [v8.1.1] 2024-06-05 + +## Added + +- PLOC SUPV MPSoC update re-try logic for the `WRITE_MEMORY` command. These packets form > 98% + of all packets required for a software update, but the update mechanism is not tolerant against + occasional glitches on the RS485 communication to the PLOC SUPV. A simple re-try mechanism which + tries to re-attempt packet handling up to three times for those packets is introduced. + # [v8.1.0] 2024-05-29 ## Fixed diff --git a/linux/payload/PlocSupvUartMan.cpp b/linux/payload/PlocSupvUartMan.cpp index f785ee57..cb93b4ec 100644 --- a/linux/payload/PlocSupvUartMan.cpp +++ b/linux/payload/PlocSupvUartMan.cpp @@ -465,7 +465,10 @@ ReturnValue_t PlocSupvUartManager::writeMemoryHandlingWithRetryLogic(supv::Write } triggerEvent(WRITE_MEMORY_FAILED, buildProgParams1(progPercent, update.sequenceCount), update.bytesWritten); + // Clear data structures related to reply handling. serial::flushTxRxBuf(serialPort); + recRingBuf.clear(); + decodedRingBuf.clear(); } return result; } @@ -577,10 +580,11 @@ ReturnValue_t PlocSupvUartManager::handlePacketTransmissionNoReply( ReturnValue_t status = handleUartReception(); if (status != returnvalue::OK) { result = status; - // We probably missed a packet or the communication was temporarily corrupted.. - // It probably would be good to bail immediately for re-try logic. if (result == HDLC_ERROR) { - return result; + // We could bail here immediately.. but I prefer to wait for the timeout, because we should + // ensure that all packets which might be related to the transfer are still received and + // cleared from all data structures related to reply handling. + // return result; } } if (not decodedQueue.empty()) {