How-To Guide

Table Of Contents
R01UH0823EJ0110 Rev.1.10 Page 824 of 1852
Nov 30, 2020
RX23W Group 29. Low-Power Timer (LPT)
29.3 Operation
29.3.1 Periodic Counting Operation
The low-power timer is a 16-bit up-counter that operates regardless of the MCU operating mode*
1
.
When the LPTCR3.LPCNTEN bit is set to 1 (low-power timer counter operates) after setting the
LPTCR1.LPCNTPSSEL[2:0] bits to select the division ratio, the LPTCR1.LPCNTCKSEL bit to select the clock source,
and the LPTCR2.LPCNTSTP bit to 0 (clock is supplied to the low-power timer), the low-power timer counter starts
counting with the selected clock.
When the value of the low-power timer counter matches the value of the LPTPRD register, the counter restarts counting
from 0000h.
When the value of the low-power timer counter matches the value of the LPCMR0 register in software standby mode
while the LPTCR1.LPCMRE0 bit is set to 1 (Compare match 0 is enabled) and the LPWUCR.LPWKUPEN bit is set to
1 (wakeup from software standby mode using low-power timer is enabled), the MCU returns from software standby
mode to normal operating mode by the function of the event link controller (ELC).
Figure 29.2 shows operation of the low-power timer and Figure 29.3 shows an example of procedure for the initial
settings.
Note 1. When the LPTCR1.LPCNTCKSEL bit is set to 1 (IWDT-dedicated clock), the counter stops because the
IWDTCLK stops in the low-power consumption mode under the following settings:
The OFS0.IWDTSLCSTP bit is set to 1 (counting stop is enabled) while IWDT is activated in auto-start mode, or
the IWDTCSTPR.SLCSTP bit is set to 1 (counting stop is enabled) while IWDT is activated in register start mode.
Figure 29.2 Operation of Low-Power Timer
LPTPRD
LPCMR0
0000h
Count starts
Normal
operating mode
Software standby mode
Normal
operating mode
Software standby mode
Normal
operating mode
Software standby
mode
Count value in low-power timer counter
Time
Counter is cleared when count value
matches LPTPRD value
Transitions to software standby
mode by executing WAIT instruction
Transitions to software standby
mode by executing WAIT instruction
Transitions to software standby
mode by executing WAIT instruction
ELC transits to active
state by compare match 0
ELC transits to active
state by compare match 0
ELC generates
interrupt request signal
ELC generates
interrupt request signal
Compare match
signal
MCU operating mode
Interrupt request
signal