Differential mode

nRF5340 Product Specification

In differential mode, the reference input VIN- is derived directly from one of the AINx pins.

Before enabling the comparator via the ENABLE register, the following registers must be configured for the differential mode:

Figure 3. Comparator in differential mode

Comparator in differential mode

Note: Depending on the device, not all the analog inputs may be available for each MUX. See definitions for PSEL and EXTREFSEL for more information about which analog pins are available on a particular device.

When the HYST register is turned on during this mode, the output of the comparator and associated events do the following:

  • Change from ABOVE to BELOW when VIN+ drops below VIN- - (VDIFFHYST/2)
  • Change from BELOW to ABOVE when VIN+ raises above VIN- + (VDIFFHYST/2)

This behavior is illustrated in the following figure.

Figure 4. Hysteresis enabled in differential mode

Page-1 Dynamic connector.1308 VIN+ VIN+ Dynamic connector.1309 t t Dynamic connector.1356 Value Lifeline.1398 BELOW (VIN+ < (VIN- - VDIFFHYST /2)) BELOW (VIN+ < (VIN- - VDIFFHYST /2)) Value Lifeline.1399 ABOVE (VIN+ > (VIN- + VDIFFHYST /2)) ABOVE (VIN+ > (VIN- + VDIFFHYST /2)) Value Lifeline.1400 BELOW BELOW Sheet.1494 Value Lifeline.1498 ABOVE (VIN+ > (VIN- + VDIFFHYST /2)) ABOVE (VIN+ > (VIN- + VDIFFHYST /2)) Sheet.1505 Sheet.1506 Sheet.1507 Sheet.1508 VIN- - (VDIFFHYST / 2) VIN- - (VDIFFHYST / 2) Sheet.1513 VIN- + (VDIFFHYST / 2) VIN- + (VDIFFHYST / 2) Sheet.1514 Sheet.1515 Output Output