English
Language : 

AFE8221-Q1 Datasheet, PDF (34/59 Pages) Texas Instruments – DUAL INTERMEDIATE FREQUENCY (IF) ANALOG FRONT-END FOR DIGITAL RADIO
AFE8221-Q1
SBAS434 – DECEMBER 2008 ........................................................................................................................................................................................... www.ti.com
Note that all time register values are BCD-encoded. Also note that the rtc_day_of_week is a read-only value that
is internally calculated from the rtc_day, rtc_month, and rtc_year registers. Ranges on the various time registers
are shown in Table 17. When the rtc_mode changes, the real-time clock alarm settings should also be changed
to reflect the new time format. For instance, an alarm setting of 1300 hours never generates an interrupt in
12-hour mode. This setting should be reset to 1:00 PM when the mode is changed to 12-hour mode.
Table 17. Time Register Ranges
PARAMETER
rtc_seconds
rtc_minutes
rtc_hours
rtc_ampm
rtc_day
rtc_month
rtc_year
rtc_day_of_week
RANGE
0 to 59
0 to 59
1 to 12 (12-hour mode);
0 to 23 (24-hour mode)
0 (AM) or 1 (PM)
12-hour mode only
1 to 31, depending on month
1 to 12
0 to 99
(for years 2000 to 2099)
0 (Sunday) to 6 (Saturday)
Invalid combinations of rtc_day and rtc_month (trying to set February 30, for example) cause unpredictable
behavior and should be avoided. The February 28/29 rollover variation based on leap year is automatically
corrected for.
The RTC defaults to operate in 12-hour plus AM/PM mode. To operate in 24-hour mode (where the AM/PM bits
are disabled) set rtc_mode to 1. Care must be taken when switching between AM/PM mode and 24-hour mode
to avoid setting the time to a invalid value. See Figure 20 and Figure 21 for the proper procedures.
Real-Time Clock Alarm
The real-time clock alarm function can be used to generate an interrupt (or a wakeup interrupt) at a
pre-programmed time. If the appropriate bit in an interrupt enable register is set, an interrupt will be generated
when the values in the RTC time registers become equal to the values in the RTC alarm registers. The register
settings are shown in Table 18.
Table 18. RTC Alarm Control Register Settings
GPIO
PARAMETER
rtc_seconds_alarm[6:0]
rtc_minutes_alarm[6:0]
rtc_hours_alarm[5:0]
rtc_ampm_alarm
rtc_day_alarm[5:0]
rtc_month_arlarm[4:0]
rtc_year_alarm[7:0]
ADDRESS
67
68
69
69
70
71
72
BITS
6:0
6:0
5:0
7
5:0
4:0
7:0
12 general-purpose I/O pins are provided, labeled GPIO0 through GPIO11. The direction of the 12 GPIO pins
can be independently set through control variable gpio_oe(11:0). A pin is an input if the corresponding bit of
gpio_oe is 0; a pin is an output if the corresponding bit of gpio_oe is 1.
The control variable gpio(11:0) serves different functions, depending on whether it is read from or written to. A
read operation from gpio returns the logic state of the eight GPIO pins regardless of their direction. A write to
gpio sets the output state of the GPIO pins if they are configured as outputs; there is no effect if the pin is
configured as an input. Note that the write value of gpio is stored in a register, so that if a GPIO pin is changed
from an input to an output its logic state is set by the stored value of gpio. Table 21 shows the gpio control
variable settings.
34
Submit Documentation Feedback
Product Folder Link(s): AFE8221-Q1
Copyright © 2008, Texas Instruments Incorporated