Specialist Supplier of Crystals & Frequency Control Componentssales@mecxtal.com.cn0755-26500570
MERLIN home / Rednote / System Validation and Replacement

Why 0x15 Can Trigger an Epson RA8000CE RTC Alarm on Sunday Instead of the 15th

The RA8000CE ALM_WEEKDAY register does not always hold a day of the month. In Epson's BCD calendar mode, 0x15 means the 15th when TCTL.WADA equals 1. When TCTL.WADA equals 0, the same byte selects Sunday, Tuesday and Thursday under Epson's example mapping. Reading back 0x15 alone cannot establish that the configuration is correct. Preserve the original settings and event time, then examine the weekday, date and interrupt paths separately.

Determine how the hardware interprets address 0x09

Epson application manual ETM64E-03 calls BCD-mode address 0x09 ALM_WEEKDAY. TCTL.WADA selects weekday or day-of-month comparison. With WADA at 0, the seven WKALM bits can select multiple weekdays. With WADA at 1, the lower six bits hold tens and units for the BCD day of the month. Bit 7 is XWAE; setting it to 1 excludes the weekday or date from the comparison. It does not switch off every alarm. Check mode and comparison enable separately before decoding the byte.

In 0x15, bits 0, 2 and 4 are set. These correspond to Sunday, Tuesday and Thursday only when using Epson's example mapping that starts with Sunday at bit 0 and proceeds in weekday order. The manual allows an application to choose its own day assignment if the shifting direction follows the order of weekdays. On ported firmware, check the actual WEEKDAY convention and initialization before assigning names to the bits.

ItemState determining its meaningWhat it does not establish on its own
ALM_WEEKDAY contains 0x15WADA = 1 and XWAE = 0That 0x15 means the 15th in every mode
ALM_WEEKDAY contains 0x15WADA = 0 and XWAE = 0Weekday names without the application's mapping
XWAE = 1Day or weekday no longer participatesThat all alarm sources have stopped
AF and AIEThe flag records a match; enable gates the interruptWhich calendar condition matched just by looking at the pin

Use a Tuesday that is not the 15th to tell the modes apart

Suppose a data logger should remind the operator at 07:30:00 on the 15th of each month. On the bench, it also generates an event at that time on a Tuesday that is not the 15th. If the unit uses Epson's mapping and weekday mode with the other time comparisons enabled, bit 2 in 0x15 can account for it. Then make the reciprocal check on a 15th that is not Sunday, Tuesday or Thursday. This is a diagnostic example, not a prediction of a fault on a particular date; verify the other masks and interrupt handling too.

Keep the second, minute and hour comparisons the same in both cases. The intended time of 07:30:00 is not an exact-second condition if the second comparison is masked. Epson's weekday example shows that masking the seconds can permit repeated matches within a minute when the hour and minute match. Do not change the seconds mask during this comparison, or treat a host application suppressing repeated messages as evidence that the hardware matches only once.

A date editor showing 15 does not show what byte was written

If a program writes decimal 15 as a binary integer, it can send 0x0F. The low nibble F is not a valid BCD units digit. Encode a day of the month and a weekday selection with separate conversion logic. Preserve the user interface choice, target mode and raw bus byte together, so a reviewer can distinguish encoding from interpretation. The written 0x15 looks like the decimal date, which makes skipping the mode check especially easy.

Preserve the original settings and separate the event from the external pin

Start with the current time, WEEKDAY, WADA, ALM_WEEKDAY and the time comparison fields. Record AF, AIE and /INT separately. Epson states that a match sets AF; /INT is asserted low to notify the host if AIE allows it. A flag that has not been cleared can reflect an earlier event. Preserve the pre-clear value and its time before clearing according to the manual. If /INT is shared by other sources, identify what actually pulled it low.

Do not treat write, validation and re-enable as one operation

Avoid replacing only the date byte and immediately handing control back while the old mode is still active. Check the manual's sequence for writing, clearing AF and enabling the interrupt, and record when configuration finished. In the firmware, give calendar updates a clear owner so two threads do not apply incompatible changes. Read back both WADA and the corresponding alarm data. One matching byte is not evidence that the whole configuration matches.

Keep both tests with the driver and repair records

Keep a human-readable rule for each mode and its resulting register values. The day test names a day of the month; the weekday test records the actual mapping, selected days and corresponding bits. Verify that the BCD calendar itself is enabled. A running binary seconds count does not show that this alarm is receiving calendar data. Keep a matching and a nonmatching case for each mode and tie the register settings to the observed event. After a host or firmware change, that lets the team isolate interface, encoding, comparison and interrupt issues.

A service desk may hear both “it alerted on the wrong day” and “it did not alert on the 15th.” If those come from two devices, review their firmware, dates, weekday registers and initialization independently. Do not merge them into one explanation. When the host translates the RTC weekday for display, separate the displayed name from the RTC's raw bit. A correct-looking weekday on the screen does not prove that the same mapping was used to encode the alarm.

Two explicit test dates are Tuesday, January 12, 2027 and Friday, January 15, 2027. Under Epson's example mapping, with equal active time-of-day comparisons, weekday mode with 0x15 matches the first but not the second; day-of-month mode does the reverse. Write the calendar date and corresponding weekday bit on the test device, rather than selecting only a date on the application screen. Also check a case where both would match, such as a 15th that is a Tuesday. That case alone cannot distinguish the modes.

Run a time-changing regression on an isolated test board rather than altering a field device that is collecting live records. Preserve and handle earlier alarm flags before checking new event times. For the live problem, collect the timestamp, register snapshot and reproduction conditions. Avoid changing the mapping and interrupt setup in the same first trial. Handover notes should say which day rule applies, whether repeat notifications are acceptable and whether acceptance checks the hardware event or delivery to the host. Keep those separate.

Read the mode and raw byte together

0x15 can be the 15th or a three-day weekday mask. Read TCTL.WADA and XWAE first, then check the local weekday mapping and the other comparison fields. If an alarm matched but the host missed it, follow AF, AIE and the external pin. This separates a valid calendar, a wrong alarm rule and a missing notification without blaming crystal drift from a single log.

WeChat

MERLIN · TIMING COMPONENTS

Scan with WeChat to contact Sales

Add our WeCom contacts from your usual WeChat app.

On desktop, scan with your phone. On mobile, save the QR image and select it from your album in WeChat Scan.