36.6.10 Comparator n Comparator Control A
| Name: | COMP[n].COMPCTRLA |
| Offset: | 0x40 + n*0x10 [n=0..1] |
| Reset: | 0x00000000 |
| Property: | Local Write-Protection |
| Bit | 31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | |
| Access | |||||||||
| Reset |
| Bit | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | |
| Access | |||||||||
| Reset |
| Bit | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | |
| MUXPOS[2:0] | MUXNEG[2:0] | ||||||||
| Access | R/W | R/W | R/W | R/W | R/W | R/W | |||
| Reset | 0 | 0 | 0 | 0 | 0 | 0 | |||
| Bit | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 | |
| RUNSTDBY | INTSEL[1:0] | HYSTEN | OUT | ENABLE | |||||
| Access | R/W | R/W | R/W | R/W | R/W | R/W | |||
| Reset | 0 | 0 | 0 | 0 | 0 | 0 | |||
Bits 14:12 – MUXPOS[2:0] Positive Input Selection
| Value | Name | Description |
|---|---|---|
| 0x0 | AINP0 | Positive Pin 0 |
| 0x1 | AINP1 | Positive Pin 1 |
| 0x2 | AINP2 | Positive Pin 2 |
| 0x3 | AINP3 | Positive Pin 3 |
| 0x5 | AINP5 | Positive Pin 5 |
| 0x6 | AINP6 | Positive Pin 6 |
| 0x7 | VDDIO2DIV10 | VDDIO2 divided by 10 |
| Other | — | Reserved |
Bits 10:8 – MUXNEG[2:0] Negative Input Selection
| Value | Name | Description |
|---|---|---|
| 0x0 | AINN0 | Negative Pin 0 |
| 0x1 | AINN1 | Negative Pin 1 |
| 0x2 | AINN2 | Negative Pin 2 |
| 0x7 | VREFSCALE | Voltage Reference Scaler |
| Other | — | Reserved |
Bit 6 – RUNSTDBY Run in Standby
| Value | Description |
|---|---|
| 0 | COMPn will not run in Standby sleep mode |
| 1 | COMPn will run in Standby sleep mode |
Bits 5:4 – INTSEL[1:0] Interrupt Selection
| Value | Name | Description |
|---|---|---|
| 0x0 | TOGGLE | Interrupt on comparator n output toggle |
| 0x1 | RISING | Interrupt on comparator n output rising edge |
| 0x2 | FALLING | Interrupt on comparator n output falling edge |
| Other | — | Reserved |
Bit 3 – HYSTEN Hysteresis Enable
This bit controls the hysteresis function of comparator n.
For details on hysteresis values, refer to the Electrical Characteristics section.
| Value | Description |
|---|---|
| 0 | Hysteresis is disabled |
| 1 | Hysteresis is enabled |
Bit 2 – OUT Output Enable
| Value | Description |
|---|---|
| 0 | Output to COMPn-OUT pin is disabled |
| 1 | Output to COMPn-OUT pin is enabled |
Bit 1 – ENABLE Comparator Enable
| Value | Description |
|---|---|
| 0 | COMPn is or being disabled |
| 1 | COMPn is or being enabled |
