Introduction
Author: Henrik M. Arnesen, Egil Rotevatn, Microchip Technology Inc. |
The Microchip AVR® EA Family of microcontrollers features Flash memory where the Flash is divided into one Read While Write (RWW) section and one Non Read While Write (NRWW) section, enabling the CPU to continue running instructions from the NRWW section while erasing or writing to the RWW section. Since the erase/write operations to Flash is timed in the order of milliseconds, the RWW functionality enables the user to utilize this time and not having to wait for it to finish. The purpose of this document is to describe how to use the NRWW Flash section to write to the RWW Flash section on AVR EA devices and why this is beneficial.
This technical brief explains the concept of RWW/NRWW and its implementation on the AVR EA Family of microcontrollers with the following use case:
Servicing Peripheral Interrupts While Writing Flash
- This example showcases the benefits of being able to write to RWW from NRWW Flash memory
- Different device pins are continuously toggled to show important events in the Erase/Write cycle
- The pins represent periodic interrupts, page buffer status, and Flash statuses
- The events have different occurrences when erasing and writing a program page in either NRWW or RWW areas