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); }