Use nRF timer in DWM1001C

Hello all! I have been using the ss_twr examples as a basis for my project. I need to measure a period of at least 30 seconds. I have considered using the system time of DW1000 but it is very impractical as it rolls back every ~17 seconds. I am now considering using the system time or timer functionality of the nRF microcontroller within DWM1001C. Is there any function/API that allows me to directly reach the system time of nRF? Or is it possible to build a scheme where I can trigger/start a timer anytime I want and it will inform me as an interrupt? I know a basic interrupt example is given alongside the DWM1001 firmware files but I would like to be able to enable/disable the timer anytime I want. Besides, it would be easier if I could just use the methods provided in the ss_twr examples.

Thanks in advance!

To start timer of MCU the best for you would be to go through nRF SDK examples on how-to use timers. I do not see how this connected to DW1000 chip…
Just read the documentation and through examples folder in the SDK…
Regards

Your question is ambiguous because you describe exactly what timers are made for. The ready example won’t provide you that but as alliv, suggested, you can use the nRF sdk, that’s the clean and official way to use a hardware timer.

Now an additional ambiguity is that you did not describe what you want to use the timer for, what resulution do you need, what response time and what does it have to do with uwb ?

With hw timers you can adjust the prescaler for the right compromise between resolution and loop over period.

The uwb timer has precision to measure the speed of light but it’s only triggered with uwb, you can’t control it but only read it.

Starting an uwb transaction needs to predict approximately when the transaction will start and it is safeguarded with an uwb rx timeout, for such rough sync I used the nrf timer through zephyr function call.

In case you need high precision event measures with nrf timer, keep in mind that thre is the PPI feature of nrf where you can trigger measures from external events or interrupts

In case you need low precision e.g. 1ms, no need for hw timer, you can use an os sw tick timer or your own sw timer.

Timer peripheral
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Ftimer.html

PPI
https://infocenter.nordicsemi.com/index.jsp?topic=%2Fcom.nordic.infocenter.nrf52832.ps.v1.1%2Fppi.html