28.2.157 __builtin_write_RTCWEN

Architecture

dsPIC33C/E/F, dsPIC30

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_RTCWEN(void);

Argument

None

Return Value

None

Example Instruction Sequence

mov   #0x55,w0
mov   w0,_NVMKEY
mov   #0xAA,w0
mov   w0,_NVMKEY
bset  _RCFGCAL,#13
nop
nop

Error Messages

None