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

Parents Reply Children
  • Hi,

    Please upload your log file here using these steps
    1. click on Insert
    2. choose Image/video/file
    3. click on Upload and locate your file
    4. press OK to upload it

    Was building successful using nrf52840-dk?

    Best regards,
    Dejan

  • Hi,

    Here is log file for nRF5340 build





    No, build wasn't successful on nRF52840
    log with error:




    Best Regards

  • Hi,

    I have tested the sample again on nrf52840-dk and building was successful. To further test, clone the repository close to your root folder, open terminal window from NCS v2.5.0 Toolchain Manager and run "west build -b nrf52840dk_nrf52840 -d build" command from your terminal.

    On nrf5340-dk, you could try to build the sample for the network core. The network core conf file enables empty application core image.

    Best regards,
    Dejan

  • Hi,

    Thanks a lot, now it is working on nRF5340 network core.

    Regarding to nRF52840 I found out why building was unsuccessful. I don't know why, but in my SDK v2.5.0 there was no tinycrypt library, so I copied it from another SDK folder (I had this library in SDK 2.4.3 and 2.6.1 folders, but not in 2.5.0 folder) and now it is building.

    I also have 2 more questions.
    1. Why this sample isn't building when I choose nRF5340 cpuapp ?
    2. How to convert this sample for SDK v2.6.1 or v2.7.0 ?

    Best Regards

  • Hi,

    ..... said:
    1. Why this sample isn't building when I choose nRF5340 cpuapp ?

    This sample has the requirement to be built for the network core.

    ..... said:
    2. How to convert this sample for SDK v2.6.1 or v2.7.0 ?

    The timesync sample has been made as out-of-tree application with its own west manifest. You could try to update west.yml file for the application with appropriate NCS version you want to use. You can look at nrf west.yml for needed versions. Then you should use "west init -l timesync_sample" and "west update". Check that ZEPHYR_BASE points to your local Zephyr directory. There is an old guide which provides relevant information. Afterwards, try to build and flash the sample and look for possible clues in the error log (if you get an error). 

    Best regards,
    Dejan

Related