# 85 questions

Tagged
• x
45
views
no
1

## app_timer firing far too late, app_timer_cnt_get() gives weird results

Hi,

I'm using the nRF51 dongle with nRF SDK 12.3.0 and the S130 2.0.1 SoftDevice to implement a BLE central. The dongle repeatedly connects to a BLE peripheral, performs some tests, then disconnects.

I am ... (more)

134
views
no
1

## [bugreport] app_timer_stop() resets RTC1 counter when APP_TIMER_KEEPS_RTC_ACTIVE is set

My setup is as follows: nRF5 SDK 13.1 with s132 5.1.0 nRF52832_AA Keil 5.25pre

I use RTC1 counter for timestamping along with app_timer timers. My get_timestamp() function retrieves it's time value by calling app_timer_cnt_get() and ... (more)

50
views
1
vote
1

## Where to put APP_TIMER_DEF without error or warning?

I am working on a project in Nordic SDK 8.1 that requires using a timer. I am confused where I need to define the timer though (using APP_TIMER_DEF). If I put it right after my #include statements I get ... (more)

79
views
no
no

## SAADC with soft device and low-power mode

Hello,

yesterday I measured the current of our device and found out that it looks more as a square instead of spikes when no device was connected. Found out that when I established a BLE connection it looks as expected ... (more)

50
views
no
1

## timer events triggered in a row

Hi

I seek your support for the following 2 app_timer (or else) issue:

(1) in there any reason as to why multiple app_timers will sometime trigger all in a row although they have very different timeouts?

My case is button ... (more)

45
views
no
no

## anyone having problem with the APP_TIMER in SDK14

When using the APP_TIMER in SDK14 I am having a problem with the application stopping. I was using the APP_TIMER to flash LEDs and watch for timeouts in SDK13. when porting the code to SDK14 I am having a problem ... (more)

113
views
no
no

## Using app_timer_start() with app_scheduler

Hey guys,

First of all, I'm using the SDK 14.1 with my nRF52832-DK. I'm trying to get the function app_timer_start() work with the app_scheduler. But the app_timer_start() function will not be executed right.

In my sdk_config.h ... (more)

39
views
1
vote
1

## Missing app_timer_appsh.c

I'm working on a custom board based on the nRF52832. I'm developing on Win 8.1 using SES and a J-Link Plus. SDK version 14.1.

I'm trying to follow this tutorial here https://devzone.nordicsemi.com ... (more)

108
views
1
vote
1

## Can I use app_timer and nrf_drv_timer together?

Hi,

I am having problems with using BLE along with gpiote and ppi for measuring the delay between two waveforms and sending the delay between them to an app using bluetooth. I am measuring the delay using the nrf timer ... (more)

285
views
1
vote
1

I have few questions that weren't addressed either in the infocenter or in the devzone: 1. In which way app_timer uses CC registers? Each running timer use one of these registers? 2. What is the maximum amount of timers ... (more)

51
views
no
1

## APP_TIMER in sdk v14 build errors when migrating from v12.3

Hello I am using PCA10040, nRF52832, and GCC toolchain

I have a project that was working good using sdk v12.3 but now I want to migrate to the latest and I am getting one particular error I have not ... (more)

67
views
no
1

## app_timer_cnt_get overflows after 8 minutes

I print every 500ms. Here are the last few

timers:INFO:millis 510500, cnt 16728087
timers:INFO:millis 511000, cnt 16744474
timers:INFO:millis 511501, cnt 16760868
timers:INFO:millis 0, cnt 0
.
.
.
timers:INFO:millis 1500, cnt 49152


Any idea?

47
views
1
vote
1

## App_timer causes main loop restart when started

I'm trying to implement a simple RTC timer into my project, and it seems like the app_timer module is the best way to do that, especially when using the Softdevice. I added the following code to my project in ... (more)

185
views
1
vote
1

## app_timer tick problem

I use sdk 12.3.0 / nrf51822 / SD_130. I use app_timer library.

1. I want to know how to calculate the maximum allowed tick count when setting APP_TIMER_PRESCALER = 15 or other value.

# define WAKEUP_INTERVAL APP_TIMER_TICKS(???, APP_TIMER_PRESCALER)

1. What happens when an interval ...
(more)

107
views
no
no

## Stop and restart APP_TIMER doesn't work with SDK12

I use an app_timer to periodically update sensor reading in my application. There is a characteristic used to change updating rate by stopping and restarting the app_timer:

app_timer_stop(m_our_char_timer_id);
app_timer_start(m_our_char_timer_id, APP_TIMER_TICKS(1000, APP_TIMER_PRESCALER), NULL); //1000ms


It works fine with ... (more)

133
views
2
2

## measuring interrupt interval with app_timer

I have an interrupt coming in every 50-150 microsecs and I want to measure these intervals as precisely as possible.

I tried this with SDK12.2:

APP_TIMER_INIT(0, 5, false);


then in the (GPIOTE) ISR:

uint32_t this_time=app_timer_cnt_get();


I always ... (more)

133
views
1
vote
1

## timestamping w/o active timer (APP_TIMER_KEEPS_RTC_ACTIVE = 1)

hello,

i am using the nrf52840 preview devkit and am currently trying to find a solution for timestamping / for a time-base. the idea was to use the RTC for that since it provides a pretty accurate time reference and i ... (more)

