<?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>Fatal error occurs when enabling flash through CONFIG_FLASH</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/122290/fatal-error-occurs-when-enabling-flash-through-config_flash</link><description>I have a custom NRF9151 board with Windbond W25Q32JV flash, and some other peripherals connected. It also has GPS and LTE which I have tested and work. My UART console is connected over UART0 which I have tested separately as well. I&amp;#39;m trying to test</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 25 Jan 2026 01:00:41 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/122290/fatal-error-occurs-when-enabling-flash-through-config_flash" /><item><title>RE: Fatal error occurs when enabling flash through CONFIG_FLASH</title><link>https://devzone.nordicsemi.com/thread/559502?ContentTypeID=1</link><pubDate>Sun, 25 Jan 2026 01:00:41 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9a053945-d105-45b4-bd6a-b43e113d268c</guid><dc:creator>heisenbug</dc:creator><description>&lt;p&gt;I figured it out. It&amp;#39;s because TF-M still uses UART1 for logging even though the peripheral is disabled in the device tree. Setting&amp;nbsp;CONFIG_TFM_LOG_LEVEL_SILENCE=y fixed the isse&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fatal error occurs when enabling flash through CONFIG_FLASH</title><link>https://devzone.nordicsemi.com/thread/559501?ContentTypeID=1</link><pubDate>Sun, 25 Jan 2026 00:43:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6107cf3d-ff23-4fef-b50e-b8b93c402851</guid><dc:creator>heisenbug</dc:creator><description>&lt;p&gt;At the time I decided to run the spi flash example without TF-M. Coming back to it, I see a clearer issue. I have my SPI flash configured on SPI1 in the device tree. Without TF-M it works as expected. With TF-M, I get the following bus fault:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;[00:00:00.263,793] &amp;lt;err&amp;gt; os: ***** BUS FAULT *****
[00:00:00.263,793] &amp;lt;err&amp;gt; os:   Precise data bus error
[00:00:00.263,793] &amp;lt;err&amp;gt; os:   BFAR Address: 0x0
[00:00:00.263,824] &amp;lt;err&amp;gt; os: r0/a1:  0x00010e0c  r1/a2:  0x00000003  r2/a3:  0x40009000
[00:00:00.263,824] &amp;lt;err&amp;gt; os: r3/a4:  0x0000000a r12/ip:  0x40842500 r14/lr:  0xfffcf8f0
[00:00:00.263,854] &amp;lt;err&amp;gt; os:  xpsr:  0x01000200
[00:00:00.263,854] &amp;lt;err&amp;gt; os: Faulting instruction address (r15/pc): 0x0000b400
[00:00:00.263,885] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR 25: Unknown error on CPU 0
[00:00:00.263,916] &amp;lt;err&amp;gt; os: Current thread: 0x2000ccd8 (unknown)
[00:00:00.325,073] &amp;lt;err&amp;gt; os: Halting system&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;When I check the address location, it points the following line:&amp;nbsp;zephyr/drivers/pinctrl/pinctrl_nrf.c:179&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;When I replace SPI1 with SPI2, I don&amp;#39;t see the problem anymore with TF-M enabled. Is SPI1 only meant to operate without TF-M?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fatal error occurs when enabling flash through CONFIG_FLASH</title><link>https://devzone.nordicsemi.com/thread/540462?ContentTypeID=1</link><pubDate>Wed, 25 Jun 2025 11:20:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c4ba5ed-13ec-42df-b68d-2f4903032395</guid><dc:creator>Benjamin</dc:creator><description>&lt;p&gt;It should not be a difference.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;&lt;span&gt;&lt;strong&gt;Internal flash&lt;/strong&gt;: Can be partitioned and protected by the SPU.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;External SPI flash&lt;/strong&gt;: Not protected by the SPU. Accessible to both secure and non-secure code unless you implement your own software-based protections.&lt;br /&gt;&lt;br /&gt;Have you changed any other file in the &lt;em&gt;hello_world&lt;/em&gt; sample?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fatal error occurs when enabling flash through CONFIG_FLASH</title><link>https://devzone.nordicsemi.com/thread/540091?ContentTypeID=1</link><pubDate>Sat, 21 Jun 2025 00:26:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bcfb9809-ff5b-4c86-858c-a21a89b3b5f9</guid><dc:creator>heisenbug</dc:creator><description>&lt;p&gt;How does SPI flash functionality differ when building for insecure vs secure variant of the board?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fatal error occurs when enabling flash through CONFIG_FLASH</title><link>https://devzone.nordicsemi.com/thread/539838?ContentTypeID=1</link><pubDate>Thu, 19 Jun 2025 08:53:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0583449f-4d64-49a8-a473-15ce2b5a5e78</guid><dc:creator>Benjamin</dc:creator><description>&lt;p&gt;Hi again Mian,&lt;/p&gt;
&lt;p&gt;I created a custom board, and it works when &lt;code&gt;CONFIG_FLASH=y&lt;/code&gt; is set.&lt;br /&gt; If you haven&amp;#39;t solved it yet, I recommend comparing the compiled Devicetree and Kconfig files with both the ns version on you custom board and the development kit version for further investigation.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fatal error occurs when enabling flash through CONFIG_FLASH</title><link>https://devzone.nordicsemi.com/thread/539625?ContentTypeID=1</link><pubDate>Tue, 17 Jun 2025 21:24:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b3c605b-37b2-4fac-ba07-8e9a635fe7d1</guid><dc:creator>heisenbug</dc:creator><description>&lt;p&gt;That indeed made a difference! Building for nrf9151, and then flashing onto my board, I&amp;#39;m able to see console log output now!&lt;/p&gt;
&lt;p&gt;I was under the assumption the ns meant no TF-M but after referencing the docs, my understanding is the opposite&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fatal error occurs when enabling flash through CONFIG_FLASH</title><link>https://devzone.nordicsemi.com/thread/539584?ContentTypeID=1</link><pubDate>Tue, 17 Jun 2025 14:44:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4f46a16c-f5a3-41a8-b8fa-230024613a2f</guid><dc:creator>Benjamin</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I&amp;#39;ll look into this in more detail tomorrow. In the meantime, if you have time, you can try building without TF-M support by using &lt;code&gt;nrf9151&lt;/code&gt; instead of &lt;code&gt;nrf9151/ns&lt;/code&gt; and see if that works. This will help isolate the issue.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fatal error occurs when enabling flash through CONFIG_FLASH</title><link>https://devzone.nordicsemi.com/thread/539442?ContentTypeID=1</link><pubDate>Mon, 16 Jun 2025 19:02:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8370fe05-ab78-4660-872c-623bc2554491</guid><dc:creator>heisenbug</dc:creator><description>&lt;p&gt;Hi Benjamin,&lt;/p&gt;
&lt;p&gt;Yes, I tested it on nRF9151dk with CONFIG_FLASH option and it works for me as well. I&amp;#39;ve attached the requested files. I renamed .config to config as upload of .config isn&amp;#39;t allowed.&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/8322.zephyr.dts"&gt;devzone.nordicsemi.com/.../8322.zephyr.dts&lt;/a&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/1488_2E00_config"&gt;devzone.nordicsemi.com/.../1488_2E00_config&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Fatal error occurs when enabling flash through CONFIG_FLASH</title><link>https://devzone.nordicsemi.com/thread/539383?ContentTypeID=1</link><pubDate>Mon, 16 Jun 2025 12:36:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d27bb17e-493f-480e-90e2-eec8b921aa92</guid><dc:creator>Benjamin</dc:creator><description>&lt;p&gt;Hi Mian,&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;1. Have you tested the hello_world sample on the nRF9151DK?&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;It works for me both with and without the&amp;nbsp;&lt;strong&gt;CONFIG_FLASH&lt;/strong&gt; option.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;2. If it works, can you send me these files?&amp;nbsp;&lt;code&gt;build/{app_name}/zephyr/zephyr.dts&lt;/code&gt;&amp;nbsp;and&amp;nbsp;&lt;code&gt;build/{app_name}/zephyr/.config&lt;/code&gt;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Benjamin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>