<?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>nRF52832 SPI flash init/boot failure</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/128518/nrf52832-spi-flash-init-boot-failure</link><description>We are doing a DFU over BLE with the second MCUboot partition on an external flash. Some times Zephyr can&amp;#39;t access the flash after booting, resulting in a bricked device, no DFU possible (app still running ok). A reflash of the nRF is needed to resolve</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Jun 2026 13:07:05 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/128518/nrf52832-spi-flash-init-boot-failure" /><item><title>RE: nRF52832 SPI flash init/boot failure</title><link>https://devzone.nordicsemi.com/thread/568321?ContentTypeID=1</link><pubDate>Tue, 23 Jun 2026 13:07:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d6cb392c-325f-4d88-ac77-4c8681e7d142</guid><dc:creator>Hung Bui</dc:creator><description>&lt;p&gt;Hi Oliver,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I agree that it could be timing issue. How often do you experience the issue ? My understanding is that you saw the issue when you do DFU update and after the image transfer completely and the device reset it won&amp;#39;t be able to update the new image ?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Could you try to do a flash dump of the internal flash when the issue happen ? There could be some&amp;nbsp;metadata MCUBoot store on the internal flash that may&amp;nbsp;make the change in timing/activity and cause the problem. We can compare to the flash when the device is working.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;Could you show the schematic and name of the external flash ?&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nRF52832 SPI flash init/boot failure</title><link>https://devzone.nordicsemi.com/thread/568301?ContentTypeID=1</link><pubDate>Tue, 23 Jun 2026 09:12:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:de46dde8-8980-45f4-b4f4-6a7af09bd73d</guid><dc:creator>Revilo</dc:creator><description>&lt;p&gt;While posting this, your AI suggested to reset SPIM in an early boot stage (so did another AI after I copied the initial post in it&amp;#39;s input). So I removed assertions and logging from Kconfig an added the following to my main.c. The DFU still fails. I tried some sequence variations.&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;#include &amp;lt;nrfx_spim.h&amp;gt;
#include &amp;lt;zephyr/init.h&amp;gt;

#define EXT_FLASH_SPI_IDX 2 // index has to be in sync with dts

static int init_rstExtFlashSpi()
{
    // reset driver
    const nrfx_spim_t extFlashSpi = NRFX_SPIM_INSTANCE(EXT_FLASH_SPI_IDX);
    nrfx_spim_uninit(&amp;amp;extFlashSpi);

    // force reset peripheral hardware
    __DSB();
    __ISB();
    PP_CAT(NRF_SPIM, EXT_FLASH_SPI_IDX)-&amp;gt;ENABLE = 0;
    __DSB();
    __ISB();
    PP_CAT(NRF_SPIM, EXT_FLASH_SPI_IDX)-&amp;gt;PSEL.SCK = 0xFFFFFFFF;
    PP_CAT(NRF_SPIM, EXT_FLASH_SPI_IDX)-&amp;gt;PSEL.MOSI = 0xFFFFFFFF;
    PP_CAT(NRF_SPIM, EXT_FLASH_SPI_IDX)-&amp;gt;PSEL.MISO = 0xFFFFFFFF;
    __DSB();
    __ISB();

    return 0;
}

#undef EXT_FLASH_SPI_IDX

SYS_INIT(init_rstExtFlashSpi, EARLY, 0);
&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;
&lt;p&gt;What would you suggest trying next?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>