SLAU966 February 2025 MSPM0C1103 , MSPM0C1103-Q1 , MSPM0C1104 , MSPM0C1104-Q1 , MSPM0C1105 , MSPM0C1106 , MSPM0C1106-Q1 , MSPM0G1106 , MSPM0G1107 , MSPM0G1506 , MSPM0G1507 , MSPM0G1518 , MSPM0G1519 , MSPM0G3106 , MSPM0G3106-Q1 , MSPM0G3107 , MSPM0G3107-Q1 , MSPM0G3506 , MSPM0G3506-Q1 , MSPM0G3507 , MSPM0G3507-Q1 , MSPM0G3518 , MSPM0G3518-Q1 , MSPM0G3519 , MSPM0G3519-Q1 , MSPM0H3216 , MSPM0L1105 , MSPM0L1106 , MSPM0L1116 , MSPM0L1117 , MSPM0L1227 , MSPM0L1227-Q1 , MSPM0L1228 , MSPM0L1228-Q1 , MSPM0L1303 , MSPM0L1304 , MSPM0L1304-Q1 , MSPM0L1305 , MSPM0L1305-Q1 , MSPM0L1306 , MSPM0L1306-Q1 , MSPM0L1343 , MSPM0L1344 , MSPM0L1345 , MSPM0L1346 , MSPM0L2228
MSPM0 and NXP's M0 MCUs both offer integrated comparators as optional peripherals on some devices. In the MSPM0 family, comparators are denoted as COMPx, where the 'x' final character refers to the specific comparator module being considered. The S32K1xx family features a COMP module with an internal single comparator with six to eight inputs, the KEA128x family supports up to four inputs, and the KM35x Up to six inputs. The MSPM0 comparator module provides a windowed comparator functionality using its DAC with two programmable levels. Both MSPM0 and NXP's M0 MCUs have multiple channels that can take inputs from various internal and external sources and can be used to trigger changes in power mode or truncate/control PWM signals. A summary of how the MSPM0 and NXP M0 comparator modules compare feature-by-feature is included in Table 5-3.
| Feature | S32K1xx | KEA128x | KM35x | MSPM0G | MSPM0L |
|---|---|---|---|---|---|
| Available comparators | 1 | 2 | 3 | Up to 3 | 1 |
| Number of positive and negative inputs | Up to 6 pos, up to 6 neg | Up to 4 pos, up to 4 pos | Up to 6 pos, up to 6 neg | Up to 4 pos, up to 3 neg | Up to 2 pos, up to 2 neg |
| Up to 8 pos, Up to 8 neg | |||||
| Output routing | Multiplexed I/0 Pins | Multiplexed I/O Pins | Multiplexed I/O Pins | Multiplexed I/O Pins | Multiplexed I/O Pins |
| Interrupt | Interrupt | Interrupt | Interrupt/Event Interface | Interrupt/Event Interface | |
| Noninverting input sources | Multiplexed I/O Pins | Multiplexed I/O Pins | Multiplexed I/O Pins | Multiplexed I/O Pins | Multiplexed I/O Pins |
| DAC12 output (1) | DAC8 output | ||||
| DAC8 output | DAC6 output | DAC6 output | DAC8 output | OPA1 Output (2) | |
| Internal VREF: 1.4 V and 2.5 V | |||||
| OPA1 output (2) | |||||
| Inverting input sources | Multiplexed I/O Pins | Multiplexed I/O Pins | Multiplexed I/O Pins | Multiplexed I/O pins | Multiplexed I/O Pins |
| No | No | No | Internal temperature sensor | Internal temperature sensor | |
| DAC8 output | DAC6 output | DAC6 output | Internal VREF: 1.4V and 2.5V | DAC8 output | |
| No | No | No | DAC8 output | OPA0(3) output | |
| No | No | No | OPA0 output (3) | ||
| Programmable hysteresis | None, 15mV/19mV, 23mV/34mV, 32mV/46mV | None, 15mV,20mV, 30mV | 5mV, 10mV, 20mV, 30mV | None, 10mV, 20mV, 30mV | None, 10mV, 20mV, 30mV |
| Other values from 0V to VREF/VDD using DAC8 | Other values from 0V to VDD using DAC8 | ||||
| Register lock | No | No | No | Yes, some COMP registers (writes require key) | Yes, some COMP registers (writes require key) |
| Window comparator configuration | Yes | No | Yes | Yes | No (single COMP) |
| Input short mode | No | No | No | Yes | Yes |
| Operating modes | VLPR (LS compare only),STOP1,STOP2,RUN | RUN, WAIT, STOP | RUN, WAIT, VLPS | High speed, low power | High speed, low power |
| Fast PWM shutdowns | No | No | No | Yes (through TIMA fault handler) | No |
| Output filtering | Low-pass filter | No | Yes | Blanking filter | Blanking filter |
| Adjustable analog filter | Adjustable analog filter | ||||
| Output polarity control | Yes | Yes | Yes | Yes | Yes |
| Interrupts | Rising edge | Rising edge | Rising edge | Rising edge | Rising edge |
| Falling edge | Falling edge | Falling edge | Falling edge | Falling edge | |
| Both edges | Both edges | Both edges | Output ready | Output ready | |
| Exchange inputs mode | Yes | Yes | Yes | Yes | Yes |
COMP code examples
Information about COMP code examples can be found in the MSPM0 SDK examples guide.