English
Language : 

PIC32MX440F256H-80I Datasheet, PDF (481/646 Pages) Microchip Technology – 64/100-Pin General Purpose and USB 32-Bit Flash Microcontrollers
PIC32MX3XX/4XX
EXAMPLE 21-3: WRITE UNLOCK SEQUENCE
// assume interrupts are disabled
// assume the DMA controller is suspended
// assume the device is locked
// starting critical sequence
SYSKEY = 0xaa996655;
// write first unlock key to SYSKEY
SYSKEY = 0x556699aa;
// write second unlock key to SYSKEY
RTCCONSET = 0x8;
// set RTCWREN in RTCCONSET
// end critical sequence
SYSKEY = 0x33333333;
// perform device re-lock
// can resume the DMA controller activity
// can re-enable interrupts
Note: To avoid accidental writes to the RTCC time values, it is recommended that the RTCWREN bit
(RTCCON<3>) is kept clear at any other time.
© 2008 Microchip Technology Inc.
Preliminary
DS61143E-page 479