• Home
  • Annotate
  • current directory
Name Date Size #Lines LOC

..22-Aug-2025-

boards/22-Aug-2025-

src/22-Aug-2025-

CMakeLists.txt A D22-Aug-2025239 106

README.rst A D22-Aug-2025842 2921

prj.conf A D22-Aug-202574 54

sample.yaml A D22-Aug-2025460 2019

README.rst

1.. zephyr:code-sample:: adc_cmp_npcx
2   :name: NPCX ADC Comparator
3   :relevant-api: sensor_interface
4
5   Detect upper/lower voltage limits using NPCX ADC Comparator driver.
6
7Overview
8********
9
10This sample show how to use the NPCX ADC Comparator driver. The
11sample supports the :zephyr:board:`npcx9m6f_evb`.
12
13This application is a voltage comparator with hysteresis, upper limit is
14set at 1 V while lower limit is 250 mV. Initially configured to detect
15upper limit.
16
17Building and Running
18********************
19
20Build the application for the :zephyr:board:`npcx9m6f_evb` board, and provide voltage
21to ADC channel 8, when voltages cross upper/lower limits, detection messages
22will be printed.
23
24.. zephyr-app-commands::
25   :zephyr-app: samples/sensor/adc_cmp_npcx
26   :board: npcx9m6f_evb
27   :goals: flash
28   :compact:
29