# 261 questions

Tagged
• x
15
views
no
no

## 51822 2.4g+ble timer

2.4g ble work in 2 mode(not same time) when reset. when I init 2.4g clock void esb_clocks_start( void ) { NRF_CLOCK->EVENTS_HFCLKSTARTED = 0; NRF_CLOCK->TASKS_HFCLKSTART = 1;

while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 0);


}

the ble timer not work: err_code = app_timer_create(&m_keyscan_timer_id, APP_TIMER_MODE_REPEATED ... (more)

24
views
no
no

## sdk 13 app_timer 24 hour long timer

Hi,

there were some significant changes to app_timer in sdk13.

I cannot use now the PRESCALER e.g. to 255 in order to configure the clock in such way to be able to tirgger event every eg. 24 hours.

So ... (more)

59
views
no
1

## getting millis from startup

I need to count millis from nrf52 start

I have seen that all are using rtc1 but I did not find any example from which i can integrate it to my project.

50
views
no
no

## multiple parallel pulse measurements and generation

i have a particular automotive tuning application where i have to deal with ignition and fuel injection timing (old stuff in the new e-mobility time)

here are some loose specs

a single injector has a min on time of about ... (more)

32
views
no
no

## nrf51822 TIMER 1 and TIMER 2

In timer example in sdk 11, I replace the Timer 0 by timer 1 and timer 2 but the LED did not blink. Can you guys please guide me through this? In nrf_drv_config.h I have already replace:

#define TIMER1_ENABLED ...
(more)

49
views
no
1

## Timer interrupt priority and BLE connection

Hi all,

My configuration:

• nrf52832 microcontroller
• Softdevice S132 V4.0.2
• Nordic SDK 13.0

I'm using an "app_timer" in repeated mode with 10Hz frequency.

#define M_10HZ_TIMER_VALUE  APP_TIMER_TICKS(100) /* 10Hz  = 100ms */

APP_TIMER_DEF(m_10Hz_timer_id);

app_timer_create(&m_10Hz_timer_id, APP_TIMER_MODE_REPEATED, m_10Hz_timer_handler);

app_timer_start(m_10Hz_timer_id ...
(more)

47
views
1
vote
1

Hi everyone,

My configuration:

• nrf52832 microcontroller
• Softdevice S132 V4.0.2
• Nordic SDK 13.0

I need to develop a repetitive task with 10 Hz frequency. This task contains only algorithms and it doesn't involve the use of any ... (more)

101
views
2
3

## How to use multiple timers

I have a device that I need to control, that needs 2 different square wave signals of different frequencies (although they may be multiples of each other), one at around 4 MHz and one at 10 KHz. Additionally (while the ... (more)

64
views
no
no

## App timer high current consumption

I have a need for an interrupt to go off at a 4khz rate. For this, I am using a repeated App Timer (running off the 32k crystal).

Prior to adding this extra timer, we used to have a power ... (more)

46
views
no
1

## Inaccurate interrupt of timer in nrf52840 [closed]

I am working on nRF52840 Preview DK. I want to generate a square wave with accuracy of ON and OFF time = 1 microsecond using timer for driving stepper motor DRB8825.

I am using SDK version : nRF5_SDK_14.2.0_17b948a

I have ... (more)

34
views
no
1

## App_timer compute diff between ticks

Hi, I want modify ESB example Rx to log the time between received messages. I am using SDK 13.0. Unfortunatelly, function app_timer_cnt_diff_compute always return 0. Can you suggest me where I made a mistake? I include my main and ... (more)

95
views
no
1

## Accurate Time Capture

Hi guys, I'm using a HFCLK TIMER to time ADC sample capturing via PPI. This eliminates CPU+BLE usage from affecting my time keeping. I assume that each ADC sample arrives in my callback within usec variance from my ... (more)

55
views
no
1

## Behavior when a single PPI channel triggers 2 timer tasks

nRF52832 / SDK 14.2 / SD5.1.0

There might be two configurations to setup a PPI channel to assign some peripheral event to both timer capture & clear task:

1.

nrf_drv_ppi_channel_assign(event, (uint32_t)&NRF_TIMERX->TASKS_CAPTURE[Y]);
nrf_drv_ppi_channel_fork_assign(event, (uint32_t)&NRF_TIMERX->TASKS_CLEAR ...
(more)

61
views
1
vote
2

## What is the precision on timers?

We have built and run the code in examples->peripherals->timer in nRF5_SDK_12.3.0_d7731ad on 4 different Nordic DK nRF51 development boards. The timer period is 5 msec. We commented out the LED initialization and toggling. In the ISR ... (more)

144
views
no
1

## How to trigger ADC from a timer interrupt, while generating PWM with the same timer and while using BLE on nRF51822?

Hi. I am a newbie in Nordic chips, quite knowledgeable in Atmel AVR, though. I'm working with an nRF51822 on a board like this https://www.waveshare.com/wiki/BLE400. I use the Mbed environment.

What I'm trying ... (more)

58
views
1
vote
1

## NRF51822 Secure Bootloader with app_timer

Hello everybody,

i want to add a timer to my secure bootloader example, so it waits some time and then, if no DFU is in progress, starts the beacon apllication automatic if there is one available.

I tried this by ... (more)

90
views
1
vote
1

Hello,

based on the saadc example of SDK 11 I am trying to change the code to use the SAADC's local timer to sample the input given number of times (10 times for the below example), at a rate ... (more)

167
views
4
9

## nrf52832 timer

I am using the nrf52832 soc, and have a requirement to run the device in low power mode and using the timer with a timeout value in days? how can I do so?

Sample code would be of great help.

180
views
2
1

## Parallel time-stamps of GPIO edges with PPI? (timer capture) [closed]

Hi, all!

Is it really possible to timestamp 4 GPIO edges in parallel with the nRF52?

It would need to be as fast as possible and some edges might be simultaneous so PPI seems to be the trick.

The documentations ... (more)

64
views
no
1

## nrf51822 Timer calculation

Hello Everyone,

Maybe this is a very silly question. I am trying to implement timer in nrf51822 with S130, SDK11.

Code snippet:

void TIMER1_IRQHandler(void)

{

if ((NRF_TIMER2->EVENTS_COMPARE[0] != 0) && ((NRF_TIMER2->INTENSET & TIMER_INTENSET_COMPARE0_Msk) != 0))
{

NRF_TIMER2->EVENTS_COMPARE[0] = 0;           //Clear compare ...
(more)

57
views
1
vote
1

## GPIOTE event is not triggered sometimes

Hello,

I need two signals with a phase shift to control my motor. For some reason, completely randomly, sometimes my GPIOTE event is not triggered and i get the inversion of the signals. I am spinning the motor for approximately ... (more)

76
views
no
1

## How trigger sampling through PPI on an RTC event?

Hi,

I am using nRF52832 and softdevice is S132 adk13.1. My application is read 3 ADC channel one by one and send this value to android app using NUS. For this i have use This Time drive Adc exmple ... (more)

97
views
no
1

## time counter

Hi everybody !! i m working in a project with NRF52 SDK 11, i need a help, i want to create a funtion that working with RTC to count a tick and to convert it into time then reset the count ... (more)

92
views
3
2

## PWM issue in SDK14.1.0 for nRF52810 [closed]

Hello,

I am trying to implement PWM using PWM library using Timer 3 and 4. However, I am not able to use these timers at all as compilation gives this error: # Error 1

../../../../../../components/drivers_nrf/timer/nrf_drv_timer.c:274:13 ...

(more)

112
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)

116
views
no
no

## Timers not working on nRF52

Hello,

I'm developing a simple code that make use of timers using NRF-based boards and Arduino code.

The following code works fine on a Simblee nRF51822 board, but it crashes on a Adafruit Feather nRF52832 board (the variable 'flag ... (more)

98
views
no
1

## delay by timer

i want make delay funtion by timer?

in the other MCU like PIC, AVR, stm. i find register that hold value counter and i cant set this value for example: timer 8 bit will count to 256 and i set ... (more)

286
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
no

## Calling nrf_drv_timer_init(...) changes content of the static twi_control_block_t structure

Hello,

Today I stumbled upon very strange nRF52832 behaviour which I cannot explain. I am using two TWIM instances (0 and 1) and one SPIM instance (2).

First strange behaviour was that the TWIM instance 1 is working OK and ... (more)

71
views
no
no

## Improving nrf_drv_timer accuracy

Hi guys,

I'm trying to use the HFCLK to generate high resolution timing. Ideally at the millisecond resolution. I've written a layer around the nrf_drv_timer.c module. I'm using PPI to reset the Timer as it generates ... (more)

#### Statistics

• Total users: 26365
• Latest user: Emma Garratt
• Resolved questions: 11565
• Total questions: 28763

## Recent blog posts

• ### How to interface a Nordic Thingy:52 using Amazon Alexa

Posted 2018-01-24 01:05:26 by gamnes
• ### 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

## Recent questions

• ### Can BLE 4.0 devices support Numeric comparison?

Posted 2018-01-24 00:29:20 by KV
• ### Periodic (~4s) current blip in Low Power mode NRF52832 SDK V12.3

Posted 2018-01-23 23:55:52 by koniho
• ### nrfutil, nRF Connect: Thingy52 DFU fails with message "FW version failure (Code = 5)"

Posted 2018-01-23 18:06:26 by Till
• ### nrf_sniffer_2.0.0-beta-1_51296aa/PCA10040/windows 7 not working

Posted 2018-01-23 18:03:32 by BramPeeters
• ### How send message to all from peripheral to peripheral in the multiperipheral example?

Posted 2018-01-23 17:20:07 by Renato Silva