3.18.3 NVMCTRL with Write-Protect

Non-Volatile Memory Controller with Write-Protect and Operation registers.

3.18.3.1 Introduction

The NVM module provides run-time read and write access to the Program Flash Memory (PFM), Data Flash Memory (DFM) and Configuration bits. PFM includes the program memory and user ID space while DFM is also referred to as EEPROM which is accessed one byte at a time and the erase before write is automatic. This NVM Module features a write-protect register that protects the memory registers from accidental writes.

3.18.3.2 Supported Device Families

PIC18F-Q40PIC18F-Q41PIC18F-Q43PIC18F-Q71
PIC18F-Q83PIC18F-Q84

3.18.3.3 Required header files:


#include "mcc_generated_files/nvm/nvm.h"

3.18.3.4 How to use the Memory Driver

The Memory driver can be used to access different types of memory. Click the links below to view examples on how to access the Flash and EEPROM memory.

3.18.3.6 File Documentation

3.18.3.6.1 source/nvm_example.dox File Reference

3.18.3.6.2 source/nvm_interrupt.c File Reference

#include "../nvm.h"

Functions

Variable Documentation

NVM_Callback

void(* NVM_Callback) (void) = NULL[static]

unlockKeyHigh

__near static volatile uint8_t unlockKeyHigh[static]

unlockKeyLow

__near static volatile uint8_t unlockKeyLow[static]

3.18.3.6.3 source/nvm_interrupt.h File Reference

#include <xc.h>
#include <stdbool.h>

Functions

Typedefs

3.18.3.6.4 source/nvm_polling.c File Reference

#include "../nvm.h"

Functions

Variable Documentation

unlockKeyHigh

__near static volatile uint8_t unlockKeyHigh[static]

unlockKeyLow

__near static volatile uint8_t unlockKeyLow[static]

3.18.3.6.5 source/nvm_polling.h File Reference

#include <xc.h>
#include <stdbool.h>

Functions

Typedefs

Enumeration Type Documentation

nvm_status_t

enum nvm_status_t

NVM_OK

0 - The NVM operation succeeded.

NVM_ERROR

1 - The NVM operation failed.

NVM_OK

0 - The NVM operation succeeded.

NVM_ERROR

1 - The NVM operation failed.