From 931b0b430c4c749035d2eae1d393b2ab3979a3e9 Mon Sep 17 00:00:00 2001 From: Nav Date: Mon, 4 Oct 2021 21:32:01 +0100 Subject: [PATCH] Disabled use of masked memory read command for the MPLAB Snap --- src/DebugToolDrivers/Microchip/MplabSnap/MplabSnap.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/DebugToolDrivers/Microchip/MplabSnap/MplabSnap.cpp b/src/DebugToolDrivers/Microchip/MplabSnap/MplabSnap.cpp index 857ed812..9e23a704 100644 --- a/src/DebugToolDrivers/Microchip/MplabSnap/MplabSnap.cpp +++ b/src/DebugToolDrivers/Microchip/MplabSnap/MplabSnap.cpp @@ -30,6 +30,16 @@ void MplabSnap::init() { } this->edbgAvr8Interface = std::make_unique(this->edbgInterface); + + /* + * The MPLAB Snap doesn't seem to operate correctly when actioning the masked memory read command. The data + * returned in response to the command appears to be completely incorrect. It may be a bug in the firmware. + * + * For the above reason, we avoid using the masked memory read command by implementing the masking on our end. + * See the EdbgAvr8Interface class for more. + */ + this->edbgAvr8Interface->setAvoidMaskedMemoryRead(true); + this->setInitialised(true); }