Chapter 18

Flash Memory

Abstract

This chapter describes how to save data to the PIC32’s nonvolatile flash memory, so that data and settings are retained when the PIC32 is power cycled. This is also known as run-time self-programming (RTSP). The procedures for unlocking access to flash memory, erasing flash memory, writing to flash memory, and reading from flash memory using the special function registers (SFRs) are given. The chapter concludes with a library for writing and reading flash memory that the reader can use in their applications.

Keywords

Flash memory

Program memory

Nonvolatile memory (NVM)

Flash memory retains its contents even when powered off. So far, we have used this nonvolatile memory (NVM) to store your programs and the ...

Get Embedded Computing and Mechatronics with the PIC32 Microcontroller now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.