Apollo Register Documentation  v2.4.2
RTC - Real Time Clock

RTC Register Index

  0x00000040:   CTRLOW - RTC Counters Lower
  0x00000044:   CTRUP - RTC Counters Upper
  0x00000048:   ALMLOW - RTC Alarms Lower
  0x0000004C:   ALMUP - RTC Alarms Upper
  0x00000050:   RTCCTL - RTC Control Register
  0x00000100:   INTEN - CLK_GEN Interrupt Register: Enable
  0x00000104:   INTSTAT - CLK_GEN Interrupt Register: Status
  0x00000108:   INTCLR - CLK_GEN Interrupt Register: Clear
  0x0000010C:   INTSET - CLK_GEN Interrupt Register: Set

CTRLOW - RTC Counters Lower

Address:

  Instance 0 Address:   0x40004040

Description:

RTC Counters Lower

Example Macro Usage:

//
// All macro-based register writes follow the same basic format. For
// single-instance modules, you may use the simpler AM_REG macro. For
// multi-instance macros, you will need to specify the instance number using
// the AM_REGn macro format.
//
// AM_REG(<MODULE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>_<VALUE>;
// AM_REGn(<MODULE>, <INSTANCE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>_<VALUE>;
//
// For registers that do not have specific enumeration values, you may use this alternate format instead.
//
// AM_REG(<MODULE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>(<NUMBER>);
//
// For example, the following three lines of code are equivalent methods of
// writing the value for 12MHZ to the CLKSEL field in the ADC_CFG register.
//
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REGn(ADC, 0, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL(0x1);

Register Fields:

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RSVD
0x0
CTRHR
0x1
RSVD
0x0
CTRMIN
0x0
RSVD
0x0
CTRSEC
0x0
CTR100
0x0

Bits Name RW Description
31:30 RSVD RO RESERVED

29:24 CTRHR RW Hours Counter

23 RSVD RO RESERVED

22:16 CTRMIN RW Minutes Counter

15 RSVD RO RESERVED

14:8 CTRSEC RW Seconds Counter

7:0 CTR100 RW 100ths of a second Counter


CTRUP - RTC Counters Upper

Address:

  Instance 0 Address:   0x40004044

Description:

RTC Counters Upper

Example Macro Usage:

//
// All macro-based register writes follow the same basic format. For
// single-instance modules, you may use the simpler AM_REG macro. For
// multi-instance macros, you will need to specify the instance number using
// the AM_REGn macro format.
//
// AM_REG(<MODULE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>_<VALUE>;
// AM_REGn(<MODULE>, <INSTANCE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>_<VALUE>;
//
// For registers that do not have specific enumeration values, you may use this alternate format instead.
//
// AM_REG(<MODULE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>(<NUMBER>);
//
// For example, the following three lines of code are equivalent methods of
// writing the value for 12MHZ to the CLKSEL field in the ADC_CFG register.
//
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REGn(ADC, 0, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL(0x1);

Register Fields:

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
CTERR
0x0
RSVD
0x0
CEB
0x0
CB
0x0
CTRWKDY
0x0
CTRYR
0x0
RSVD
0x0
CTRMO
0x0
RSVD
0x0
CTRDATE
0x0

Bits Name RW Description
31 CTERR RO Counter read error status

NOERR = 0x0 - No read error occurred
RDERR = 0x1 - Read error occurred
30:29 RSVD RO RESERVED

28 CEB RW Century enable

DIS = 0x0 - Disable the Century bit from changing
EN = 0x1 - Enable the Century bit to change
27 CB RW Century

2000 = 0x0 - Century is 2000s
1900_2100 = 0x1 - Century is 1900s/2100s
26:24 CTRWKDY RW Weekdays Counter

23:16 CTRYR RW Years Counter

15:13 RSVD RO RESERVED

12:8 CTRMO RW Months Counter

7:6 RSVD RO RESERVED

5:0 CTRDATE RW Date Counter


ALMLOW - RTC Alarms Lower

Address:

  Instance 0 Address:   0x40004048

Description:

RTC Alarms Lower

Example Macro Usage:

//
// All macro-based register writes follow the same basic format. For
// single-instance modules, you may use the simpler AM_REG macro. For
// multi-instance macros, you will need to specify the instance number using
// the AM_REGn macro format.
//
// AM_REG(<MODULE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>_<VALUE>;
// AM_REGn(<MODULE>, <INSTANCE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>_<VALUE>;
//
// For registers that do not have specific enumeration values, you may use this alternate format instead.
//
// AM_REG(<MODULE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>(<NUMBER>);
//
// For example, the following three lines of code are equivalent methods of
// writing the value for 12MHZ to the CLKSEL field in the ADC_CFG register.
//
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REGn(ADC, 0, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL(0x1);

Register Fields:

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RSVD
0x0
ALMHR
0x0
RSVD
0x0
ALMMIN
0x0
RSVD
0x0
ALMSEC
0x0
ALM100
0x0

Bits Name RW Description
31:30 RSVD RO RESERVED

29:24 ALMHR RW Hours Alarm

23 RSVD RO RESERVED

22:16 ALMMIN RW Minutes Alarm

15 RSVD RO RESERVED

14:8 ALMSEC RW Seconds Alarm

7:0 ALM100 RW 100ths of a second Alarm


ALMUP - RTC Alarms Upper

Address:

  Instance 0 Address:   0x4000404C

Description:

RTC Alarms Upper

Example Macro Usage:

//
// All macro-based register writes follow the same basic format. For
// single-instance modules, you may use the simpler AM_REG macro. For
// multi-instance macros, you will need to specify the instance number using
// the AM_REGn macro format.
//
// AM_REG(<MODULE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>_<VALUE>;
// AM_REGn(<MODULE>, <INSTANCE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>_<VALUE>;
//
// For registers that do not have specific enumeration values, you may use this alternate format instead.
//
// AM_REG(<MODULE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>(<NUMBER>);
//
// For example, the following three lines of code are equivalent methods of
// writing the value for 12MHZ to the CLKSEL field in the ADC_CFG register.
//
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REGn(ADC, 0, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL(0x1);

Register Fields:

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RSVD
0x0
ALMWKDY
0x0
RSVD
0x0
ALMMO
0x0
RSVD
0x0
ALMDATE
0x0

Bits Name RW Description
31:19 RSVD RO RESERVED

18:16 ALMWKDY RW Weekdays Alarm

15:13 RSVD RO RESERVED

12:8 ALMMO RW Months Alarm

7:6 RSVD RO RESERVED

5:0 ALMDATE RW Date Alarm


RTCCTL - RTC Control Register

Address:

  Instance 0 Address:   0x40004050

Description:

RTC Control Register

Example Macro Usage:

//
// All macro-based register writes follow the same basic format. For
// single-instance modules, you may use the simpler AM_REG macro. For
// multi-instance macros, you will need to specify the instance number using
// the AM_REGn macro format.
//
// AM_REG(<MODULE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>_<VALUE>;
// AM_REGn(<MODULE>, <INSTANCE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>_<VALUE>;
//
// For registers that do not have specific enumeration values, you may use this alternate format instead.
//
// AM_REG(<MODULE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>(<NUMBER>);
//
// For example, the following three lines of code are equivalent methods of
// writing the value for 12MHZ to the CLKSEL field in the ADC_CFG register.
//
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REGn(ADC, 0, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL(0x1);

Register Fields:

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RSVD
0x0
HR1224
0x0
RSTOP
0x0
RPT
0x0
WRTC
0x0

Bits Name RW Description
31:6 RSVD RO RESERVED

5 HR1224 RW Hours Counter mode

24HR = 0x0 - Hours in 24 hour mode
12HR = 0x1 - Hours in 12 hour mode
4 RSTOP RW RTC input clock control

RUN = 0x0 - Allow the RTC input clock to run
STOP = 0x1 - Stop the RTC input clock
3:1 RPT RW Alarm repeat interval

DIS = 0x0 - Alarm interrupt disabled
YEAR = 0x1 - Interrupt every year
MONTH = 0x2 - Interrupt every month
WEEK = 0x3 - Interrupt every week
DAY = 0x4 - Interrupt every day
HR = 0x5 - Interrupt every hour
MIN = 0x6 - Interrupt every minute
SEC = 0x7 - Interrupt every second/10th/100th
0 WRTC RW Counter write control

DIS = 0x0 - Counter writes are disabled
EN = 0x1 - Counter writes are enabled

INTEN - CLK_GEN Interrupt Register: Enable

Address:

  Instance 0 Address:   0x40004100

Description:

Set bits in this register to allow this module to generate the corresponding interrupt.

Example Macro Usage:

//
// All macro-based register writes follow the same basic format. For
// single-instance modules, you may use the simpler AM_REG macro. For
// multi-instance macros, you will need to specify the instance number using
// the AM_REGn macro format.
//
// AM_REG(<MODULE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>_<VALUE>;
// AM_REGn(<MODULE>, <INSTANCE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>_<VALUE>;
//
// For registers that do not have specific enumeration values, you may use this alternate format instead.
//
// AM_REG(<MODULE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>(<NUMBER>);
//
// For example, the following three lines of code are equivalent methods of
// writing the value for 12MHZ to the CLKSEL field in the ADC_CFG register.
//
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REGn(ADC, 0, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL(0x1);

Register Fields:

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RSVD
0x0
ALM
0x0
OF
0x0
ACC
0x0
ACF
0x0

Bits Name RW Description
31:4 RSVD RO RESERVED

3 ALM RW RTC Alarm interrupt

2 OF RW XT Oscillator Fail interrupt

1 ACC RW Autocalibration Complete interrupt

0 ACF RW Autocalibration Fail interrupt


INTSTAT - CLK_GEN Interrupt Register: Status

Address:

  Instance 0 Address:   0x40004104

Description:

Read bits from this register to discover the cause of a recent interrupt.

Example Macro Usage:

//
// All macro-based register writes follow the same basic format. For
// single-instance modules, you may use the simpler AM_REG macro. For
// multi-instance macros, you will need to specify the instance number using
// the AM_REGn macro format.
//
// AM_REG(<MODULE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>_<VALUE>;
// AM_REGn(<MODULE>, <INSTANCE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>_<VALUE>;
//
// For registers that do not have specific enumeration values, you may use this alternate format instead.
//
// AM_REG(<MODULE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>(<NUMBER>);
//
// For example, the following three lines of code are equivalent methods of
// writing the value for 12MHZ to the CLKSEL field in the ADC_CFG register.
//
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REGn(ADC, 0, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL(0x1);

Register Fields:

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RSVD
0x0
ALM
0x0
OF
0x0
ACC
0x0
ACF
0x0

Bits Name RW Description
31:4 RSVD RO RESERVED

3 ALM RW RTC Alarm interrupt

2 OF RW XT Oscillator Fail interrupt

1 ACC RW Autocalibration Complete interrupt

0 ACF RW Autocalibration Fail interrupt


INTCLR - CLK_GEN Interrupt Register: Clear

Address:

  Instance 0 Address:   0x40004108

Description:

Write a 1 to a bit in this register to clear the interrupt status associated with that bit.

Example Macro Usage:

//
// All macro-based register writes follow the same basic format. For
// single-instance modules, you may use the simpler AM_REG macro. For
// multi-instance macros, you will need to specify the instance number using
// the AM_REGn macro format.
//
// AM_REG(<MODULE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>_<VALUE>;
// AM_REGn(<MODULE>, <INSTANCE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>_<VALUE>;
//
// For registers that do not have specific enumeration values, you may use this alternate format instead.
//
// AM_REG(<MODULE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>(<NUMBER>);
//
// For example, the following three lines of code are equivalent methods of
// writing the value for 12MHZ to the CLKSEL field in the ADC_CFG register.
//
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REGn(ADC, 0, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL(0x1);

Register Fields:

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RSVD
0x0
ALM
0x0
OF
0x0
ACC
0x0
ACF
0x0

Bits Name RW Description
31:4 RSVD RO RESERVED

3 ALM RW RTC Alarm interrupt

2 OF RW XT Oscillator Fail interrupt

1 ACC RW Autocalibration Complete interrupt

0 ACF RW Autocalibration Fail interrupt


INTSET - CLK_GEN Interrupt Register: Set

Address:

  Instance 0 Address:   0x4000410C

Description:

Write a 1 to a bit in this register to instantly generate an interrupt from this module. (Generally used for testing purposes).

Example Macro Usage:

//
// All macro-based register writes follow the same basic format. For
// single-instance modules, you may use the simpler AM_REG macro. For
// multi-instance macros, you will need to specify the instance number using
// the AM_REGn macro format.
//
// AM_REG(<MODULE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>_<VALUE>;
// AM_REGn(<MODULE>, <INSTANCE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>_<VALUE>;
//
// For registers that do not have specific enumeration values, you may use this alternate format instead.
//
// AM_REG(<MODULE>, <REGISTER>) |= AM_REG_<MODULE>_<REGISTER>_<FIELD>(<NUMBER>);
//
// For example, the following three lines of code are equivalent methods of
// writing the value for 12MHZ to the CLKSEL field in the ADC_CFG register.
//
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REGn(ADC, 0, CFG) |= AM_REG_ADC_CFG_CLKSEL_12MHZ;
AM_REG(ADC, CFG) |= AM_REG_ADC_CFG_CLKSEL(0x1);

Register Fields:

31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
RSVD
0x0
ALM
0x0
OF
0x0
ACC
0x0
ACF
0x0

Bits Name RW Description
31:4 RSVD RO RESERVED

3 ALM RW RTC Alarm interrupt

2 OF RW XT Oscillator Fail interrupt

1 ACC RW Autocalibration Complete interrupt

0 ACF RW Autocalibration Fail interrupt