<?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>Nordic SDK boot-time init code for the external flash (nRF52840DK)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/108375/nordic-sdk-boot-time-init-code-for-the-external-flash-nrf52840dk</link><description>Hello, We are interested in knowing where in the Nordic SDK the external flash is initialized (bootup init)? We are developing a Matter product based on the nRF52840 and have a lot of code running on both the nRF52840DK as well as our own custom h/w based</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 19 Feb 2024 11:36:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/108375/nordic-sdk-boot-time-init-code-for-the-external-flash-nrf52840dk" /><item><title>RE: Nordic SDK boot-time init code for the external flash (nRF52840DK)</title><link>https://devzone.nordicsemi.com/thread/469464?ContentTypeID=1</link><pubDate>Mon, 19 Feb 2024 11:36:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:803dbd89-8a2f-47f7-a75a-9192f6bde28d</guid><dc:creator>Sigurd Hellesvik</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;High level:&lt;/p&gt;
&lt;p&gt;Our Matter samples only uses external flash for DFU. See &lt;a href="https://github.com/nrfconnect/sdk-nrf/blob/main/samples/matter/light_bulb/configuration/nrf52840dk_nrf52840/pm_static_dfu.yml"&gt;this project configuration&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;To enable external flash for MCUboot, see &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/config_and_build/bootloaders/bootloader_external_flash.html"&gt;Bootloaders: Using external flash memory partitions&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;If you want to use external flash for other things, all you do is to use our flash write APIs to write to external flash addresses, and they will automatically use the QSPI external flash driver. See &amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/nordic/nordic-blog/b/blog/posts/persistent-storage-of-keys-and-data-using-the-nrf-connect-sdk"&gt;Persistent storage of keys and data using the nRF Connect SDK&lt;/a&gt; for info on persistant storage.&lt;/p&gt;
&lt;p&gt;Low level:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/drivers/flash/nrf_qspi_nor.c"&gt;nrf_qspi_nor.c&lt;/a&gt; is the driver used to write to external flash.&lt;br /&gt;Kconfig options related to the QSPI drivers can be found in &lt;a href="https://github.com/nrfconnect/sdk-zephyr/blob/main/drivers/flash/Kconfig.nordic_qspi_nor"&gt;Kconfig.nordic_qspi_nor&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Regards,&lt;br /&gt;Sigurd Hellesvik&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>