Operation modes

nRF54L15 | nRF54L10 | nRF54L05 Datasheet

COMP can be configured to operate in the two main operation modes, differential mode and single-ended mode. See register MODE for more information. In both operation modes, COMP can operate in different speed and power consumption modes (low-power to high-speed). High-speed mode will consume more power compared to low-power mode. Low-power mode will result in a slower response time compared to high-speed mode.

Use register PSEL to select any of the AIN[0..7] pins as the VIN+ input. The COMP operation mode does not matter. The source of VIN- depends on which operation mode is used.

  • Differential mode – Derived directly from pins AIN[0..7].
  • Single-ended mode – Derived from VREF. VREF can be derived from VDD, AIN[0..7], or internal 1.2 V reference.

The selected analog pins will be acquired by the comparator once it is enabled.

An optional hysteresis on VIN+ and VIN- can be enabled when the module is used in differential mode through the register HYST. In single-ended mode, VUP and VDOWN thresholds can be set to implement a hysteresis using the reference ladder (see Comparator in single-ended mode ). This hysteresis is in the order of magnitude of VDIFFHYST, and prevents noise on the signal to create unwanted events. See Hysteresis example where VIN+ starts below VUP for an illustration of the effect of an active hysteresis on a noisy input signal.

An upward crossing will generate an UP event and a downward crossing will generate a DOWN event. The CROSS event will be generated every time there is a crossing, independent of direction.

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