
APPENDIX E SUMMARY OF PRECAUTIONS
AP-E-4
EPSON
S1C33E07 TECHNICAL MANUAL
When the reset-only method is used to reset the cause-of-interrupt flag (by writing 1), if a read-modify-write
instruction (e.g., bset, bclr, or bnot) is executed, the other cause-of-interrupt flags at the same address that
have been set to 1 are reset by a write. This requires caution. In cases when the read/write method is used to
reset the cause-of-interrupt flag (by writing 0), all cause-of-interrupt flags for which 0 has been written are
reset. When a read-modify-write operation is performed, a cause of interrupt may occur between reads and
writes, so be careful when using this method.
The same applies to the set-only method and read/write method for the IDMA request and IDMA enable
registers.
After an initial reset, the cause-of-interrupt flags and interrupt priority registers all become indeterminate.
To prevent unwanted interrupts or IDMA requests from being generated inadvertently, be sure to reset these
flags and registers in the software application.
To prevent another interrupt from being generated for the same cause again after generation of an interrupt,
be sure to reset the cause-of-interrupt flag before enabling interrupts and setting the PSR again or executing
the reti instruction.
There is a time lag between latching the interrupt signal and latching the interrupt vector and level signals
caused by the interface specifications between the CPU and the ITC.
1. The CPU latches the interrupt signal sent from the ITC.
↓
2. The CPU latches the interrupt vector and level signals sent from the ITC.
↓
3. The CPU executes the interrupt handler.
An illegal interrupt exception (vector No. 11) occurs when a register related to the interrupt signal (ITC’s
interrupt enable and cause-of-interrupt flag registers) is altered before the CPU latches the interrupt vector
and level signals (between Steps 1 and 2).
Therefore, it is very rare but an illegal interrupt exception may occur if an interrupt related register is altered
when interrupts to the CPU are in enabled status (IE bit in PSR = 1).
However, the illegal interrupt exception that occurs does not affect the program execution if any processing is
not performed in the exception handler.
To avoid an illegal interrupt exception occurring, disable interrupts to the CPU (set IE bit in PSR = 0) before
altering an interrupt related register.
Real-Time Clock (RTC)
The contents of all RTC control registers are indeterminate when power is turned on and are not initialized to
specific values by initial reset. Be sure to initialize these registers in software.
While 1 is being carried over to the next-digit counter, the correct counter value may not be read out.
Moreover, attempting to write to the counters or other control registers may corrupt the counter value.
Therefore, do not write to the counters while 1 is being carried over. For the correct method of operation,
see Section III.3.3.5, “Counter Hold and Busy Flag,” and Section III.3.3.6, “Reading from and Writing to
Counters in Operation.”
Note that rewriting RTC24H (D4/0x301908) to switch between 12-hour mode and 24-hour mode may corrupt
the count data for hours, days, months, years, or days of the week. Therefore, after changing the RTC24H
(D4/0x301908) setting, be sure to set data in these counters back again.
RTC24H: 24H/12H Mode Select Bit in the RTC Control Register (D4/0x301908)
Avoid the settings below that may cause timekeeping errors.
- Settings exceeding the effective range
Do not set count data exceeding 60 seconds, 60 minutes, 12 or 24 hours, 31 days, 12 months, or 99 years.
- Settings nonexistent in the calendar
Do not set nonexistent dates such as April 31 or February 29, 2006. Even if such settings are made, the
counters operate normally, so that when 1 is carried over from the hour counter to the 1-day counter, the
day counter counts up to the first day of the next month. (For April 31, the day counter counts up to May 1;
for February 29, 2006, the day counter counts up to March 1, 2006.)