28.2.77 __builtin_write_RTCC_WRLOCK

Description

Used to write to the RTCC Timer by implementing the unlock sequence by writing the correct unlock values to NVMKEY, and then setting the RTCWREN bit of RCFGCAL SFR. 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_RTCC_WRLOCK(void);

Argument

None

Return Value

None

Assembler Operator/ Machine Instruction

mov   #0x55,w0 
mov   w0,_NVMKEY 
mov   #0xAA,w0 
mov   w0,_NVMKEY 
bclr  _RTCCON1L,#11 
nop 
nop

Error Messages

None