Fujitsu FR81S Manual Do Utilizador

Página de 2342
CHAPTER 28: REAL-TIME CLOCK(RTC) 
 
 
9. Notes 
 
FUJITSU SEMICONDUCTOR LIMITED 
CHAPTER
 : REAL-TIME CLOCK(RTC) 
FUJITSU SEMICONDUCTOR CONFIDENTIAL 
31 
9.  Notes 
This section explains notes of the real-time clock. 
  The interrupt request flags (WTCR:INT0, WTCR:INT1, WTCR:INT2, WTCR:INT3, WTCR:INT4) will 
be set to "1" when they are written to "0" at the same time when they are set to "1" in case of overflow. 
(Flag setting takes precedence) 
  When reload occurs while update on the sub-second register (WTBRH, WTBRM, WTBRL) is in progress, 
an unexpected value may be reloaded to the sub-second counter (22-bit down counter). Therefore, it is 
recommended to update the sub-second register (WTBR) while the start bit (WTCR:ST) is "0". 
  When all the bits of the sub-second register (WTBRH, WTBRM, WTBRL) are set to "0", the sub-second 
counter (22-bit down counter) will not run. Therefore, the real-time clock will not run. 
  Carry may occur while Day/Hour/Minute/Second registers (WTDR, WTHR, WTMR, WTSR) are being 
read, leading to inappropriate read values. Therefore, it is recommended to use interrupt (INT0) to read the 
number of days and time (Day/Hour/Minute/Second). 
  As word access is not available for Day/Hour/Minute/Second registers (WTDR, WTHR, WTMR, WTSR), 
access to the respective registers is required. Therefore, as the time may be misread when the value is read 
in the boundary of the hour/minute count, perform multiple reads and use the logically correct time. 
Example: 
When read from second:   
1 day 23 hours 59 minutes 59 seconds= >2 days 0 hour 59 minutes 59 seconds=>2 days 0 hour 0 
minute 0 second 
When read from hour:   
1 day 23 hours 59 minutes 59 seconds= >2 days 23 hours 0 minute 0 second=>2 days 0 hour 0 
minute 0 second 
When read from day:   
1 day 23 hours 59 minutes 59 seconds=>1 day 0 hour 0 minute 0 second=>2 days 0 hour 0 minute 0 
second 
This case is judged as 2 days 0 hour. 
  Day/Hour/Minute/Second registers are not cleared by internal reset, while Day/Hour/Minute/Second 
counters are cleared by internal reset. After internal reset occurs, the ST flag is cleared, and the RTC macro 
is in the stop state. In addition, counter values prior to internal reset are set to Day/Hour/Minute/Second 
registers. To use Day/Hour/Minute/Second in case of internal reset, set the values read from the 
Day/Hour/Minute/Second counters to the Day/Hour/Second registers. 
  The number of days register has a built-in function for counting the number of days from "0 day" to 
"65535 days". 
  Notes on Setting the RTC Control Register 
  When writing "1" to the start bit (ST) from RTC stop state (ST=0) (RTC operation start), do not write 
"1" to the update bit (UPDT) at the same time as the start bit. 
(While ST=0, writing "1" as byte immediate value to the ST bit and the UPDT bit at the same time is 
prohibited. ) 
  To write "1" to the update bit (UPDT), do it while RTC is running (ST=1). 
  While the update bit (UPDT) is "1", writing "0" to the start bit (ST) (RTC stop) is prohibited. 
  When returning from the standby watch mode (power shutdown), the register of RTC is not initialized. 
  The internal reset is issued at the return from the standby watch mode (power shutdown). Therefore, only 
the reset factors (power-on reset, internal low-voltage reset, and simultaneous assert of RSTX and NMIX) 
are accepted. At this time, the register of the RTC is not initialized. If the reset input from the RSTX pin 
input or the external low-voltage detection flag is set after the start-up, initialize the register of RTC 
before using. 
 
 
 
MB91520 Series
MN705-00010-1v0-E
1070