This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

app timer issue

Hi,

device : nrf52832

SDK : 12.3.0

base code : ble_app_uart

There is a problem using the app timer.

I created an app timer like an attachment(excel file).

Then start app timer every time data is received (0xDD) from phone to BLE.

Normally, it works correctly with the interval set as below.

Sometimes, however, the interval does not work normally, as shown in the waveform below.

Why are these symptoms occurring?

What is the solution?

app timer issue.xlsx

Thanks

Parents
  • That is normal for any interrupt driven, low priority routine.  The softdevice always has the highest priority interrupt and takes precedence low priority interrupts. When you combine this with the random backoff in the BLE standard, low priority interrupts will always have a random latency of up to about a millisecond.  Sending a lot of data only exacerbates the problem as your low priority interrupt will be more likely to get queued.

    For these reasons, anything requiring precise timing should always be driven off of either the RTC or main HF timers and not in ISR's.

Reply
  • That is normal for any interrupt driven, low priority routine.  The softdevice always has the highest priority interrupt and takes precedence low priority interrupts. When you combine this with the random backoff in the BLE standard, low priority interrupts will always have a random latency of up to about a millisecond.  Sending a lot of data only exacerbates the problem as your low priority interrupt will be more likely to get queued.

    For these reasons, anything requiring precise timing should always be driven off of either the RTC or main HF timers and not in ISR's.

Children
No Data
Related