1.. zephyr:code-sample:: npm1300_ek 2 :name: nPM1300 EK 3 4 Interact with the nPM1300 PMIC using the shell interface. 5 6Overview 7******** 8 9This sample is provided for evaluation of the :ref:`npm1300_ek`. 10The sample provides a shell interface to support the features of the 11nPM1300 PMIC, including: 12 13- Regulators (BUCK1/2, LDO1/2) 14- GPIO 15 16Requirements 17************ 18 19The shield needs to be wired to a host board supporting the Arduino connector. 20 21Examples and images to follow 22 23Building and Running 24******************** 25 26The sample is designed so that it can run on any platform. For example, when 27building for the nRF52 DK, the following command can be used: 28 29.. zephyr-app-commands:: 30 :zephyr-app: samples/shields/npm1300_ek 31 :board: nrf52dk/nrf52832 32 :goals: build 33 :compact: 34 35Note that this sample automatically sets ``SHIELD`` to ``npm1300_ek``. Once 36flashed, you should boot into the shell interface. The ``regulator`` command is 37provided to test the PMIC. Below you can find details for each subcommand. 38 39Regulators 40========== 41 42The ``regulator`` shell interface provides several subcommand to test 43the regulators embedded in the PMIC. Below you can find some command examples. 44 45.. code-block:: bash 46 47 # list all the supported voltages by BUCK1 48 regulator vlist BUCK1 49 1.000 V 50 1.100 V 51 ... 52 53.. code-block:: bash 54 55 # enable BUCK2 56 regulator enable BUCK2 57 # disable BUCK2 58 regulator disable BUCK2 59 60.. code-block:: bash 61 62 # set BUCK2 voltage to exactly 2V 63 regulator vset BUCK2 2V 64 # obtain the actual BUCK1 configured voltage 65 regulator vget BUCK1 66 1.800 V 67 # set BUCK1 voltage to a value between 2.35V and 2.45V 68 regulator set BUCK1 2.35V 2.45V 69 # obtain the actual BUCK1 configured voltage 70 regulator get BUCK1 71 2.400 V 72