Value
Description
0
The comparator is disabled during sleep.
1
The comparator continues to operate during sleep.
Bits 4:3 – INTSEL[1:0]: Interrupt Selection
These bits select the condition for comparator n to generate an interrupt or event. COMPCTRLn.INTSEL
can be written only while COMPCTRLn.ENABLE is zero.
These bits are not synchronized.
Value
Name
Description
0x0
TOGGLE
Interrupt on comparator output toggle
0x1
RISING
Interrupt on comparator output rising
0x2
FALLING
Interrupt on comparator output falling
0x3
EOC
Interrupt on end of comparison (single-shot mode only)
Bit 2 – SINGLE: Single-Shot Mode
This bit determines the operation of comparator n. COMPCTRLn.SINGLE can be written only while
COMPCTRLn.ENABLE is zero.
These bits are not synchronized.
Value
Description
0
Comparator n operates in continuous measurement mode.
1
Comparator n operates in single-shot mode.
Bit 1 – ENABLE: Enable
Writing a zero to this bit disables comparator n.
Writing a one to this bit enables comparator n.
Due to synchronization, there is delay from updating the register until the comparator is enabled/disabled.
The value written to COMPCTRLn.ENABLE will read back immediately after being written.
SYNCBUSY.COMPCTRLn is set. SYNCBUSY.COMPCTRLn is cleared when the peripheral is enabled/
disabled.
Writing a one to COMPCTRLn.ENABLE will prevent further changes to the other bits in COMPCTRLn.
These bits remain protected until COMPCTRLn.ENABLE is written to zero and the write is synchronized.
Atmel SAM L22G / L22J / L22N [DATASHEET]
Atmel-42402E-SAM L22G / L22J / L22N_Datasheet_Complete-07/2016
1058