93
views
1
vote
1

## get app timer current count

Hi,

i set the app_timer to fire every 60 seconds app_timer_start(m_Timer_id, APP_TIMER_TICKS(60000, APP_TIMER_PRESCALER), NULL);

Is it possible to get the current couter,for example, after 30 seconds?

I need to have an RTC counter discretized to milli seconds ... (more)

163
views
1
vote
2

## Simple timer not working

I coded a simple timer using app_timer and tested it on my nRF51822-DK:

#ifndef NRF51
#error NRF51 must be defined.
#endif

#include <nrf.h>
#include <app_timer.h>

#include <nrf_delay.h>
#include <nordic_common.h>

#include "nrf_drv_config.h"
#include "leds.h"

uint8_t ...
(more)

109
views
2
2

## Restarted Timer is not executed for long time(S132)

Hey,

SHORT VERSION: Timer (every Second) gets started when connecting (BLE with nRF Connect) to my DK (SDK12.2, Softdevice S132). Timer gets stopped when disconnecting. After reconnecting it takes more than 15Sec for the Timer to call the handler ... (more)

256
views
1
vote
1

## Advertise on one channel at a time - app_timer problem

Hi DevZone

I want to make a little beacon app, that advertises on channel 37 then waits 700 ms, advertises on channel 38, waits 700 and advertises on channel 39. The below is what i have implemented, yet it doesn ... (more)

68
views
no
1

## Intermittent HardFault crash in timer_list_remove

I am currently using SDK 12.1.0 and experiencing intermittent HardFault crashes in timer_list_remove() with the stack indicating the origin being a SWI0_IRQHandler call.

In order to minimise race-conditions, timing-windows, need for critical sections etc. I am using the ... (more)

77
views
1
vote
1

## Application Timer Context Pointer

When you start an application timer, you can provide an optional context pointer. Is that pointer memcpy'd like with the scheduler or is it a shallow copy? I'd like to know if I can provide locally created values ... (more)

459
views
12
1

## Bug in app_timer ?

I've been seeing occasional failures of my application which I now believe are due to a bug / design flaw in the app_timer library module.

The problem is due to a race hazard that occurs if a nested interrupt stops ... (more)

128
views
no
1

## lfclk initialization trouble when switching between ble and esb

Hello,

In my application I want to switch between using bluetooth low energy and enhanced shockburst (esb). I have tried using the timeslot api to run both of them together, but although it works very well, waiting for available timeslots ... (more)

326
views
no
no

## Interfacing HX711 for Weigh Sensors using nRF51 BLE

Hi, I am interfacing HX711- 24 bit ADC for Weigh Scale to calculate weight which has DOUT and PD_SCLK for Digital Output and Digital Input. I have the working Arduino code and I need to convert this code for nRF ... (more)

65
views
no
no

## ESB and app_timer.c

Hello!

I have a device with custom nrf52832 board. This device can beep using buzzer. Frequency of the sound is generated by pwm driver from SDK. I'm changing frequencies and delays between to generate melody via app_timer.c (app_timer_start ... (more)

316
views
no
1

## rtc and app_timer

Hi,

Is it possible to use RTC for timekeeping along with app_timer functionality? For example, I want to use simple RTC counter register and overflow interrupt to provide time tracking, but also need the app_timers. The second timer is used ... (more)

71
views
no
no

## app_timer not working with swi0 event

I am facing some problems with the app_timer api. In my application I have created two app timers. The timer api is using the swi1 interrupt for its working. I am using it with the mesh api, in which it ... (more)

167
views
1
vote
1

## Stuck in while loop after event trigger

Hi,

I have a custom board of nrf51822 with no external crystal, neither 16 Mhz nor 32Khz. I am trying to use uart and app timers from SDK11 but when I start any app timer, LFCLK doesn't start. When ... (more)

#### Statistics

• Total users: 26289
• Latest user: Curtis Otto
• Resolved questions: 11535
• Total questions: 28672

## Recent blog posts

• ### Difference between nRF52840 Engineering A and B reference designs

Posted 2018-01-15 12:27:08 by Martin Børs-Lind
• ### [For Hire] Expert development services of custom Hardware devices | IoT solutions | Mobile Apps

Posted 2018-01-15 09:08:42 by Ilya Surinsky
• ### Rust bindings to nrf52 series

Posted 2018-01-12 23:23:07 by Coleman McFarland
• ### Show And Tell: Poly - Building an RC Airplane The Hard Way

Posted 2018-01-05 01:17:57 by Daniel Veilleux
• ### Bluetooth on a desktop computer (Windows, Mac, Linux)

Posted 2018-01-04 17:56:57 by kbaud

## Recent questions

• ### Nrf ESB using nrf_esb_suspend, nrf_esb_disable functions

Posted 2018-01-20 19:31:28 by Amigo
• ### BLE multi communication

Posted 2018-01-20 18:30:08 by paul
• ### ANT tx slots missed during channel scanning

Posted 2018-01-20 18:27:27 by dlip
• ### Everything You Need to Know About Printed Lanyards

Posted 2018-01-20 18:01:16 by Fermin Murtagh
• ### LPCOMP Interrupt Resets MCU (nRF51-DK)

Posted 2018-01-20 15:32:47 by Anthony