11.3.3.1 Main Counter Tick PRS Output
To output the ticks for the main counter on PRS, it is possible to use a Capture/Compare channel and mask all the bits, i.e.
RTCC_CCx_CTRL_COMPBASE=CNT and RTCC_CCx_CTRL_COMPMASK=31. PRS output of main counter ticks does not work if
the main counter is not prescaled.
Note:
To be able to mask all bits in the main counter, RTCC_CTRL_CNTMODE has to be set to CALENDAR. In NORMAL mode, the least
significant bit can not be masked out.
11.3.4 Energy Mode Availability
The RTCC is available in all Energy Modes except EM4S. To enable RTCC operation in EM4H, the EMU_EM4CTRL register in the
EMU has to be configured. Any enabled RTCC interrupt will wake the system up from EM4H; if EM4WU if RTCC_EM4WUEN is set.
Refer to
9. EMU - Energy Management Unit
for details on how to configure the EMU.
11.3.5 Register Lock
To prevent accidental writes to the RTCC registers, the RTCC_LOCKKEY register can be written to any other value than the unlock
value. To unlock the register, write the unlock value to RTCC_LOCKKEY. Registers affected by this lock are:
• RTCC_CTRL
• RTCC_PRECNT
• RTCC_CNT
• RTCC_TIME
• RTCC_DATE
• RTCC_IEN
• RTCC_POWERDOWN
• RTCC_CCx_CTRL
• RTCC_CCx_CCV
• RTCC_CCx_TIME
• RTCC_CCx_DATE
11.3.6 Oscillator Failure Detection
To be able to detect OSC failure, the RTCC includes a security mechanism ensuring that at least three OSC cycles are detected within
one period of the ULFRCO. If no OSC cycles are detected, the OSCFAIL interrupt flag is set. OSC failure detection is enabled by set-
ting the OSCFDETEN bit in RTCC_CTRL.
11.3.7 Retention Registers
The RTCC includes 32 x 32 bit registers which can be retained in all energy modes except EM4S. The registers are accessible through
the RETx_REG registers. Retention is by default enabled in EM0 Active through EM4 Hibernate/Shutoff. The registers can be shut off
to save power by setting the RAM bit in RTCC_POWERDOWN.
Note:
The retention registers are mapped to a RAM instance and have undefined state out of reset.
11.3.8 Frame Controller Interface
For easy timestamping of frames, RTCC_CC2_CCV is directly available for the Frame Controller, FRC.
11.3.9 Debug Session
By default, the RTCC is halted when code execution is halted from the debugger. By setting the DEBUGRUN bit in the RTCC_CTRL
register, the RTCC will continue to run even when the debugger has halted the system.
EFM32JG1 Reference Manual
RTCC - Real Time Counter and Calendar
silabs.com
| Smart. Connected. Energy-friendly.
Preliminary Rev. 0.6 | 298