Go to file
Miguel Iglesias 7b8585012a Included uart, test commit 2024-10-11 23:48:47 +02:00
.vscode first commit 2024-10-11 22:30:23 +02:00
boards/arm/e73_tmb first commit 2024-10-11 22:30:23 +02:00
common Initial commit for SensorSoftwareTest_ 2024-10-07 18:12:21 +02:00
.gitignore Initial commit for SensorSoftwareTest_ 2024-10-07 18:12:21 +02:00
CMakeLists.txt first commit 2024-10-11 22:30:23 +02:00
README.md Initial commit for SensorSoftwareTest_ 2024-10-07 18:12:21 +02:00
main.c Included uart, test commit 2024-10-11 23:48:47 +02:00
prj.conf Included uart, test commit 2024-10-11 23:48:47 +02:00
sample.yaml first commit 2024-10-11 22:30:23 +02:00

README.md

TIMER counter

The sample demonstrates a basic functionality of the nrfx_timer driver in Timer and Counter modes.

Requirements

The sample supports the following development kits:

Board Support
nrf52dk_nrf52832 Yes
nrf52833dk_nrf52833 Yes
nrf52840dk_nrf52840 Yes
nrf5340dk_nrf5340 Yes
nrf9160dk_nrf9160 Yes

Overview

Application initializes the nrfx_timer driver. The @p timer_handler() is executed in the following situations:

  • Regularly after a specified time (@p TIME_TO_WAIT_MS).
  • When the counter value is equal to @p COUNTER_MAX_VAL.

For more information, see TIMER driver - nrfx documentation.

Wiring

To run this sample, no special configuration is needed. You should monitor the output from the board to check if it is as expected.

Building and running

To run this sample, build it for the appropriate board and then flash it as per instructions in Building and running(@ref building_and_running) section.

Sample output

You should see the following output:

- "Starting nrfx_timer basic counter example."
- "Time between timer ticks: 1000 ms"
- "Timer status: enabled"
- "Counter status: enabled"
- "Timer: 1"
- "Timer: 2"
- "Timer: 3"
- "Counter: 1 / 3"
- "Timer: 1"
- "Timer: 2"
- "Timer: 3"
- "Counter: 2 / 3"
- "Timer: 1"
- "Timer: 2"
- "Timer: 3"
- "Counter finished"
- "Counter: 3 / 3"
- "Timer status: disabled"
- "Counter status: disabled"