diff options
author | Dean Camera <dean@fourwalledcubicle.com> | 2012-04-15 19:15:35 +0000 |
---|---|---|
committer | Dean Camera <dean@fourwalledcubicle.com> | 2012-04-15 19:15:35 +0000 |
commit | ce3db96d9a3d66fd517ccf395c0ba0a36f89f5cd (patch) | |
tree | 48f84d65004b86ddac93e16f1fa04b0d7a37ca4f | |
parent | 3703d50580c8b9ca3022e22be00b8b261d71bb3c (diff) | |
download | lufa-ce3db96d9a3d66fd517ccf395c0ba0a36f89f5cd.tar.gz lufa-ce3db96d9a3d66fd517ccf395c0ba0a36f89f5cd.tar.bz2 lufa-ce3db96d9a3d66fd517ccf395c0ba0a36f89f5cd.zip |
Make sure CRC value is pre-zeroed before reading from the XMEGA target device, to prevent corrupt data from being returned to the host in the AVRISP-MKII Clone project.
-rw-r--r-- | Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c b/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c index 97154ea1e..b78247583 100644 --- a/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c +++ b/Projects/AVRISP-MKII/Lib/XPROG/XMEGANVM.c @@ -174,6 +174,8 @@ void XMEGANVM_DisablePDI(void) */ bool XMEGANVM_GetMemoryCRC(const uint8_t CRCCommand, uint32_t* const CRCDest) { + *CRCDest = 0; + /* Wait until the NVM controller is no longer busy */ if (!(XMEGANVM_WaitWhileNVMControllerBusy())) return false; |