<?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>XIP of nRF52840</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/128599/xip-of-nrf52840</link><description>Hello, 
 I want to try the XIP function on the nrf52840 DK, because we want to use this function later. 
 But i can not find any example of XIP on 52840. So i tried to modify the spi flash example, i try to add the &amp;quot;.ld&amp;quot; file, and successfully saved an</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 03 Jul 2026 16:26:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/128599/xip-of-nrf52840" /><item><title>RE: XIP of nRF52840</title><link>https://devzone.nordicsemi.com/thread/568780?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2026 16:26:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:36f3055f-098a-431a-ad34-bb6a52eb90c9</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;Thank you so much for letting us know about this&amp;nbsp;&lt;span&gt;nrf_qspi_nor_xip_enable() which solves the issue.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;BR&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Kazi&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XIP of nRF52840</title><link>https://devzone.nordicsemi.com/thread/568754?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2026 08:23:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5e57793-b2ae-4620-b0cb-024cdf6f0a15</guid><dc:creator>huma</dc:creator><description>&lt;p&gt;Hello&amp;nbsp; Kazi,&lt;/p&gt;
&lt;p&gt;Thank you very much!&lt;/p&gt;
&lt;p&gt;I have found the problem.&lt;/p&gt;
&lt;p&gt;The important&amp;nbsp;thing is that we need add follow api:&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;nrf_qspi_nor_xip_enable&lt;/span&gt;&lt;span&gt;(flash_dev, &lt;/span&gt;&lt;span&gt;true&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;p&gt;&amp;nbsp;Otherwise the XIP function is not&amp;nbsp; really enable.&lt;/p&gt;
&lt;p&gt;Thank you very much again for your reply!&lt;/p&gt;
&lt;p&gt;You can&amp;nbsp;close this ticket.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XIP of nRF52840</title><link>https://devzone.nordicsemi.com/thread/568752?ContentTypeID=1</link><pubDate>Fri, 03 Jul 2026 08:14:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1398a377-8231-4b5f-9f33-e10aa0688adc</guid><dc:creator>Kazi Afroza Sultana</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;&lt;code&gt;/* Map custom readonly section into nRF52840 QSPI XIP window. */&lt;/code&gt;&lt;br /&gt;&lt;code&gt;.extflash_rodata 0x12100000 : ALIGN(4)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;{&lt;/code&gt;&lt;br /&gt;&lt;code&gt;KEEP(*(.extflash_rodata))&lt;/code&gt;&lt;br /&gt;&lt;code&gt;}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I have looked at yoru code. First I run this and it shows normal output like I2S starts. Later I added few lines in the code to check if the array is linked into the XIP region&amp;nbsp;&lt;span&gt;0x12100000&amp;nbsp; as it&amp;#39;s in the code.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;printk(&amp;quot;voice addr = %p\n&amp;quot;, __48kHz16bit_mono_voice_smoke_pcm);

const int16_t *p = (const int16_t *)__48kHz16bit_mono_voice_smoke_pcm;

printk(&amp;quot;First 8 samples:\n&amp;quot;);
for (int i = 0; i &amp;lt; 8; i++) {
    printk(&amp;quot;%d &amp;quot;, p[i]);
}
printk(&amp;quot;\n&amp;quot;);&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And prinktk in the TX data blocks to check I2S DMA buffer&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;* Prepare TX data blocks */
	for (tx_idx = 0; tx_idx &amp;lt; NUM_BLOCKS; tx_idx++) {
		err = k_mem_slab_alloc(&amp;amp;tx_mem_slab, &amp;amp;tx_block[tx_idx], K_FOREVER);
printk(&amp;quot;tx_block = %p\n&amp;quot;, tx_block[tx_idx]);
		if(err) {
			LOG_ERR(&amp;quot;k_mem_slab_alloc() failed. (err %d)&amp;quot;, err);
			return err;&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;The output shows good. The array is linked into the XIP region (0x12100000); no issue with that, I2S DMA buffers are in SRAM (ox2003xxx).&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&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/pastedimage1783066177260v1.png" alt=" " /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But I need to find out why first 8 samples shows zero. I will try to print more samples to check if those are still zero even more into the file. I will get back to you soon.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thanks.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;BR&lt;br /&gt;Kazi&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: XIP of nRF52840</title><link>https://devzone.nordicsemi.com/thread/568631?ContentTypeID=1</link><pubDate>Wed, 01 Jul 2026 06:34:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8d758dd4-cfcd-443f-ab46-b7b937581704</guid><dc:creator>huma</dc:creator><description>&lt;p&gt;I found that if i add the &amp;quot;volatile&amp;quot; to the &amp;quot;&lt;span&gt;__48kHz16bit_mono_voice_smoke_pcm&amp;quot;, the print&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;&lt;span&gt; &amp;quot;&lt;/span&gt;&lt;span&gt;LOG_INF&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;__48kHz16bit_mono_voice_smoke_pcm: &lt;/span&gt;&lt;span&gt;%x&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;%x&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;%x&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;%x&lt;/span&gt;&lt;span&gt;&amp;quot;&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt;__48kHz16bit_mono_voice_smoke_pcm&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;], &lt;/span&gt;&lt;span&gt;__48kHz16bit_mono_voice_smoke_pcm&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;1000&lt;/span&gt;&lt;span&gt;], &lt;/span&gt;&lt;span&gt;__48kHz16bit_mono_voice_smoke_pcm&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;2000&lt;/span&gt;&lt;span&gt;], &lt;/span&gt;&lt;span&gt;__48kHz16bit_mono_voice_smoke_pcm&lt;/span&gt;&lt;span&gt;[&lt;/span&gt;&lt;span&gt;3000&lt;/span&gt;&lt;span&gt;]);&lt;/span&gt;&amp;quot;&lt;/code&gt;&lt;/p&gt;
&lt;div&gt;
&lt;div&gt;will be always &amp;quot;0&amp;quot;(if&amp;nbsp; not add the volatile, the last two data will have other value), which maybe means that the XIP function has not been enable? The compiler optimized my code?&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>