<?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>QSPI External Flash Read/Write</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59079/qspi-external-flash-read-write</link><description>I have been interfacing with the Macronix external flash via the nfrx_qspi library for logging. While I am able to use nrfx_qspi_read() to obtain my log data, I am also able to &amp;quot;read&amp;quot; it via the memory mapped address region (XiP). 
 Are the any drawbacks</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 16 Mar 2020 19:39:01 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59079/qspi-external-flash-read-write" /><item><title>RE: QSPI External Flash Read/Write</title><link>https://devzone.nordicsemi.com/thread/240133?ContentTypeID=1</link><pubDate>Mon, 16 Mar 2020 19:39:01 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dc420794-a969-4d08-a1ae-acedfc6becb2</guid><dc:creator>Andrew</dc:creator><description>&lt;p&gt;Thank you for pointing these out.&lt;/p&gt;
&lt;p&gt;While I can stick with using the nrfx_qspi interface for logging purposes, I have a large file read only file that I want to access directly. Here&amp;#39;s what I&amp;#39;ve done to address the errata. Does this look correct?&lt;/p&gt;
&lt;p&gt;I&amp;#39;ve inserted a the following call to address errata 215 after I use XiP:&lt;/p&gt;
&lt;p&gt;nrf_qspi_task_trigger(NRF_QSPI, NRF_QSPI_TASK_ACTIVATE);&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;For errata 216, I first added the external flash to the linker macros and segments:&lt;/p&gt;
&lt;p&gt;linker_section_placement_macros=&amp;quot;FLASH_PH_START=0x0;FLASH_PH_SIZE=0x100000;RAM_PH_START=0x20000000;RAM_PH_SIZE=0x40000;FLASH_START=0x27000;FLASH_SIZE=0xd9000;RAM_START=0x200022D0;RAM_SIZE=0x3DD30;EXT_FLASH_START=0x12000000;EXT_FLASH_SIZE=0x800000&amp;quot;&lt;br /&gt; linker_section_placements_segments=&amp;quot;FLASH RX 0x0 0x100000;EXT_FLASH R 0x12000000 0x800000;RAM RWX 0x20000000 0x40000&amp;quot;&lt;/p&gt;
&lt;p&gt;Second, I added the following to my flash_placement.xml file in SES&lt;/p&gt;
&lt;p&gt;&amp;lt;MemorySegment name=&amp;quot;EXT_FLASH&amp;quot; start=&amp;quot;$(EXT_FLASH_START)&amp;quot; size=&amp;quot;$(EXT_FLASH_SIZE)&amp;quot;&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;ProgramSection alignment=&amp;quot;4&amp;quot; name=&amp;quot;.ext_flash_log&amp;quot; load=&amp;quot;No&amp;quot; /&amp;gt;&lt;br /&gt;&amp;nbsp; &amp;lt;ProgramSection alignment=&amp;quot;4&amp;quot; name=&amp;quot;.shp_file&amp;quot; load=&amp;quot;No&amp;quot; /&amp;gt;&lt;br /&gt; &amp;lt;/MemorySegment&amp;gt;&lt;/p&gt;
&lt;p&gt;Finally, I used &amp;quot;section&amp;quot; attributes to place structures in the external flash:&lt;/p&gt;
&lt;p&gt;static volatile uint8_t const _log_data[0x200000] __attribute__ ((section(&amp;quot;.ext_flash_log&amp;quot;)));&lt;/p&gt;
&lt;p&gt;static uint8_t const tz_db[0x600000] __attribute__ ((section(&amp;quot;.shp_file&amp;quot;)));&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI External Flash Read/Write</title><link>https://devzone.nordicsemi.com/thread/239899?ContentTypeID=1</link><pubDate>Mon, 16 Mar 2020 08:49:17 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b4295c4-aa7c-41a0-97fe-e50b1b499a20</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;There are two erratas related to XIP, so I suggest to use nrfx_qspi_read() instead. Here are links to the XIP related issues:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF52840_Rev2/ERR/nRF52840/Rev2/latest/anomaly_840_215.html"&gt;https://infocenter.nordicsemi.com/topic/errata_nRF52840_Rev2/ERR/nRF52840/Rev2/latest/anomaly_840_215.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;a href="https://infocenter.nordicsemi.com/topic/errata_nRF52840_Rev2/ERR/nRF52840/Rev2/latest/anomaly_840_216.html"&gt;https://infocenter.nordicsemi.com/topic/errata_nRF52840_Rev2/ERR/nRF52840/Rev2/latest/anomaly_840_216.html&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>