Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
bootloader: Go to sleep during SPM write operation
Atmel confirms there is a hardware bug that can, under some unknown set of circumstances, overwrite the program counter when writing to the second half of the flash on the ATMEGA64/128/256 RFR2 and 4RFR2 family. As a workaround, it helps to sleep during the SPM operation (waiting for the SPM complete interrupt to wake us up), since the bug requires reads from flash to trigger. It should only affect flash writes, but this applies the sleep trick to page erases as well, just for good measure. This fix was originally created by Geoff and improved by Matthijs.
- Loading branch information