See here for project documentation.This example demonstrates the different functional modes of Analog Comparator (AC) module in SAM D21 devices.