nRF5340 Wireless Timer Synchronization

Hello,

Over the past few days I have been trying to port this sample application to work on the nrf5340 NET core, but I am starting to think that it's not possible.

I have been successful in getting it to compile after many changes, mostly changing ppi funcion calls to their corresponding dppi or gppi calls. During this process I also had to change which timers are used, and this is what I think the inherent incompatibility is.

According to its documentation, MPSL gives the application "exclusive and real-time access" to TIMER0, and TIMER1 for the nRF53 series. This is not an issue with the 52840 for example, since the application can instead use TIMER3 and TIMER4. However, the 5340 NET core only has 3 timers, and since MPSL owns both TIMER0 and TIMER1, there is only 1 timer available for the application to use.

Am I correct in saying this? If so, are there any equivalent sample applications that demonstrate high-precision synchronization between two nRF5340's?

My end goal is to be able to synchronize sensor data acquisition wirelessly. I think toggling a GPIO pin is a good place to start, since this would allow me to measure the delay between two rising/falling edges, thereby evaluating the precision of synchronization.

I have experimented with the nrf_dm sample, which must be doing some kind of synchronization, but I don't need distance measurement, just time sync... Would it be possible to strip down this sample application to only give me gpio sync signals?

I've also ported periodic_adv and periodic_sync to work on the 5340, but I have no idea where in the code the actual synchronization occurs, and thus where in the code I could toggle the GPIO pin...

I'm a bit discouraged at the moment, and thinking about using a 52840 paired with another microcontroller for my application instead of the 5340, but I'd really rather use the 5340 since it would be a one-chip solution.

Please let me know if there are any more samples, or any ideas as to how I might go about implementing time sync on the 5340.

Related