28.2.70 __builtin_write_NVM

Description

Enables the Flash for writing by issuing the correct unlock sequence and enabling the Write bit of the NVMCON register.

Interrupts may need to be disabled for proper operation.

This builtin function can be used as a part of a complex sequence discussed in your device data sheet or Family Reference Manual (FRM). See these documents for more information.

Prototype

void ___builtin_write_NVM(void);

Argument

None

Return Value

None

Assembler Operator/ Machine Instruction

mov   #0x55, Wn
mov   Wn, _NVMKEY
mov   #0xAA, Wn
mov   Wn, _NVMKEY
bset  _NVMCON, #15
nop
nop

Error Messages

None