diff options
Diffstat (limited to 'src/Hardware/NonVolatileMemory.cpp')
-rw-r--r-- | src/Hardware/NonVolatileMemory.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Hardware/NonVolatileMemory.cpp b/src/Hardware/NonVolatileMemory.cpp index 72b91bd5..d0534821 100644 --- a/src/Hardware/NonVolatileMemory.cpp +++ b/src/Hardware/NonVolatileMemory.cpp @@ -75,7 +75,12 @@ void NonVolatileMemory::EnsureWritten() noexcept if (state == NvmState::writeNeeded) { # if SAM4E || SAM4S || SAME70 + const bool cacheEnabled = Cache::Disable(); flash_write_user_signature(reinterpret_cast<const uint32_t*>(&buffer)); + if (cacheEnabled) + { + Cache::Enable(); + } # elif defined(__LPC17xx__) LPC_WriteSoftwareResetData(slot, buffer, sizeof(buffer)); # else |