<?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>Run a standard Zephyr application in NRF5</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/96814/run-a-standard-zephyr-application-in-nrf5</link><description>I have a sample application running in standard Zephyr 3.2.99. The application is just looping doing a sleep (k_sleep(K_SECONDS(10))) and logging a line. 
 I tried to build it to be run in nRF with MBR, Sofdevice (disabled) and bootloader. This will not</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 02 Mar 2023 10:54:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/96814/run-a-standard-zephyr-application-in-nrf5" /><item><title>RE: Run a standard Zephyr application in NRF5</title><link>https://devzone.nordicsemi.com/thread/412966?ContentTypeID=1</link><pubDate>Thu, 02 Mar 2023 10:54:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b787d5a7-b7cd-4b13-9709-c9e94932cc4f</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;That you for the detailed pull request, it helps us a lot too!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Run a standard Zephyr application in NRF5</title><link>https://devzone.nordicsemi.com/thread/412509?ContentTypeID=1</link><pubDate>Tue, 28 Feb 2023 12:47:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a52d8553-cca4-4956-ab99-dbe2b8293566</guid><dc:creator>giansta</dc:creator><description>&lt;p&gt;Hello. I&amp;#39;ve proposed a fix in Zephyr init code in &lt;a id="" href="https://github.com/zephyrproject-rtos/zephyr/pull/55259"&gt;https://github.com/zephyrproject-rtos/zephyr/pull/55259&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Thank you for support.&lt;/p&gt;
&lt;p&gt;I closed the case by accident, indeed I would have waited the Zephyr PR above to be accepted first :-(&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Run a standard Zephyr application in NRF5</title><link>https://devzone.nordicsemi.com/thread/412233?ContentTypeID=1</link><pubDate>Mon, 27 Feb 2023 11:23:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5895685f-0f59-46cd-a282-e109a76ef049</guid><dc:creator>giansta</dc:creator><description>&lt;p&gt;Hello. Last week finally I found a solution that looks promising.&lt;br /&gt;The fix is at moment in my application init:&lt;br /&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;/* Fix: Reset RTC1 bits resulting from nRF5 environment that prevent scheduling after ~ 4 minutes. */&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;NRF_RTC1-&amp;gt;INTENCLR = 0x00020000;&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;NRF_RTC1-&amp;gt;EVTENCLR = 0x00020002;&lt;/strong&gt;&lt;br /&gt;I found this using a rough empirical approach: saving the processor registers values when the application is started with the working official Zephyr application and comparing them with the Zephyr application built for nRF5 SDK.&lt;br /&gt;After excluding non significant ones, the main difference was in&lt;br /&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; INTENSET = INTENCLR = 0x00010002 -&amp;gt; 0x00030002&lt;/strong&gt;&lt;br /&gt;&lt;strong&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; EVTEN = EVTENSET = EVTENCLR = 0x00010000 -&amp;gt; 0x00030002&lt;/strong&gt;&lt;br /&gt;it seems like the enable interrupt and event routing for COMPARE[1] is set in nRF5 environment in addition to the ones for COMPARE[0].&lt;br /&gt;I don&amp;#39;t have the complete picture of the clock usage to understand why this produces the effects I saw. I&amp;#39;ll try to have a look.&lt;br /&gt;Yet I&amp;#39;d like especially to look at the Zephyr initialization and why the results are different even when using &lt;strong&gt;CONFIG_INIT_ARCH_HW_AT_BOOT&lt;/strong&gt; that I would have expected to fix my issue.&lt;br /&gt;I&amp;#39;m reporting these results, even in case you have useful suggestions.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Run a standard Zephyr application in NRF5</title><link>https://devzone.nordicsemi.com/thread/411648?ContentTypeID=1</link><pubDate>Thu, 23 Feb 2023 12:25:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f072eed3-a271-4705-9b1f-6b0782bc0df0</guid><dc:creator>giansta</dc:creator><description>&lt;p&gt;Hello. I did some further tests.&lt;/p&gt;
&lt;p&gt;First, as Vidar mentioned in Quentin&amp;#39;s ticket 298651, I checked the VTOR register logging its value at application start.&lt;br /&gt;It has the correct application address, that is 0x26000 or 0x1000, depending on where I locate it. As expected, nothing changes re-writing it.&lt;/p&gt;
&lt;p&gt;Second, I would highlight the timings: the time when the k_sleep() call waits forever instead than 10 seconds happens after ~ 4 minutes (00:04:22 last log time). After that, the Zephyr timeout function sys_clock_announce() is called exactly every 4 minutes 16 seconds, that is half of the 24-bit timeout in nrf_rtc_timer: this is a good coincidence.&lt;br /&gt;I verified that the RTC interrupts happen as expected every ~ 8 minutes and 32 seconds.&lt;br /&gt;I&amp;#39;m trying to investigate what can happen differently (register values or whatever) when started by nRF5 bootloader instead of MCUboot.&lt;/p&gt;
&lt;p&gt;Perhaps you may have some advice.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Run a standard Zephyr application in NRF5</title><link>https://devzone.nordicsemi.com/thread/411387?ContentTypeID=1</link><pubDate>Wed, 22 Feb 2023 13:40:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:02abc4bf-fece-4ddc-b315-fc11d4a9a0da</guid><dc:creator>Quentin@NX</dc:creator><description>&lt;p&gt;Hello &lt;a href="https://devzone.nordicsemi.com/members/haakonsh"&gt;haakonsh&lt;/a&gt; !&lt;br /&gt;I&amp;#39;m Quentin, coworker on Giancarlo at Nexxiot.&lt;/p&gt;
&lt;p&gt;The context and reason why in this project we&amp;#39;re not using the NRF connect SDK is explained here in this ticket :&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/support/298651"&gt;https://devzone.nordicsemi.com/support/298651&lt;/a&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Basically, lots of legacy devices, we need to write a migration firmware to get away from proprietary legacy code. &lt;br /&gt;We&amp;#39;re currently writing this migration firmware, and want to boot the Zephyr application through the proprietary bootloader (then erase everything and set the memory properly).&lt;/p&gt;
&lt;p&gt;The reason for the Zephyr application is because, well, the drivers are written for the Zephyr interface.&lt;/p&gt;
&lt;p&gt;I hope this gives more context!&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Quentin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Run a standard Zephyr application in NRF5</title><link>https://devzone.nordicsemi.com/thread/410709?ContentTypeID=1</link><pubDate>Fri, 17 Feb 2023 16:39:28 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6e1fdd17-9409-4dc3-85bc-3eb5418156a8</guid><dc:creator>haakonsh</dc:creator><description>&lt;p&gt;I&amp;#39;m afraid we don&amp;#39;t support running zephyr on the nRF5 SDK. Why are you not using the nRF Connect SDK for this application?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>