Zakładka z wyszukiwarką danych komponentów
  Polish  ▼
ALLDATASHEET.PL

X  

AN3133 Arkusz danych(PDF) 17 Page - STMicroelectronics

Numer części AN3133
Szczegółowy opis  A real-time clock is a computer clock that keeps track of the current time
PDF  43 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Producent  STMICROELECTRONICS [STMicroelectronics]
Strona internetowa  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN3133 Arkusz danych(HTML) 17 Page - STMicroelectronics

Back Button AN3133 Datasheet HTML 13Page - STMicroelectronics AN3133 Datasheet HTML 14Page - STMicroelectronics AN3133 Datasheet HTML 15Page - STMicroelectronics AN3133 Datasheet HTML 16Page - STMicroelectronics AN3133 Datasheet HTML 17Page - STMicroelectronics AN3133 Datasheet HTML 18Page - STMicroelectronics AN3133 Datasheet HTML 19Page - STMicroelectronics AN3133 Datasheet HTML 20Page - STMicroelectronics AN3133 Datasheet HTML 21Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 17 / 43 page
background image
AN3133
Programming the RTC
Doc ID 16956 Rev 5
17/43
2
Programming the RTC
2.1
Initializing the calendar
Table 4 describes the steps required to correctly configure the calendar time and date.
2.2
Programming the alarm
Table 5 describes the steps required to configure the alarm.
Table 4.
Steps to initialize the calendar
Step
What to do
How to do it
Comments
1
Enter Initialization mode.
Set INIT bit to ‘1’ in
RTC_ISR1 register.
The calendar counter is
stopped to allow update.
2
Wait for the confirmation of
Initialization mode (clock
synchronization).
Poll INITF bit of in
RTC_ISR1 until it is set.
It takes approximately 2
RTCCLK clock cycles for
medium density devices.
3
Program the 3 prescaler
registers if needed.
Registers RTC_APRER
and RTC_SPRERx.
4
Load time and date values in
the shadow registers.
Set RTC_TRx and
RTC_DRx registers.
5
Configure the time format (12h
or 24h).
Set FMT bit in
RTC_CR1 register.
6
Exit Initialization mode.
Clear the INIT bit in
RTC_ISR1 register.
The current calendar counter is
then automatically loaded and
the counting restarts after 4
RTCCLK clock cycles.
Table 5.
Steps to configure the alarm
Step
What to do
How to do it
Comments
1
Disable the alarm.
Clear ALRAE bit in
RTC_CR2 register.
2
Check that the RTC_ALRMARx
registers can be accessed.
Poll ALRAWF bit until it
is set in RTC_ISR1.
It takes approximately 2
RTCCLK clock cycles (clock
synchronization).
On medium+ and high density,
there is no synchronization
time to wait for.
3
Configure the alarm.
Configure
RTC_ALRMARx
registers.
The alarm hour format must be
the same as the RTC Calendar
in RTC_ALARM3(1).
1.
As an example, if the alarm is configured to occur at 3:00:00 PM, the alarm will not occur even if the
calendar time is 15:00:00, because the RTC calendar is 24-hour format and the alarm is 12-hour format.
4
Re-enable the alarm.
Set ALRAE bit in
RTC_CR2 register.



Html Pages

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43


Arkusz danych Pobierz

Go To PDF Page


Link URL



Czy Alldatasheet okazała się pomocna?  [ DONATE ] 

O Alldatasheet   |   Reklama   |   Kontakt   |   Polityka prywatności   |   Link do karty katalogowej    |   Linki   |   Lista producentów
All Rights Reserved©Alldatasheet.com


Mirror Sites
English : Alldatasheet.com  |   English : Alldatasheet.net  |   Chinese : Alldatasheetcn.com  |   German : Alldatasheetde.com  |   Japanese : Alldatasheet.jp
Russian : Alldatasheetru.com  |   Korean : Alldatasheet.co.kr  |   Spanish : Alldatasheet.es  |   French : Alldatasheet.fr  |   Italian : Alldatasheetit.com
Portuguese : Alldatasheetpt.com  |   Polish : Alldatasheet.pl  |   Vietnamese : Alldatasheet.vn
Indian : Alldatasheet.in  |   Mexican : Alldatasheet.com.mx  |   British : Alldatasheet.co.uk  |   New Zealand : Alldatasheet.co.nz
Family Site : ic2ic.com  |   icmetro.com