<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://devzone.nordicsemi.com/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>nRF5340 Wireless Timer Synchronization</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/104191/nrf5340-wireless-timer-synchronization</link><description>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&amp;#39;s not possible. 
 I have been successful in getting it to compile after many changes, mostly changing</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 05 Feb 2024 08:46:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/104191/nrf5340-wireless-timer-synchronization" /><item><title>RE: nRF5340 Wireless Timer Synchronization</title><link>https://devzone.nordicsemi.com/thread/467514?ContentTypeID=1</link><pubDate>Mon, 05 Feb 2024 08:46:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:046646c0-c607-4dbf-ae16-48f61908c166</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Many NCS samples is supported on nRF5340. You can check if the sample is supported by reading the table in the documentation for any of the nrf samples in NCS. As an example, this is the table for the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.2/nrf/samples/bluetooth/peripheral_lbs/README.html#requirements"&gt;Bluetooth: Peripheral LBS sample&lt;/a&gt;:&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1707122571287v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;If you are looking for samples made specifically for the nRF5340 you can find the overview for those &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.2/nrf/samples/nrf5340.html"&gt;here in the NCS documentation&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;The source code for the samples is found on &lt;a href="https://github.com/nrfconnect/sdk-nrf/tree/v2.5.2/samples"&gt;GitHub&lt;/a&gt;, and you can install the SDK by following the instructions in the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.2/nrf/installation.html"&gt;Installation guide&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Wireless Timer Synchronization</title><link>https://devzone.nordicsemi.com/thread/467451?ContentTypeID=1</link><pubDate>Sat, 03 Feb 2024 03:36:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cfd55427-6583-4aa4-9d3b-119d13fabea7</guid><dc:creator>lvh831</dc:creator><description>&lt;p&gt;&lt;span&gt;Hi Maria, is there a sample code for nrf53 with ncs? Thanks.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Wireless Timer Synchronization</title><link>https://devzone.nordicsemi.com/thread/448929?ContentTypeID=1</link><pubDate>Thu, 05 Oct 2023 06:49:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c03202c5-a942-4d40-ac57-ac9b2fe21cf7</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hello again,&lt;/p&gt;
