Wireless timer synchronization nRF5340 (build error).

Hello

I want to make an application that will be sending data from 3 peripheral BLE devices to the central device which wil be connected to PC and transmitting data (from all 3 peripheral devices) to it.
Sensor data will be received and sent 100 times per second from each device to the central device. Data from sensors must be collected and sent at the same time to prevent the receiver (central device) to receiving data from different moments in time. The measurement should last even 3 hours and clocks of peripheral devices cannot differ so much that the data received by the central device will be shifted relative to each other in time by more than 1 ms during the entire measurement.

I saw this time synchronization project:
Wireless timer synchronization among nRF5 devices
https://github.com/nordic-auko/nRF5-ble-timesync-demo

but I have problem with building it on nRF5340.
I am using NRF Connect SDK 2.5.0 and toolchain 2.5.0


This my build configuration:


this is what I have on my terminal:


I don't know why this error occurred. I just try to build code from github without any modyfication.
Can you help me resolve this problem?

I also have a question whether this is the only example of wireless clock synchronization or are there others (which might be better suited for my application) ?


Best Regards

  • Hi Brady,

    blue_dew said:
    This "flash-time" error leads me to believe I'm incorrectly increasing the 5340's network core flash size.

    You can find in the nRF5340 product specification that the flash size for network core is fixed in hardware to 256 KB.

    EDIT: Have you tried to resolve dependencies for config options shown in the first screenshot in your previous reply?

    Best regards,
    Dejan

  • Hi dejans,

    Thank you for the reply! I have tried resolving the dependencies by modifying the prj.conf file as follows:
    8030.prj.conf

    Here is a quick screenshot of the above conf file:

    Notable changes include the previously mentioned size optimization and removal of the shell config. I have also enabled DPPI instead of PPI. Finally, the changes to the timer configs because from the nrf5340 spec sheet I see the following:

    This leads me to believe that "TIMER 3" and "TIMER 4" are not available to the network core, so of course, I would get the earlier warnings. This builds as expected but does not run. 
    ---
    Thankfully I figured out what I was missing!!! I reviewed my build config and saw that I forgot to add the config fragment for the cputnet.conf file from the 'boards/' directory. I don't understand why the confs for the nrf5340dk_nrf5340_cpunet.conf are what they are, but not having them caused a SIGTRAP to be thrown within my net core application. I'm now getting terminal output after adding that conf as a "config fragment" and the following outputs on my oscilloscope when running three nrf5340dks together:


    ^ terminal output of all three nrf5340dks

    ^ updated build config w/ the config fragment "boards/nrf5340dk_nrf5340_cpunet.conf" added

    ^ oscilloscope output from the 3 dev kits gpio pin
    and finally, my favorite image...

    all three nrf5340dks lined up and working great as expected!!! 

    ---

    Thank you again for the reply  and the forum post  

    Best,
    Brady Adcock


  • Hi Brady,

    blue_dew said:
    all three nrf5340dks lined up and working great as expected!!! 

    This is great to hear. Thank you for the update.

    Best regards,
    Dejan

Related