công cụ tìm kiếm bảng dữ liệu linh kiện điện tử
  Vietnamese  ▼
ALLDATASHEET.VN

X  

AN3371 bảng dữ liệu(PDF) 11 Page - STMicroelectronics

tên linh kiện AN3371
Giải thích chi tiết về linh kiện  Using the hardware real-time clock
PDF  45 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
nhà sản xuất  STMICROELECTRONICS [STMicroelectronics]
Trang chủ  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN3371 bảng dữ liệu(HTML) 11 Page - STMicroelectronics

Back Button AN3371 Datasheet HTML 7Page - STMicroelectronics AN3371 Datasheet HTML 8Page - STMicroelectronics AN3371 Datasheet HTML 9Page - STMicroelectronics AN3371 Datasheet HTML 10Page - STMicroelectronics AN3371 Datasheet HTML 11Page - STMicroelectronics AN3371 Datasheet HTML 12Page - STMicroelectronics AN3371 Datasheet HTML 13Page - STMicroelectronics AN3371 Datasheet HTML 14Page - STMicroelectronics AN3371 Datasheet HTML 15Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 11 / 45 page
background image
AN3371
Overview of the STM32 advanced RTC
Doc ID 018624 Rev 5
11/45
Configuring the alarm behavior using the MSKx bits
The alarm behavior can be configured using the MSKx bits (x = 1, 2, 3, 4) of the
RTC_ALRMAR register for alarm A (RTC_ALRMBR register for alarm B).
Table 5 shows all the possible alarm settings. As an example, to configure the alarm time to
23:15:07 on Monday (assuming that the WDSEL = 1), MSKx bits must be set to 0000b.
When the WDSEL = 0, all cases are similar, except that the Alarm Mask field compares with
the day number and not the day of the week, and MSKx bits must be set to 0000b.
Table 4.
Steps to configure the alarm
Step
What to do
How to do it
Comments
1
Disable the RTC registers Write
protection
Write "0xCA" and then
"0x53" into the
RTC_WPR register
RTC registers can be modified
2
Disable alarm A
Clear ALRAE(1) bit in
RTC_CR register.
1.
Respectively ALRBE bit for alarm B.
3
Check that the RTC_ALRMAR
register can be accessed
Poll ALRAWF(2) bit until
it is set in RTC_ISR.
2.
Respectively ALRBWF bit for alarm B.
It takes approximately two
RTCCLK clock cycles (clock
synchronization).
4
Configure the alarm
Configure
RTC_ALRMAR(3)
register.
3.
Respectively RTC_ALRMBR register for alarm B.
The alarm hour format must be
the same(4) as the RTC
Calendar in RTC_ALRMAR.
4.
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.
5
Re-enable alarm A
Set ALRAE(5) bit in
RTC_CR register.
5.
Respectively ALRBE bit for alarm B.
6.
RTC alarm registers can only be written when the corresponding RTC alarm is disabled or during RTC
Initialization mode.
6
Enable the RTC registers Write
protection
Write "0xFF" into the
RTC_WPR register
RTC registers can no longer be
modified
Table 5.
Alarm combinations
MSK3 MSK2 MSK1 MSK0
Alarm behavior
00
00
All fields are used in alarm comparison:
Alarm occurs at 23:15:07, each Monday.
00
01
Seconds do not matter in alarm comparison
The alarm occurs every second of 23:15, each Monday.
00
10
Minutes do not matter in alarm comparison
The alarm occurs at the 7th second of every minute of 23:XX, each
Monday.
00
11
Minutes and seconds do not matter in alarm comparison
01
00
Hours do not matter in alarm comparison
01
01
Hours and seconds do not matter in alarm comparison



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 44 45


bảng dữ liệu tải về

Go To PDF Page


Link URL



Cho đến nay ALLDATASHEET có giúp ích cho doanh nghiệp của bạn hay không?  [ DONATE ] 

Alldatasheet là   |   Quảng cáo   |   Liên lạc với chúng tôi   |   Chính sách bảo mật   |   Liên kết đến bảng dữ liệu    |   Trao đổi link   |   Tìm kiếm theo nhà sản xuất
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