Example S32K144 CMP Round-robin S32DS2.0

Document created by Daniel Martynek Employee on Dec 9, 2017
Version 1Show Document
  • View in full screen mode

******************************************************************************************************************
Detailed Description:
The example code shows CMP in Round-robin mode.
CMP is clocked (125kHz) and triggered (80ms) by LPTMR, operates in VLPS.
Input channels are CMP0_IN1 (PTA1), CMP0_IN2 (PTC4), CMP0_IN3 (PTE8), CMP0_IN4 (PTC3).
The initial state of CMP outputs is 0 (Input analog pins < DAC input (Vin1/2))
The input pins are pulled down internally for debugging purposes.
CPM will wake up the MCU if an input has changed.
BLUE LED flashes 1x if CMP_IN1 has changed, 2x CMP0_IN2, 3x CMP0_IN3, 4x CMP0_IN4.
After that, the MCU goes back to VLPS.
-------------------------------------------------------------------------------------------------------------------------------------
Test HW: S32144EVB-Q100X
MCU: S32K144 (0N47T)
Debugger: S32DS2.0, OpenSDA
Target: internal_FLASH
******************************************************************************************************************

Outcomes