Real-Time Clock Operation
14-4
Real Time Clock
14.2 Real-Time Clock Operation
The Real-Time Clock module can be configured as a real-time clock with
calendar function or as a 32-bit general-purpose counter with the RTCMODEx
bits.
14.2.1 Counter Mode
Counter mode is selected when RTCMODEx < 11. In this mode, a 32-bit
counter is provided that is directly accessible by software. Switching from
calendar to counter mode resets the count value.
The clock to increment the counter can be sourced from ACLK, SMCLK, or
from the BTCNT2 input clock divided by 128 from the Basic Timer1 module,
selected by the RTCMODEx bits. The counter can be stopped by setting the
RTCHOLD bit.
Four individual 8-bit counters are cascaded to provide the 32-bit counter. This
provides interrupt triggers at 8-bit, 16-bit, 24-bit, and 32-bit overflows. Each
counter RTCNT1 - RTCNT4 is individually accessible and may be read or
written to.
Note: Accessing the RTCNTx registers
When the counter clock is asynchronous to the CPU clock, any read from any
RTCNTx register should occur while the counter is not operating. Otherwise,
the results may be unpredictable. Alternatively, the counter may be read
multiple times while operating, and a majority vote taken in software to
determine the correct reading. Any write to any RTCNTx register takes effect
immediately.
Summary of Contents for MSP430x4xx Family
Page 1: ...MSP430x4xx Family 2007 Mixed Signal Products User s Guide SLAU056G ...
Page 2: ......
Page 6: ...vi ...
Page 114: ...3 76 RISC 16 Bit CPU ...
Page 304: ...5 20 FLL Clock Module ...
Page 340: ...7 8 Supply Voltage Supervisor ...
Page 348: ...8 8 16 Bit Hardware Multiplier ...
Page 372: ...9 24 32 Bit Hardware Multiplier ...
Page 400: ...10 28 DMA Controller ...
Page 428: ...13 10 Basic Timer1 ...
Page 466: ...15 24 Timer_A ...
Page 522: ...17 30 USART Peripheral Interface UART Mode ...
Page 544: ...18 22 USART Peripheral Interface SPI Mode ...
Page 672: ...23 12 Comparator_A ...
Page 692: ...24 20 LCD Controller ...
Page 746: ...26 28 ADC12 ...