&lt;p&gt;The feedback I got was that porting to the nRF53 should be possible as long as there are enough &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf5340/dppi.html?cp=4_0_0_6_8"&gt;DPPI&lt;/a&gt; and and &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf5340/egu.html#concept_x4j_fx1_lr"&gt;EGU&lt;/a&gt; instances available. You can use the &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf5340/chapters/memory/appmem.html#topic"&gt;Instantiation table&lt;/a&gt; to find out. For the timesync demo the requirements are found &lt;a href="https://github.com/nordic-auko/nRF5-ble-timesync-demo/blob/master/ncs/timesync_sample/src/timesync/Kconfig"&gt;here&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Wireless Timer Synchronization</title><link>https://devzone.nordicsemi.com/thread/448524?ContentTypeID=1</link><pubDate>Mon, 02 Oct 2023 13:13:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:678d653e-8773-4f36-93cd-8935bac08796</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I was able to get some comments on this, and that it could be possible to make the sample work on the nRF5340. I will get back to you very soon with the details.&lt;/p&gt;
&lt;p&gt;Edit (03.10.23): due to unexpected circumstances I did not have the time to provide the details today. Thank you for your patience.&lt;/p&gt;
&lt;p&gt;BR,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Wireless Timer Synchronization</title><link>https://devzone.nordicsemi.com/thread/448176?ContentTypeID=1</link><pubDate>Thu, 28 Sep 2023 13:35:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6ac95580-2a0e-4659-a7de-be2b151a8aba</guid><dc:creator>charles.gilliland</dc:creator><description>&lt;p&gt;Maria, thanks for your response. I understand that you might not know the answers right away - it&amp;#39;s taken me quite a while to wrap my head around all of this. Really I am trying to figure out whether porting this application to the 5340 is worth the time and effort (if it is even possible in the first place), when I could just use a 52840 and have it work immediately.&lt;/p&gt;
&lt;p&gt;And just to clarify I am using NCS v2.4.2, not the nRF5 SDK. I&amp;#39;ve been able to get the application to build, but I am having runtime kernel panics. I did have to make some changes to get the code to compile using v2.4.2, but I don&amp;#39;t have any 52-series dev kits to try it out on.&lt;/p&gt;
&lt;p&gt;The &lt;a href="https://devzone.nordicsemi.com/guides/short-range-guides/b/bluetooth-low-energy/posts/wireless-timer-synchronization-among-nrf5-devices"&gt;original post&lt;/a&gt; by Audun says that &amp;quot;Note that this could be simplified to use only one additional timer, as TIMER0 can be used within timeslots to trigger the radio as well.&amp;quot; This is encouraging, but the post is from 2016 and I can see where the code has changed since then, so I wonder if this is still true...&lt;/p&gt;
&lt;p&gt;I have seen this post,&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/64624/shared-timer-on-nrf5340-between-net-and-app-cpus"&gt;Shared timer on nRF5340 between NET and APP CPUs?&lt;/a&gt;, which is also a bit old but could be useful.&lt;/p&gt;
&lt;p&gt;Please let me know if you have any updates, and I will do the same!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF5340 Wireless Timer Synchronization</title><link>https://devzone.nordicsemi.com/thread/448017?ContentTypeID=1</link><pubDate>Wed, 27 Sep 2023 16:39:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c34dfb45-f2a1-4814-b64c-fa4af4bbccf5</guid><dc:creator>Maria Gilje</dc:creator><description>&lt;p&gt;Hello Charles,&lt;/p&gt;
&lt;p&gt;I can see that you have put a lot of thought into this already, which you have included in your ticket. I will try to address everything.&lt;/p&gt;
[quote user=""]Over the past few days I have been trying to port &lt;a href="https://github.com/nordic-auko/nRF5-ble-timesync-demo"&gt;this sample application&lt;/a&gt;&amp;nbsp;to work on the nrf5340 NET core, but I am starting to think that it&amp;#39;s not possible.[/quote]
&lt;p&gt;I&amp;#39;m not sure if the sample is portable to the nRF5340. I want to ask the developer of the sample application, but they are not available for several weeks. I will try to find out if someone has taken over the responsibility while they are away.&lt;/p&gt;
[quote user=""]&lt;p&gt;According to its &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrfxlib/mpsl/doc/timeslot.html"&gt;documentation&lt;/a&gt;, MPSL gives the application &amp;quot;exclusive and real-time access&amp;quot; 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.&lt;/p&gt;
&lt;p&gt;Am I correct in saying this? &lt;/p&gt;[/quote]
&lt;p&gt;Yes, you are correct. Though a tiny detail is that&amp;nbsp; for nRF52xxx, only TIMER0 is used, so TIMER1 is also available for other uses than MPSL on nRF52xxx.&lt;/p&gt;
&lt;p&gt;For the nRF5340, the network core indeed has only three TIMERs, which only leaves one to be used by the application when MPSL is initialized. The application core also has three TIMERs, and it &lt;em&gt;could&lt;/em&gt;&amp;nbsp;be possible to share one of the TIMERs from the application core with the network core. If you want to try, you can check out this older case for how to do this with registers: &amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/74007/nrf5340-shared-peripherals-between-app-and-net-cores"&gt;nRF5340 Shared Peripherals between APP and NET cores&lt;/a&gt;&amp;nbsp;Note that the case is from before NCS v2.0.0 and the introduction of&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/pin_control.html#pin-control"&gt;pinctrl&lt;/a&gt;, which could have an impact on implementation.&amp;nbsp;&lt;/p&gt;
[quote user=""] If so, are there any equivalent sample applications that demonstrate high-precision synchronization between two nRF5340&amp;#39;s?[/quote]
&lt;p&gt;I don&amp;#39;t think there is any in NCS, but I can ask my colleagues if any of them know of any.&lt;/p&gt;
[quote user=""]I have experimented with the nrf_dm sample, which must be doing some kind of synchronization, but I don&amp;#39;t need distance measurement, just time sync... Would it be possible to strip down this sample application to only give me gpio sync signals?[/quote]
&lt;p&gt;I am not experienced with the Distance measurement sample myself, so I will contact my colleagues to ask for input on this. But logically it seems a bit backwards to kind of generalize a specialized sample. Then again, it depends on how specific the synchronization is in the DM sample, and I don&amp;#39;t know that.&lt;/p&gt;
[quote user=""]I&amp;#39;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...[/quote]
&lt;p&gt;You&amp;#39;re getting a lot of &amp;quot;I don&amp;#39;t know&amp;quot;s from me today, but I will find out if these can be a starting point for you. If you want, you could also ask the Zephyr community about this. They can be reached in the Zephyr Project&amp;#39;s Discord server through &lt;a href="https://discord.com/invite/Ck7jw53nU2"&gt;this invite&lt;/a&gt;. Let me know if they have a quick answer for you. &lt;/p&gt;
[quote user=""]I&amp;#39;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&amp;#39;d really rather use&amp;nbsp;the 5340 since it would be a one-chip solution.[/quote]
&lt;p&gt;I hope that we can find a solution which meets your wishes and needs.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Maria&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>