Motor de Búsqueda de Datasheet de Componentes Electrónicos
  Spanish  ▼
ALLDATASHEET.ES

X  

AN2629 Datasheet(PDF) 18 Page - STMicroelectronics

No. de pieza AN2629
Descripción Electrónicos  low-power modes
PDF  43 Pages
Scroll/Zoom Zoom In 100%  Zoom Out
Fabricante Electrónico  STMICROELECTRONICS [STMicroelectronics]
Página de inicio  http://www.st.com
Logo STMICROELECTRONICS - STMicroelectronics

AN2629 Datasheet(HTML) 18 Page - STMicroelectronics

Back Button AN2629 Datasheet HTML 14Page - STMicroelectronics AN2629 Datasheet HTML 15Page - STMicroelectronics AN2629 Datasheet HTML 16Page - STMicroelectronics AN2629 Datasheet HTML 17Page - STMicroelectronics AN2629 Datasheet HTML 18Page - STMicroelectronics AN2629 Datasheet HTML 19Page - STMicroelectronics AN2629 Datasheet HTML 20Page - STMicroelectronics AN2629 Datasheet HTML 21Page - STMicroelectronics AN2629 Datasheet HTML 22Page - STMicroelectronics Next Button
Zoom Inzoom in Zoom Outzoom out
 18 / 43 page
background image
Real-time clock (RTC)
AN2629
18/43
Doc ID 13922 Rev 2
3.3.2
Resetting RTC registers
All system registers are asynchronously reset by a System Reset or Power Reset, except for
RTC_PRL, RTC_ALR, RTC_CNT, and RTC_DIV.
The RTC_PRL, RTC_ALR, RTC_CNT, and RTC_DIV registers are reset only by a Backup
Domain reset. Refer to the STM32F10xxx reference manual.
3.3.3
Reading RTC registers
The RTC core is completely independent from the RTC APB1 interface.
Software accesses the RTC prescaler, counter and alarm values through the APB1 interface
but the associated readable registers are internally updated at each rising edge of the RTC
clock resynchronized by the RTC APB1 clock. This is also true for the RTC flags.
This means that the first read to the RTC APB1 registers may be corrupted (generally read
as 0) if the APB1 interface has previously been disabled and the read occurs immediately
after the APB1 interface is enabled but before the first internal update of the registers. This
can occur if:
●
A system reset or power reset has occurred
●
The MCU has just woken up from Standby mode (see the STM32F10xxx reference
manual)
●
The MCU has just woken up from Stop mode (see the STM32F10xxx reference
manual)
In all the above cases, the RTC core has been kept running while the APB1 interface was
disabled (reset, not clocked or not powered).
Consequently when reading the RTC registers, after having disabled the RTC APB1
interface, the software must first wait for the RSF bit (Register Synchronized Flag) in the
RTC_CRL register to be set by hardware.
Note that the RTC APB1 interface is not affected by WFI and WFE low-power modes.
3.3.4
Configuring RTC registers
To write in the RTC_PRL, RTC_CNT, RTC_ALR registers, the peripheral must enter
Configuration Mode. This is done by setting the CNF bit in the RTC_CRL register.
In addition, writing to any RTC register is only enabled if the previous write operation is
finished. To enable the software to detect this situation, the RTOFF status bit is provided in
the RTC_CR register to indicate that an update of the registers is in progress. A new value
can be written to the RTC registers only when the RTOFF status bit value is ‘1’.
Configuration procedure:
1.
Poll RTOFF, wait until its value goes to ‘1’
2.
Set the CNF bit to enter configuration mode
3.
Write to one or more RTC registers
4.
Clear the CNF bit to exit configuration mode
5.
Poll RTOFF, wait until its value goes to ‘1’ to check the end of the write operation.
The write operation only executes when the CNF bit is cleared; it takes at least three
RTCCLK cycles to complete.



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


Datasheet Descarga

Go To PDF Page


Enlace URL



¿ALLDATASHEET es útil para Ud.?  [ DONATE ] 

Todo acerca de Alldatasheet   |   Publicidad   |   Contáctenos   |   Política de Privacidad   |   Enlace a la hoja de datos    |   Intercambio de Enlaces   |   Lista de Fabricantes
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