<?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>Trying to configure an external NOR flash causes the application to crash</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/117357/trying-to-configure-an-external-nor-flash-causes-the-application-to-crash</link><description>I am trying to connect an MX25R6435F NOR flash on a custom PCB to an nRF52832 running nRF Connect SDK v2.8.0 using SPI. I am currently using the devkit devicetree with some modifications in the overlay. 
 I tried to follow https://devzone.nordicsemi.com</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 18 Dec 2024 13:15:19 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/117357/trying-to-configure-an-external-nor-flash-causes-the-application-to-crash" /><item><title>RE: Trying to configure an external NOR flash causes the application to crash</title><link>https://devzone.nordicsemi.com/thread/515500?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 13:15:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:38b92e8a-c0d5-4061-b23c-df98d7f1232c</guid><dc:creator>AMarch01</dc:creator><description>&lt;p&gt;Good job, way to stick with it.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to configure an external NOR flash causes the application to crash</title><link>https://devzone.nordicsemi.com/thread/515492?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 13:01:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:939a1455-42fc-480e-a404-7b9d68e08cc2</guid><dc:creator>Simen Eilevstjonn</dc:creator><description>&lt;p&gt;I found the issue.&lt;/p&gt;
&lt;p&gt;Pin reset is being reenabled by west flash. (ref&amp;nbsp;&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/106015/use-reset-pin-as-gpio---nrf52840"&gt;Use RESET pin as GPIO - nRF52840&lt;/a&gt;&amp;nbsp;)&lt;/p&gt;
&lt;p&gt;When I flashed using nRF Connect Programmer, it did work.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The SPI flash example now works&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/pastedimage1734526834492v1.png" alt=" " /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to configure an external NOR flash causes the application to crash</title><link>https://devzone.nordicsemi.com/thread/515488?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 12:56:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:316b7cd6-d2c1-400d-999b-ab5d6d60056f</guid><dc:creator>Vidar Berg</dc:creator><description>[quote user="Simen Eilevstjonn"]The problem is indeed due to the reset pin. When testing now, it still resets the device despite both[/quote]
&lt;p&gt;Note that if your build includes multiple images (e.g., application and mcuboot), the same DT overlay must also be&amp;nbsp;applied to the other images (&lt;a href="https://docs.nordicsemi.com/bundle/ncs-latest/page/zephyr/build/sysbuild/index.html#sysbuild_file_suffix_support"&gt;apply configuration changes to images included via sysbuild&lt;/a&gt;).&lt;/p&gt;
&lt;p&gt;To confirm that the pinreset function is not enabled on your device, please read out the configuration register at 0x10001200 (&lt;a href="https://docs.nordicsemi.com/bundle/ps_nrf52832/page/uicr.html#register.PSELRESET-0"&gt;PSELRESET[0]&lt;/a&gt;). For example, if you are using nrfjprog:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;$ nrfjprog --memrd 0x10001200&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to configure an external NOR flash causes the application to crash</title><link>https://devzone.nordicsemi.com/thread/515486?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 12:52:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1de1c86f-5450-416f-b4d2-57d10b12af0f</guid><dc:creator>AMarch01</dc:creator><description>&lt;p&gt;I missed that detail &amp;gt; &amp;quot;&lt;span&gt;&amp;nbsp;MISO pin being the same as the reset pin&amp;quot;&lt;br /&gt;&lt;br /&gt;I am not sure how that would work in a real-world scenario, especially with this being an input pin. At least you know now.&lt;br /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to configure an external NOR flash causes the application to crash</title><link>https://devzone.nordicsemi.com/thread/515482?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 12:48:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d4a2227a-35fe-4017-a9e6-032b00ce461c</guid><dc:creator>Simen Eilevstjonn</dc:creator><description>&lt;p&gt;The problem is indeed due to the reset pin. When testing now, it still resets the device despite both&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;&amp;amp;uicr {
	/delete-property/ gpio-as-nreset;
};&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;and&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;CONFIG_GPIO_AS_PINRESET=n&lt;/pre&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to configure an external NOR flash causes the application to crash</title><link>https://devzone.nordicsemi.com/thread/515481?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 12:47:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:77e53cb2-1bff-4209-b3d6-9052fe2af063</guid><dc:creator>AMarch01</dc:creator><description>&lt;p&gt;Here is a link to someone doing low level access to a flash device. Perhaps it will help?&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/50734/interface-external-flash-to-nrf52832"&gt;Interface External flash to nrf52832 - Nordic Q&amp;amp;A - Nordic DevZone - Nordic DevZone&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to configure an external NOR flash causes the application to crash</title><link>https://devzone.nordicsemi.com/thread/515479?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 12:42:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5c967c21-3ede-43df-8a96-172a39ed7fcb</guid><dc:creator>AMarch01</dc:creator><description>&lt;p&gt;Ah, sorry, I read ahead on the links (drilled down) and they started to mention file systems.&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to configure an external NOR flash causes the application to crash</title><link>https://devzone.nordicsemi.com/thread/515402?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 09:02:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ca54ecc6-ab2a-4650-bca0-fb30a20b9e63</guid><dc:creator>Simen Eilevstjonn</dc:creator><description>&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/pastedimage1734512484142v1.png" alt=" " /&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/pastedimage1734512496084v2.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;The device repeatedly, every 250 ms, approximately, tries to read the status register of the flash.&lt;/p&gt;
&lt;p&gt;However, the clock should continue for 16 more cycles to get the response, but this is not done. All lines stay low for a while before MOSI and CS go high again.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to configure an external NOR flash causes the application to crash</title><link>https://devzone.nordicsemi.com/thread/515373?ContentTypeID=1</link><pubDate>Wed, 18 Dec 2024 06:42:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8c11b69c-ff34-4a42-962e-6500002d35ac</guid><dc:creator>Simen Eilevstjonn</dc:creator><description>&lt;p&gt;I started with that example, but since I have a custom board, I must do the configuration myself.&lt;/p&gt;
&lt;p&gt;That sample did also not start, so I tried in another application where there was no flash API calls, just the Kconfig lines to enable the flash.&lt;/p&gt;
&lt;p&gt;I have not yet tried a file system.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Trying to configure an external NOR flash causes the application to crash</title><link>https://devzone.nordicsemi.com/thread/515348?ContentTypeID=1</link><pubDate>Tue, 17 Dec 2024 20:51:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cbd05508-16a3-46fa-9c8b-bf460ed0903c</guid><dc:creator>AMarch01</dc:creator><description>&lt;p&gt;I suggest as a sanity check, the spi_flash program. I only have experience with it on the nrf52840 DK , but its a low level simple program. If you can get that to work, you should be able to build from there.&lt;br /&gt;That said, I pretty much just save a struct of data to flash, so if you don&amp;#39;t need a file system. Perhaps you can get away with just writing blocks of data directly to it?&lt;br /&gt;A M&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>