SWCU193 April 2023 CC2340R2 , CC2340R5 , CC2340R5-Q1
Table 12-1 lists the memory-mapped registers for the RTC registers. All register offset addresses not listed in Table 12-1 should be considered as reserved locations and the register contents should not be modified.
Offset | Acronym | Register Name | Section |
---|---|---|---|
0h | DESC | Module Description | Go |
4h | CTL | RTC control Register | Go |
8h | ARMSET | Channel Arming Set | Go |
Ch | ARMCLR | Channel Arming Clear | Go |
18h | TIME8U | RTC Lower Time Slice | Go |
1Ch | TIME524M | RTC Upper Time Slice | Go |
28h | CH0CC8U | Channel0 compare value | Go |
38h | CH1CC8U | Channel1 capture Value | Go |
3Ch | CH1CFG | channel1 Input Configuration | Go |
44h | IMASK | Interrupt mask | Go |
48h | RIS | Raw interrupt status | Go |
4Ch | MIS | Masked interrupt status | Go |
50h | ISET | Interrupt set | Go |
54h | ICLR | Interrupt clear | Go |
58h | IMSET | Interrupt mask set | Go |
5Ch | IMCLR | Interrupt clear | Go |
60h | EMU | Emulation | Go |
Complex bit access types are encoded to fit into small table cells. Table 12-2 shows the codes that are used for access types in this section.
Access Type | Code | Description |
---|---|---|
Read Type | ||
R | R | Read |
Write Type | ||
W | W | Write |
Reset or Default Value | ||
-n | Value after reset or the default value |
DESC is shown in Table 12-3.
Return to the Summary Table.
Description Register. This register provides IP module ID, revision information, instance index and standard MMR registers offset.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-16 | MODID | R/W | 6442h | Module identifier used to uniquely identify this IP. |
15-12 | STDIPOFF | R/W | 1h | Standard IP MMR block offset. Standard IP MMRs are the set of from aggregated IRQ registers till DTB. 0: Standard IP MMRs do not exist 0x1-0xF: Standard IP MMRs begin at offset of (64*STDIPOFF from the base IP address) |
11-8 | INSTIDX | R/W | 0h | IP Instance ID number. If multiple instances of IP exist in the device, this field can identify the instance number (0-15). |
7-4 | MAJREV | R/W | 1h | Major revision of IP (0-15). |
3-0 | MINREV | R/W | 0h | Minor revision of IP (0-15). |
CTL is shown in Table 12-4.
Return to the Summary Table.
RTC Control register. This register controls resetting the of RTC counter
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-1 | RESERVED | R | 0h | Reserved |
0 | RST | W | 0h | RTC counter reset. Writing 1 to this bit will reset the RTC counter, and cause it to resume counting from 0x0
0h = No effect 1h = Reset the timer. |
ARMSET is shown in Table 12-5.
Return to the Summary Table.
RTC channel mode set register. Read to each bit field of this register provides the current channel mode.
- Read of 1'b0 indicates the channel is unarmed.
- Read of 1'b1 indicates the channel is either in capture or compare mode.
A write to each bitfield of this register the following effect:
- Write of 1'b0 has no effect on channel mode.
- Write of 1'b1 has no effect on the compare channel. While write of 1'b1 for capture channel will arm it in capture mode if it is disabled.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-2 | RESERVED | R | 0h | Reserved |
1 | CH1 | R/W | 0h | Arming Channel 1 for capture operation.
0h = No effect on the channel 1h = Enable the Channel 1 for capture operation |
0 | CH0 | R/W | 0h | No effect on arming the channel. Read will give the status of the Channel 0.
0h = No effect on the channel 1h = No effect on the compare channel |
ARMCLR is shown in Table 12-6.
Return to the Summary Table.
RTC channel mode clear register. Read to each bit field of this register provides the current channel mode.
- Read of 1'b0 indicates the channel is unarmed.
- Read of 1'b1 indicates the channel is either in capture or compare mode.
A write to each bitfield of this register the following effect:
- Write of 1'b0 has no effect on channel mode.
- Write of 1'b1 for capture/compare channel will disarm it without triggering event unless a compare/capture event happens in the same cycle.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-2 | RESERVED | R | 0h | Reserved |
1 | CH1 | R/W | 0h | Disarming Channel 1
0h = No effect on the channel 1h = Set channel in UNARMED state without triggering event unless a capture event happens in the same cycle |
0 | CH0 | R/W | 0h | Disarming Channel 0
0h = No effect on the channel 1h = Set channel in UNARMED state without triggering event unless a compare event happens in the same cycle |
TIME8U is shown in Table 12-7.
Return to the Summary Table.
RTC Time value register. 32-bit unsigned integer representing [34:3] time slice of the real time clock counter. The counter runs on LFCLK. This field has a resolution of 8us, and range of about 9.5 hours.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-0 | VAL | R | 0h | Unsigned integer representing [34:3]slice of real time counter. |
TIME524M is shown in Table 12-8.
Return to the Summary Table.
RTC time value register. 32-bit unsigned integer representing [50:19] time slice of the real time clock counter. This field has a resolution of about 0.5s and a range of about 71.4 years.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-0 | VAL | R | 0h | Unsigned integer representing. [50:19]slice of real time counter. |
CH0CC8U is shown in Table 12-9.
Return to the Summary Table.
Channel 0 compare value. A write to this register automatically enables the channel to trigger an event when RTC timer reaches the programmed value or if the programmed value is 1 sec in the past.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-0 | VAL | R/W | 0h | RTC Channel 0 compare value. This value is compared against TIME8U.VAL. A Channel 0 event is generated when TIME8U.VAL value reaches or exceeds this compare value. |
CH1CC8U is shown in Table 12-10.
Return to the Summary Table.
Channel 1 capture value. This register captures the RTC time slice [34:3] on each selected edge of the capture event when the ARMSET.CH1 = 1.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-21 | RESERVED | R | 0h | Reserved |
20-0 | VAL | R | 0h | TIME8U.VAL captured value at the last selected edge of capture event. |
CH1CFG is shown in Table 12-11.
Return to the Summary Table.
Channel 1 configuration register. This register can be used to select the capture edge for generating the capture event.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-1 | RESERVED | R | 0h | Reserved |
0 | EDGE | R/W | 0h | Edge detect configuration for capture source
0h = Rising Edge. 1h = Falling Edge. |
IMASK is shown in Table 12-12.
Return to the Summary Table.
Interrupt Mask. If a bit is set, then corresponding interrupt is un-masked. Un-masking the interrupt causes the raw interrupt to be visible in IIDX, as well as MIS.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-2 | RESERVED | R | 0h | Reserved |
1 | EV1 | R/W | 0h | Channel 1 Event Interrupt Mask.
0h = Clear Interrupt Mask 1h = Enable Interrrupt Mask |
0 | EV0 | R/W | 0h | Channel 0 Event Interrupt Mask.
0h = Disable Interrupt Mask 1h = Enable Interrrupt Mask |
RIS is shown in Table 12-13.
Return to the Summary Table.
Interrupt mask. This register selects interrupt sources which are allowed to pass from RIS to MIS when the corresponding bit-fields are set to 1.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-2 | RESERVED | R | 0h | Reserved |
1 | EV1 | R | 0h | Raw interrupt status for Channel 1 event. This bit is set to 1 when a capture event is received on Channel 1. This bit will be cleared when the bit in ICLR.EV1 is set to 1 or when the captured time value is read from the CH1CC8U register. 0h = Interrupt did not occur 1h = Interrupt occured |
0 | EV0 | R | 0h | Raw interrupt status for Channel 0 event. This bit is set to 1 when a compare event occurs on Channel 0. This bit will be cleared. When the corresponding bit in ICLR.EV0 is set to 1. Or when a new compare value is written in CH0CC8U register 0h = Interrupt did not occur 1h = Interrupt occured |
MIS is shown in Table 12-14.
Return to the Summary Table.
Masked interrupt status. This register is simply a bitwise AND of the contents of IMASK and RIS.*] registers. A flag set in this register can be cleared by writing 1 to the corresponding ICLR register bit.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-2 | RESERVED | R | 0h | Reserved |
1 | EV1 | R | 0h | Masked interrupt status for channel 1 event.
0h = Interrupt did not occur 1h = Interrupt occured |
0 | EV0 | R | 0h | Masked interrupt status for channel 0 event.
0h = Interrupt did not occur 1h = Interrupt occured |
ISET is shown in Table 12-15.
Return to the Summary Table.
Interrupt set register. This register can used by software for diagnostics and safety checking purposes. Writing a 1 to a bit in this register will set the event and the corresponding RIS bit also gets set. If the corresponding IMASK bit is set, then the corresponding MIS register bit also gets set.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-2 | RESERVED | R | 0h | Reserved |
1 | EV1 | W | 0h | Set Channel 1 event Interrupt.
0h = Writing 0 has no effect 1h = Set interrupt |
0 | EV0 | W | 0h | Set Channel 0 event Interrupt.
0h = Writing 0 has no effect 1h = Set interrupt |
ICLR is shown in Table 12-16.
Return to the Summary Table.
Interrupt clear register. This register allows software to clear interrupts. Writing a 1 to a bit in this register will clear the event and the corresponding RIS bit also gets cleared. If the corresponding IMASK bit is set, then the corresponding MIS register bit also gets cleared.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-2 | RESERVED | R | 0h | Reserved |
1 | EV1 | W | 0h | Clears channel 1 event interrupt.
0h = Writing 0 has no effect 1h = Clear Interrupt |
0 | EV0 | W | 0h | Clears channel 0 event interrupt.
0h = Writing 0 has no effect 1h = Clear Interrupt. |
IMSET is shown in Table 12-17.
Return to the Summary Table.
Interrupt mask set register. Writing a 1 to a bit in this register will set the corresponding IMASK bit.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-2 | RESERVED | R | 0h | Reserved |
1 | EV1 | W | 0h | Set channel 1 event interrupt mask.
0h = Writing 0 has no effect 1h = Set interrupt mask |
0 | EV0 | W | 0h | Set channel 0 event interrupt mask.
0h = Writing 0 has no effect 1h = Set interrupt mask |
IMCLR is shown in Table 12-18.
Return to the Summary Table.
Interrupt mask clear register. Writing a 1 to a bit in this register will clear the corresponding IMASK bit.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-2 | RESERVED | R | 0h | Reserved |
1 | EV1 | W | 0h | Clears Channel 1 event interrupt mask.
0h = Writing 0 has no effect 1h = Clear Interrupt Mask |
0 | EV0 | W | 0h | Clears Channel 0 event interrupt mask.
0h = Writing 0 has no effect 1h = Clear Interrupt Mask |
EMU is shown in Table 12-19.
Return to the Summary Table.
Emulation control register. This register controls the behavior of the IP related to core halted input.
Bit | Field | Type | Reset | Description |
---|---|---|---|---|
31-1 | RESERVED | R | 0h | Reserved |
0 | HALT | R/W | 0h | Halt control.
0h = Free run option. The IP ignores the state of the core halted input. 1h = Freeze option. The IP freezes functionality when the core halted input is asserted, and resumes when it is deasserted. The freeze can either be immediate or after the IP has reached a boundary from where it can resume without corruption. |