<?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>Cannot initialize QSPI (nRF52840 and Micron NOR Flash)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80938/cannot-initialize-qspi-nrf52840-and-micron-nor-flash</link><description>I&amp;#39;m working on a custom board with a nRF52840 and a Micron NOR Flash MT25QU128ABA8E12-0SIT ( https://www.micron.com/products/nor-flash/serial-nor-flash/part-catalog/mt25qu128aba8e12-0sit ) 
 I copied code from the QSPI example in SDK17.1.0, after verifying</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 22 Oct 2021 03:30:31 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80938/cannot-initialize-qspi-nrf52840-and-micron-nor-flash" /><item><title>RE: Cannot initialize QSPI (nRF52840 and Micron NOR Flash)</title><link>https://devzone.nordicsemi.com/thread/335388?ContentTypeID=1</link><pubDate>Fri, 22 Oct 2021 03:30:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a2a8172d-75af-42cd-97ce-56c3732342ea</guid><dc:creator>robca</dc:creator><description>&lt;p&gt;Answering my own question: it was indeed a problem with having originally defined CONFIG_GPIO_AS_PINRESET. Once that is done, the pin is always pulled up high and even if redefined as a GPIO or for QSPI, it won&amp;#39;t work (with no error notification)&lt;/p&gt;
&lt;p&gt;What I didn&amp;#39;t realize, is that the setting is persisted in UICR (which makes sense in hindsight, as most things do&amp;nbsp;&lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;). So once an image with&amp;nbsp;&lt;span&gt;CONFIG_GPIO_AS_PINRESET is flashed on the chip, pin P0.18 will not work for anything else anymore, until the UICR data is erased&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;So, after removing&amp;nbsp;&lt;span&gt;CONFIG_GPIO_AS_PINRESET, I also needed to erase UICR, either with nrfjprog or the Erase All function in the GUI Nordic Prgrammer.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Problem solved, QSPI now initializes as expected&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>