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

How to access the TIMER3 in wireless timer sync?

Hello,

I found this great blog entry about synchronizing timers on different devices: https://devzone.nordicsemi.com/nordic/short-range-guides/b/bluetooth-low-energy/posts/wireless-timer-synchronization-among-nrf5-devices

It works just fine on a nRF52840DK and a nRF52DK. Timers on multiple nRF5 devices are synced by one device (master) sending sync packets containing captured timer values to other devices (nodes). (TIMER3 is free running, TIMER2 counts TIMER3 overflows).

At the moment I am struggeling to access this synchronized TIMER3 on the two boards. I am familiar with setting up a TIMER without wireless timer sync. 

So here are my questions:

1. How can I define CC, Prescaler, Mode, Bitmode, the interrupt handler and so forth when using wireless timer sync?

2. Can anybody provide me some advice how to access this synchronized TIMER3 properly? 

Thank you very much in advance.

  • Hello Audun,

    I have another question regarding the wireless timer sync.

    Do you have any experience how the wireless timer sync affects the throughput of the NUS in this ble_app_uart example?

    Thank you very much in advance.

    Best regards,

    Michael

  • Hi Michael,

    sadly I've not really tested NUS throughput together with time_sync. If there is a negative impact on throughput I imagine it would be slight.

    The time_sync code requests timeslots at normal priority, which is below BLE activity: https://infocenter.nordicsemi.com/topic/sds_s132/SDS/s1xx/multilink_scheduling/priorities_and_events_intro.html#priorities_and_events__table_qgg_zc2_cs

    Audun

  • Hello Audun,

    thank you very much for your reply. 

    I added the wireless timer sync successfully to my application and it works great. I already knew that the usage of the wirless timer sync would increase the current consumption. But I did not expect, that the power consumption increases so much.

    The power consumption of the peripherals was ~1mA before. With wireless timer sync the power consumption of the peripherals (which receive the sync pakets) increases to ~48mA. This is too much for our application. I should achieve <5mA or at least <10mA. 

    In a previous comment you already mentioned:

    Note that in its current version the receivers will run the radio as much as possible in receive mode, which is not great for power consumption. An improved implementation would have the receivers only turn on the radio when it expects the transmitter to send a packet.

    I need to lower the current consumption of the peripherals (receivers of the sync pakets). I am using the lowest sync interval of 1Hz (1sec). 

    My questions:

    1. Can you please provide me some guidance how to lower this current consumption?

    2. Can you please give me some suggestions what changes do I have to make?

    3. How can I implement that "the receivers only turn on the radio when it expects the transmitter to send a paket"?

    Finally, it looks like that the success of our whole project depends on your help.

    Any kind of help is always appreciated. Thank you very much in advance.

    Best regards,

    Michael

  • Hi Michael,

    It is surprising that you see this high power consumption. I was expecting average current on the receiver to be in line with the RX scenario outlined here: https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/pmu.html?cp=4_2_0_16_0_0_0#unique_1047287462

    (these numbers show current consumption for the entire chip for the given scenario)

    If you are not using the DC/DC converter in your design, these numbers would be higher (in the ~13 mA range). Ref. electrical characteristics of the radio peripheral.

    How are you measuring the current? And is there other circuitry in your design that could be contributing to the consumption you see?

    Audun

  • Hello Audun,

    thank you so much for your quick reply.

    I was expecting average current on the receiver to be in line with the RX scenario outlined here

    I know these current consumption scenarios and I also expected them. That is the reason why I am so curious.

    I am using a DCDC-regulator and it is activated. 

    How are you measuring the current?

    I flashed my peripheral software on my target hardware: BMD-300 (contains nRF52832 chip)

    I measure the current at the supply pins of this module. So there are no other components involved.

    The software works like it should, but with too high current consumption.

    If I comment out sync_timer_init() in the main function, the receiver should not run the radio all the time and the wireless timer sync is "deactivated". Is that correct? 

    I commented sync_timer_init() out and the current consumption stays at ~40mA. So it looks like that the wireless timer sync is not responsible for the huge current draw. Can you confirm that?

    Any kind of feedback is appreciated. Thank you very much.

    Kind regards,

    Michael

    ------------------------------------------------------------------------------------------------------------------

    #Edit (one hour later):

    Hello Audun, I programmed another BMD-300 to check if the actual BMD-300 is faulty:

    Now I can achieve a current consumption of ~7mA @ 2.45 V. When I disable wireless timer sync by comment sync_timer_init() out, I have a consumption of ~1mA @ 2,45V. So it seems like the wireless timer sync cause an extra 6 mA. This sounds reasonable I guess?

    We are still interested in lowering the total current consumption. We would appreciate very much if you could answer our previous questions:

    2. Can you please give me some suggestions what changes do I have to make?

    3. How can I implement that "the receivers only turn on the radio when it expects the transmitter to send a paket"?

    Thank you very much in advance.

    Best regards,

    Michael

Related