Operation

nRF54LM20A | nRF54LM20B Datasheet

The LPCOMP peripheral compares an input voltage (VIN+) from an analog input pin selected via the PSEL register, against a reference voltage (VIN-) selected via registers REFSEL and EXTREFSEL.

The PSEL, REFSEL, and EXTREFSEL registers must be configured before LPCOMP is enabled through the ENABLE register.

The HYST register allows enabling an optional hysteresis in the comparator core. This hysteresis prevents noise on the signal, which would create unwanted events. The following figure illustrates the effect of an active hysteresis on a noisy input signal. It is disabled by default, and must be configured before enabling LPCOMP.

Figure 2. Effect of hysteresis on a noisy input signal

Page-1 Dynamic connector.1308 Dynamic connector.1309 Dynamic connector.1356 Sheet.78 Sheet.80 Sheet.81 Sheet.82 Sheet.83 VIN- - VHYST/2 VIN- - VHYST/2 Sheet.84 VIN- + VHYST/2 VIN- + VHYST/2 Sheet.85 Sheet.86 Output Output Sheet.90 t t Sheet.88 BELOW (VIN+ < (VIN- - VHYST/2)) BELOW (VIN+ < (VIN- - VHYST/2)) Dynamic connector Dynamic connector.102 Dynamic connector.103 Dynamic connector.104 Dynamic connector.107 Dynamic connector.108 Dynamic connector.109 Dynamic connector.110 Dynamic connector.111 Dynamic connector.112 Dynamic connector.113 Dynamic connector.114 Dynamic connector.115 Dynamic connector.116 Dynamic connector.117 Dynamic connector.118 Dynamic connector.119 Dynamic connector.120 Dynamic connector.121 Dynamic connector.122 Sheet.124 ABOVE (VIN+ > (VIN- + VHYST/2)) ABOVE (VIN+ > (VIN- + VHYST/2)) Sheet.126 ABOVE (VIN+ > (VIN- + VHYST/2)) ABOVE (VIN+ > (VIN- + VHYST/2)) Sheet.128 BELOW BELOW Sheet.131 VIN+ VIN+

LPCOMP is started by triggering the START task. After a startup time of tLPCOMP,STARTUP, LPCOMP generates a READY event to indicate that the comparator is ready to use and the output of LPCOMP is correct. LPCOMP generates events every time VIN+ crosses VIN-. More specifically, every time VIN+ rises above VIN- (upward crossing), an UP event and CROSS event are generated. Every time VIN+ falls below VIN- (downward crossing), a DOWN event and CROSS event are generated. When hysteresis is enabled, the upward crossing level becomes VIN- + VHYST/2, and the downward crossing level becomes VIN- - VHYST/2.

LPCOMP is stopped by triggering the STOP task.

LPCOMP is operational in both System ON and System OFF mode when enabled through the ENABLE register. See POWER — Power control for more information about power modes. Entering System OFF is not allowed when a READY event is pending to be generated.

All LPCOMP registers, including ENABLE, are classified as retained registers when the LPCOMP is enabled. However, when the device wakes up from System OFF, all LPCOMP registers are reset.

LPCOMP can wake up the system from System OFF by asserting the ANADETECT signal. The ANADETECT signal can be derived from any of the event sources that generate UP, DOWN, and CROSS events. If wakeup from System OFF occurs, only the ANADETECT signal is generated. See the ANADETECT register (ANADETECT) for more information on configuring the ANADETECT signal.

The immediate value of the LPCOMP can be sampled to RESULT by triggering the SAMPLE task.

See RESETREAS for more information on how to detect a wakeup from LPCOMP.