<?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>Using QSPI library with external flash other than MX25R6435F</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/46386/using-qspi-library-with-external-flash-other-than-mx25r6435f</link><description>Hello, 
 I am currently working on nRF52840 DK while waiting for my custom board using this chip. 
 This custom board will include Toshiba external flash of family TC58CYG2S0HxAIx ( datasheet here ). 
 I would like to perform operations on this flash</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 23 Apr 2019 13:50:51 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/46386/using-qspi-library-with-external-flash-other-than-mx25r6435f" /><item><title>RE: Using QSPI library with external flash other than MX25R6435F</title><link>https://devzone.nordicsemi.com/thread/183150?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2019 13:50:51 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ad774de0-3e3c-4fa2-a9a3-92320257990d</guid><dc:creator>Simonr</dc:creator><description>&lt;p&gt;Hi Bilal&lt;/p&gt;
&lt;p&gt;Yes, the Nordic QSPI only supports 24 and 32 bit addressing modes, so if you need 16 bit, this won&amp;#39;t be possible.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Simon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using QSPI library with external flash other than MX25R6435F</title><link>https://devzone.nordicsemi.com/thread/183012?ContentTypeID=1</link><pubDate>Tue, 23 Apr 2019 08:04:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:026ce57f-4222-4714-ab1b-a9f1db21dcea</guid><dc:creator>Bilal Bouguerra</dc:creator><description>&lt;p&gt;Hi Bill,&lt;/p&gt;
&lt;p&gt;First thank you for your answer.&lt;/p&gt;
[quote userid="75667" url="~/f/nordic-q-a/46386/using-qspi-library-with-external-flash-other-than-mx25r6435f/182785"]Is there something in particular that makes it look like the Toshiba parts would be incompatible with the shortcut read/write/erase interface?[/quote]
&lt;p&gt;At first sight Toshiba parts seems compatible with Nordic QSPI read/write/erase interface,&amp;nbsp;at least for fast read, page program and block erase. We&amp;nbsp;can see that when we compare the commands table:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/6014.Capture.PNG" /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/7485.Capture2.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But when we take a look at the details, for instance for read operation we can see that it&amp;#39;s not as simple as just sending the operation code:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/8836.Capture3.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;First, we must send custom instructions using&amp;nbsp;&lt;span&gt;nrf_drv_qspi_cinstr_xfer to transfer the data from the cell array to the internal data buffer of Toshiba chip and check some status flags. That means that we have to use a synchronous function and abandon the low power oriented design for the driver of Toshiba parts. That is not very practical.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;But the most critical part is for the read buffer instruction:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/0550.Capture4.PNG" /&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/5554.Capture5.PNG" /&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;After sending the read buffer operation code, we must send the address in 16 bits with 3 dummy bits (set to 0 in the screenshot). But it seems that Nordic QSPI module only supports 24 and 32 bits addressing modes, that means that&amp;nbsp;nrf_drv_qspi_read will send extra dummy bits and prevent communication between nRF QSPI interface and Toshiba chip.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Bilal&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using QSPI library with external flash other than MX25R6435F</title><link>https://devzone.nordicsemi.com/thread/182785?ContentTypeID=1</link><pubDate>Fri, 19 Apr 2019 00:27:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3644776a-f7c8-4882-b749-9604f3bd5b76</guid><dc:creator>wpaul</dc:creator><description>[quote userid="69262" url="~/f/nordic-q-a/46386/using-qspi-library-with-external-flash-other-than-mx25r6435f"]Also I noticed that the operation codes sent from the nRF chip to the external flash for both &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrf_drv_qspi_write&lt;/span&gt; and &lt;span style="font-family:&amp;#39;courier new&amp;#39;, courier;"&gt;nrf_drv_qspi_read&amp;nbsp;&lt;/span&gt;is hardcoded somwhere[/quote]
&lt;p&gt;Strictly speaking, the supported command codes are hard coded into the chip. The nRF52840 has a &amp;quot;shortcut&amp;quot; interface for performing read, write and erase operations (which, as you noted above, is somewhat configurable). If you look in the nRF52840 manual there&amp;#39;s a table of all the commands that the QSPI controller supports.&lt;/p&gt;
&lt;p&gt;But the datasheet for the Toshiba part seems to show that it supports the same commands. There are some thing in the Nordic SDK examples which are specific to the Macronix part (for example there is special code to set a bit in one of the registers to enable 4-wire mode instead of 1-wire mode), but mostly it should with with any typical QSPI part. Is there something in particular that makes it look like the Toshiba parts would be incompatible with the shortcut read/write/erase interface?&lt;/p&gt;
&lt;p&gt;-Bill&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>