zephyr/samples/drivers/counter/alarm
Gerson Fernando Budke 5321c42882 samples: drivers: counter: alarm: Add samd20_xpro
Add samd20_xpro board support to show how to use sam0 TC32.

Signed-off-by: Gerson Fernando Budke <nandojve@gmail.com>
2020-04-29 10:43:21 -05:00
..
src samples: drivers: counter: alarm: Add samd20_xpro 2020-04-29 10:43:21 -05:00
CMakeLists.txt cmake: use find_package to locate Zephyr 2020-03-27 16:23:46 +01:00
Kconfig samples: drivers: counter: alarm: Add samd20_xpro 2020-04-29 10:43:21 -05:00
README.rst
prj.conf
sample.yaml samples: drivers: counter: alarm: Add samd20_xpro 2020-04-29 10:43:21 -05:00

README.rst

.. _alarm_sample:

Counter Alarm Sample
#####################

Overview
********
This sample provides an example of alarm application using counter API.
It sets an alarm with an initial delay of 2 seconds. At each alarm
expiry, a new alarm is configured with a delay multiplied by 2.

Requirements
************

This sample requires the support of a timer IP compatible with alarm setting.

References
**********

- :ref:`disco_l475_iot1_board`

Building and Running
********************

 .. zephyr-app-commands::
    :zephyr-app: samples/drivers/counter/alarm
    :host-os: unix
    :board: disco_l475_iot1
    :goals: run
    :compact:

Sample Output
=============

 .. code-block:: console

    Counter alarm sample

    Set alarm in 2 sec
    !!! Alarm !!!
    Now: 2
    Set alarm in 4 sec
    !!! Alarm !!!
    Now: 6
    Set alarm in 8 sec
    !!! Alarm !!!
    Now: 14
    Set alarm in 16 sec
    !!! Alarm !!!
    Now: 30

    <repeats endlessly>