<?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>NCS 2.7.0 and &amp;quot;requires-ulbpr&amp;quot; for spi-nor</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/113449/ncs-2-7-0-and-requires-ulbpr-for-spi-nor</link><description>Hello, 
 I am currently migrating from NCS 2.6.0 to NCS 2.7.0 on my board with an NRF9160. 
 During that process I switched to the new hardware model and to sysbuild. As far as I see everything works as expected after the migration with NCS 2.7.0, except</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 27 Aug 2024 07:16:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/113449/ncs-2-7-0-and-requires-ulbpr-for-spi-nor" /><item><title>RE: NCS 2.7.0 and "requires-ulbpr" for spi-nor</title><link>https://devzone.nordicsemi.com/thread/499894?ContentTypeID=1</link><pubDate>Tue, 27 Aug 2024 07:16:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a07836d0-d0cc-4ff9-9f47-85676dfd5858</guid><dc:creator>rw_w</dc:creator><description>&lt;p&gt;Ok, I will check with the Zephyr Issue Board on Github.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.7.0 and "requires-ulbpr" for spi-nor</title><link>https://devzone.nordicsemi.com/thread/499668?ContentTypeID=1</link><pubDate>Mon, 26 Aug 2024 07:18:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a1340459-ae18-40b5-932a-057af9d17647</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;There seems to have been some changes to the spi_nor.c driver in NCS 2.7.0 that causes this. The changes made seems to be done by Zephyr.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;&amp;nbsp;There is link to the file on github with the &amp;#39;&amp;#39;blame&amp;#39;&amp;#39; turned on&lt;/span&gt;&lt;/span&gt;&lt;span&gt;&lt;span dir="ltr"&gt;&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;a title="https://github.com/nrfconnect/sdk-zephyr/blame/main/drivers/flash/spi_nor.c" href="https://github.com/nrfconnect/sdk-zephyr/blame/main/drivers/flash/spi_nor.c" rel="noopener noreferrer" target="_blank"&gt;https://github.com/nrfconnect/sdk-zephyr/blame/main/drivers/flash/spi_nor.c&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.7.0 and "requires-ulbpr" for spi-nor</title><link>https://devzone.nordicsemi.com/thread/497940?ContentTypeID=1</link><pubDate>Tue, 13 Aug 2024 07:29:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c5001ad-88f5-4b03-b302-e0038137d069</guid><dc:creator>rw_w</dc:creator><description>&lt;p&gt;In the spi_nor driver (zephyr/drivers/flash/spi_nor.c) the struct spi_nor_config in v2.7.0 now also contains flags for some device tree opt-ins:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;struct spi_nor_config {
    ...
	/* exist flags for dts opt-ins */
	bool dpd_exist:1;
	bool dpd_wakeup_sequence_exist:1;
	bool mxicy_mx25r_power_mode_exist:1;
	bool reset_gpios_exist:1;
	bool requires_ulbpr_exist:1;
	bool wp_gpios_exist:1;
	bool hold_gpios_exist:1;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;If CONFIG_SPI_NOR_SFDP_RUNTIME=y is not used in the project configuration, requires_ulpbr&amp;nbsp;from the devicetree is evaluated correctly and &lt;span dir="ltr"&gt;cfg-&amp;gt;requires_ulbpr_exist&lt;/span&gt; is set to 1.&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;If CONFIG_SPI_NOR_SFDP_RUNTIME=y is used in the project configuration, it seems that requires_ulpbr from the devicetree is not evaluated and &lt;span dir="ltr"&gt;cfg-&amp;gt;requires_ulbpr_exist&lt;/span&gt; stays 0.&lt;/p&gt;
&lt;p&gt;The reason for that seems to be (line 1678):&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;#define GENERATE_CONFIG_STRUCT(idx)								\
	static const struct spi_nor_config spi_nor_##idx##_config = {				\
		.spi = SPI_DT_SPEC_INST_GET(idx, SPI_WORD_SET(8), CONFIG_SPI_NOR_CS_WAIT_DELAY),\
		COND_CODE_1(CONFIG_SPI_NOR_SFDP_RUNTIME, EMPTY(), (INST_CONFIG_STRUCT_GEN(idx)))};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;So INST_CONFIG_STRUCT_GEN(idx), which would set &lt;span dir="ltr"&gt;cfg-&amp;gt;requires_ulbpr_exist&lt;/span&gt; according to the device tree, is not called if CONFIG_SPI_NOR_SFDP_RUNTIME is used. But there also does not seem to be any other way to provide the information that ulbpr command is required to the spi nor driver at runtime.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.7.0 and "requires-ulbpr" for spi-nor</title><link>https://devzone.nordicsemi.com/thread/497665?ContentTypeID=1</link><pubDate>Fri, 09 Aug 2024 15:17:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0be17e65-8e11-4279-803f-a6e6e3bb6b63</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Can you please explain this&lt;span&gt;&lt;span dir="ltr"&gt; &amp;quot;&lt;i&gt;cfg-&amp;gt;requires_ulbpr_exist&lt;/i&gt; is not initialized&amp;quot;?&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.7.0 and "requires-ulbpr" for spi-nor</title><link>https://devzone.nordicsemi.com/thread/496515?ContentTypeID=1</link><pubDate>Thu, 01 Aug 2024 06:32:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b45d526c-e416-4e22-b3f7-908903aaf1c1</guid><dc:creator>rw_w</dc:creator><description>&lt;p&gt;Yes, it is enabled in the device tree. That is not the problem.&lt;/p&gt;
