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

How to achieve best possible timestamp resolution?

Hello,

I'm looking for a solution to achieve best possible resolution timestamps of received advertising packets for BLE. Is there any specific chip that you would recommend me? I know that this is a rather general question, but You can point me to the appropriate documentation and I will research it further.

I never used nRF chips before, from what I have understood till now is that you provide your own host software stack called "SoftDevice". There must be some hardware interrupts signals from the link layer that the advertising packet has been received. Is it possible to expand interruption handler with a peripheral timer logic to gather timestamps? What approximate accuracy is possible with such a method?

Best Regards, Michał

Parents
  • Hi

    The nRF52 is our most recent device, which is a successor for nRF51. nRF52 has better performance, both in regards of CPU power and lower current consumption. They are both fit for the job with both low power RTC timer peripherals and high accuracy TIMER peripherals.

    The RTC peripherals use 32kHz clock, which you can use to generate timestamps, but naturally it will only have resolution of 32kHz. The TIMER peripherals run on 16MHz clock, so the timing resolution is 16MHz.

    Each peripheral on nRF51/nRF52 has its own interrupt, that can be enabled. In the nRF5 SDK, there are peripheral examples that shows you how to set up these periphal interrupts and also how to set up and use the peripherals.

    When advertising packet is received from a BLE peripheral device, you will get an interrupt in the application, i.e. the BLE_GAP_EVT_ADV_REPORT event. I think there are several central examples in the nRF5 SDK that implement this. The timing accuracy is perhaps not that reliable, as the event is delayed if there are other pending events from the softdevice. This might be fairly accurate though if you are only doing scanning, and do not have other active peripheral or central connections.

    The current time service might also be relevant

Reply
  • Hi

    The nRF52 is our most recent device, which is a successor for nRF51. nRF52 has better performance, both in regards of CPU power and lower current consumption. They are both fit for the job with both low power RTC timer peripherals and high accuracy TIMER peripherals.

    The RTC peripherals use 32kHz clock, which you can use to generate timestamps, but naturally it will only have resolution of 32kHz. The TIMER peripherals run on 16MHz clock, so the timing resolution is 16MHz.

    Each peripheral on nRF51/nRF52 has its own interrupt, that can be enabled. In the nRF5 SDK, there are peripheral examples that shows you how to set up these periphal interrupts and also how to set up and use the peripherals.

    When advertising packet is received from a BLE peripheral device, you will get an interrupt in the application, i.e. the BLE_GAP_EVT_ADV_REPORT event. I think there are several central examples in the nRF5 SDK that implement this. The timing accuracy is perhaps not that reliable, as the event is delayed if there are other pending events from the softdevice. This might be fairly accurate though if you are only doing scanning, and do not have other active peripheral or central connections.

    The current time service might also be relevant

Children
No Data
Related