&lt;p&gt;The problem is that if &lt;strong&gt;&lt;em&gt;CONFIG_SPI_NOR_SFDP_RUNTIME=y &lt;/em&gt;&lt;/strong&gt;is used in the prj.conf file &lt;em&gt;cfg-&amp;gt;requires_ulbpr_exist&lt;/em&gt; is not initialized for spi_nor in NCS 2.7.0.&lt;strong&gt;&lt;em&gt;&lt;br /&gt;&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.7.0 and "requires-ulbpr" for spi-nor</title><link>https://devzone.nordicsemi.com/thread/496463?ContentTypeID=1</link><pubDate>Wed, 31 Jul 2024 17:42:20 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e27d22be-3299-4db9-8b1e-3715f159c8e7</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello RW,&lt;/p&gt;
&lt;p&gt;In consequence of my last reply (adding the overlay in SLM application);&lt;/p&gt;
&lt;p&gt;The overlay&amp;nbsp;in enabled in the built device tree file.&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/pastedimage1722446737616v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;span dir="ltr"&gt;You can continue to check if cfg-&amp;gt;requires_ulbpr_exist is set with SLM, when run full modem FOTA.&lt;/span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.7.0 and "requires-ulbpr" for spi-nor</title><link>https://devzone.nordicsemi.com/thread/496402?ContentTypeID=1</link><pubDate>Wed, 31 Jul 2024 11:55:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1db63fb1-d176-416a-9eac-1565674dd0be</guid><dc:creator>rw_w</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I tried the jesd216 sample&amp;nbsp; (&lt;a id="" href="https://docs.zephyrproject.org/latest/samples/drivers/jesd216/README.html"&gt;https://docs.zephyrproject.org/latest/samples/drivers/jesd216/README.html&lt;/a&gt;) on the NRF9160 DK with the overlay changes you suggested, as I could not find an easy way to access the NOR-flash in the serial_lte_modem application.&lt;/p&gt;
&lt;p&gt;I extended this sample to also perform a write operation and print out the state of &lt;em&gt;cfg-&amp;gt;requires_ulbpr_exist&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;It was working on the NRF9160 DK and also on my hardware (and devicetree) as expected (the parameter was set).&lt;/p&gt;
&lt;p&gt;But if I add &lt;em&gt;CONFIG_SPI_NOR_SFDP_RUNTIME=y&lt;/em&gt; to the configuration of the sample (which is also set in my application)&lt;em&gt; cfg-&amp;gt;requires_ulbpr_exist&lt;/em&gt; is not set on the NRF9160 DK and on my hardware.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;So it seems &lt;em&gt;cfg-&amp;gt;requires_ulbpr_exist &lt;/em&gt;is not initialized if the SFDP parameters of the NOR-FLASH are read out at runtime (with&lt;em&gt; CONFIG_SPI_NOR_SFDP_RUNTIME=y&lt;/em&gt;).&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Is this behaviour intended?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Regards&lt;/p&gt;
&lt;p&gt;rw&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS 2.7.0 and "requires-ulbpr" for spi-nor</title><link>https://devzone.nordicsemi.com/thread/495849?ContentTypeID=1</link><pubDate>Fri, 26 Jul 2024 16:01:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:73f15fbb-eb92-4cf0-9567-1936dffd4c1c</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello rw,&lt;/p&gt;
&lt;p&gt;Can you please try our official sample (Serila_lte_modem) making this change in overlay file (&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/pastedimage1722009651063v1.png" alt=" " /&gt;) ?&lt;/p&gt;
&lt;p&gt;&amp;amp;arduino_spi {&lt;br /&gt; mx25r64: mx25r6435f@1 {&lt;br /&gt; status = &amp;quot;okay&amp;quot;;&lt;br /&gt; requires-ulbpr;&lt;br /&gt; };&lt;br /&gt; };&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>