<?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>How to enable QSPI 4-4-4 on nRF52840/SDK17.1.0</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81166/how-to-enable-qspi-4-4-4-on-nrf52840-sdk17-1-0</link><description>I&amp;#39;m struggling to get a Micron MT25QU128ABA ( https://media-www.micron.com/-/media/client/global/documents/products/data-sheet/nor-flash/serial-nor/mt25q/die-rev-a/mt25q_qlhs_u_128_aba_0.pdf ) in QSPI mode. I&amp;#39;m positive all the pins are correctly configured</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 02 Nov 2021 11:38:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81166/how-to-enable-qspi-4-4-4-on-nrf52840-sdk17-1-0" /><item><title>RE: How to enable QSPI 4-4-4 on nRF52840/SDK17.1.0</title><link>https://devzone.nordicsemi.com/thread/337056?ContentTypeID=1</link><pubDate>Tue, 02 Nov 2021 11:38:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe122c04-53b8-4698-b792-554ebb6399fd</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Thanks for sharing your findings. The difference between 1-1-4 and 1-4-4 is larger than the difference between 1-4-4 and 4-4-4,&amp;nbsp;but again the difference is not very large if you use longer transactions.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Alternatively you could just ignore the 0x88 bytes in software, but this won&amp;#39;t work if you plan to use XIP.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable QSPI 4-4-4 on nRF52840/SDK17.1.0</title><link>https://devzone.nordicsemi.com/thread/336923?ContentTypeID=1</link><pubDate>Mon, 01 Nov 2021 16:40:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7d29b36b-a9cb-48e8-a3b2-842dddcc645c</guid><dc:creator>robca</dc:creator><description>&lt;p&gt;Thanks for the confirmation. Yes, unless I make a lot of single cell requests, the performance impact is rather limited. &lt;/p&gt;
&lt;p&gt;I noticed that using #define QSPI_CONFIG_READOC 4 there are problems and the nRD52840 receives two extra 0x88 from the Micron flash before the actual data, so the only way to make it work reliably is to use #define QSPI_CONFIG_READOC 3 and use 1-1-4. It looks like a timing problems, and I might have to look into this further in case we need to use 1-4-4. For now, 1-1-4 will have to do. I&amp;#39;m adding this here in case anyone in the future happens to see the 0x88 data (searching on the internet I found a few mentions of 0x88 and Micron, but none of those threads provided a final answer)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable QSPI 4-4-4 on nRF52840/SDK17.1.0</title><link>https://devzone.nordicsemi.com/thread/336841?ContentTypeID=1</link><pubDate>Mon, 01 Nov 2021 11:27:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ca99f23-c965-4b78-b785-e46611f054b6</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I can confirm that there is no 4-4-4 mode available, yes. You would have to use the 1-1-4 or 1-4-4 instructions.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;For the nRF5340 we introduced some improvements to the QSPI peripheral, including support for higher clock speeds, but there is still no support for the 4-4-4 instructions.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Unless you send very short read/write instructions the difference between sending the command byte in 2 or 8 cycles should be very modest.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable QSPI 4-4-4 on nRF52840/SDK17.1.0</title><link>https://devzone.nordicsemi.com/thread/336725?ContentTypeID=1</link><pubDate>Fri, 29 Oct 2021 15:16:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:80283033-c1fd-413e-94c5-f707702d9693</guid><dc:creator>robca</dc:creator><description>&lt;p&gt;I did look at the Interface Description, but what I originally missed is the mapping to the various settings described in the IFCONFIG0. Thanks for that explicit link, my bad for missing it originally&lt;/p&gt;
[quote userid="2116" url="~/f/nordic-q-a/81166/how-to-enable-qspi-4-4-4-on-nrf52840-sdk17-1-0/336620#336620"]When you say the command should be sent over 4 lines, you really mean that the first 8 byte command should be sent on all data lines?[/quote]
&lt;p&gt;Yes. that is exactly what the first 4 in 4-4-4 (4 command, 4 address, 4 data) means. The figure 25 in your answers shows that quad mode uses all 4 lines for the command as well as opposed to the extended mode (1-1-4), that shows the command and address on one line, and data on 4&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s an even clearer description from the Macronix datasheet&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/713x0/__key/communityserver-discussions-components-files/4/Macronix-4-QSPI.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;From what I can see from the logic analyzer traces, Nordic only supports 1-1-4 and 1-4-4 modes, not 4-4-4. That means I cannot put the Micron NOR flash into quad mode in the register, since once that bit is set, the flash only accepts 4-4-4 (other flash chips accept both, like Macronix, as you can see here&amp;nbsp;&lt;a href="https://www.macronix.com/Lists/ApplicationNote/Attachments/1899/AN0251V1%20-%20Macronix%20Serial%20Flash%20Multi%20IO%20Introduction.pdf"&gt;https://www.macronix.com/Lists/ApplicationNote/Attachments/1899/AN0251V1%20-%20Macronix%20Serial%20Flash%20Multi%20IO%20Introduction.pdf&lt;/a&gt;&amp;nbsp;and copied below)&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/557x134/__key/communityserver-discussions-components-files/4/Macronix-QSPI-EBh.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;I can talk to the Micron chip using either 1-1-4 or 1-4-4. If you confirm that there is no 4-4-4 available, I&amp;#39;ll run a few more tests and see which of the combinations is th eone that works best in terms of speed and reliability&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable QSPI 4-4-4 on nRF52840/SDK17.1.0</title><link>https://devzone.nordicsemi.com/thread/336620?ContentTypeID=1</link><pubDate>Fri, 29 Oct 2021 09:03:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:bb746b9f-5fcb-433a-b0a0-6fec89062360</guid><dc:creator>ovrebekk</dc:creator><description>&lt;p&gt;Hi&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you checked the &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/qspi.html?cp=4_0_0_5_18_8#interface_description"&gt;Interface Description&lt;/a&gt; chapter in the product specification?&lt;br /&gt;It shows exactly what is clocked out on the different lines depending on which write/read/erase operation you are using.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;To see which operations are mapped to which READOC/WRITEOC values, please have a look at the &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/qspi.html?cp=4_0_0_5_18_9_25#register.IFCONFIG0"&gt;IFCONFIG0 register description&lt;/a&gt;.&lt;/p&gt;
&lt;p&gt;Could you try to set READOC to 3 and WRITEOC to 2 and see if it works better?&lt;/p&gt;
&lt;p&gt;Thanks for sharing the datasheet for your sensor. Looking at the description of the QUAD OUTPUT FAST READ - 6Bh operation, as an example, it looks like it should be compatible with the nRF device when using the READ4O operation:&lt;br /&gt;&lt;img height="257" src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1635496214360v1.png" width="527" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Diagram from the nRF52840 PS for comparison:&lt;/p&gt;
&lt;p&gt;&lt;img height="236" src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/pastedimage1635498043991v2.png" width="547" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;When you say the command should be sent over 4 lines, you really mean that the first 8 byte command should be sent on all data lines?&lt;/p&gt;
&lt;p&gt;Looking at the Micron datasheet it doesn&amp;#39;t look like this is the case. After all, until the command is read the device wouldn&amp;#39;t know whether to use 1, 2 or 4 data lines.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Best regards&lt;br /&gt;Torbjørn&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to enable QSPI 4-4-4 on nRF52840/SDK17.1.0</title><link>https://devzone.nordicsemi.com/thread/336562?ContentTypeID=1</link><pubDate>Thu, 28 Oct 2021 19:43:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:21975e7c-6dbe-4230-994c-89d380e8275b</guid><dc:creator>robca</dc:creator><description>&lt;p&gt;Adding more data here and a much better logic analyzer trace&lt;/p&gt;
&lt;p&gt;I confirmed that when I program the NOR Flash to use 4-4-4, the chip expects all commands to be in sent across all the 4 data lines. The instruction&amp;nbsp;nrf_drv_qspi_write(m_buffer_tx, QSPI_TEST_DATA_SIZE, 0), on the other hand, sends the command as a standard SPI command (1-x-4). So as soon as I set the right bit in the NOR register, the nRF52840 cannot communicate with the NOR flash anymore&lt;/p&gt;
&lt;p&gt;I found a way to decode both the commands and data, and I&amp;#39;m enclosing a trace that shows the write enable command (0x06 and 0x38, to start programming the flash), followed by actual the address&amp;nbsp; over 4 data lines, and finally the QSPI data (starting from 00 DC, etc&lt;/p&gt;
&lt;p&gt;So the question is: is there a way to have the nRF52840 send the QSPI commands over 4 data lines, and not just one? If not, there&amp;#39;s no way to use Micron flash in 4-4-4 mode&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/1040x240/__key/communityserver-discussions-components-files/4/qspi-write.PNG" /&gt;&lt;/p&gt;
&lt;p&gt;For reference, here&amp;#39;s a snippet of the Micronix datasheet, with all the supported modes for that&lt;/p&gt;
&lt;p&gt;Here is a description of the Macronix serial flash Read modes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;FastREAD (cmd = 0Bh): 1-1-1, Single I/O SPI Mode Read 1-1-1 = cmd on 1 channel, address on 1 channel, data on 1 channel.&lt;/li&gt;
&lt;li&gt;DREAD (cmd = 3Bh): 1-1-2, DSPI Mode Dual-Output Read 1-1-2 = cmd on 1 channel, address on 1 channel, data on 2 channels.&lt;/li&gt;
&lt;li&gt;2READ (cmd = BBh): 1-2-2, DSPI Mode Dual-I/O Read 1-2-2 = cmd on 1 channel, address on 2 channels, data on 2 channels.&lt;/li&gt;
&lt;li&gt;QREAD (cmd = 6Bh): 1-1-4, QSPI Mode Quad-Output Read 1-1-4 = cmd on 1 channel, address on 1 channel, data on 4 channels&lt;/li&gt;
&lt;li&gt;4READ (cmd = EBh): 1-4-4, QSPI Mode Quad-I/O Read 1-4-4 = cmd on 1 channel, address on 4 channels, data on 4 channels.&lt;/li&gt;
&lt;li&gt;In QPI mode, the command is received by the flash in 4 parallel channels as well. 4READ (cmd = EBh): 4-4-4, QPI Read 4-4-4 = cmd on 4 channels, address on 4 channels, data on 4 channels.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Could you please provide a definition of the correspondence between the various settings of&amp;nbsp;&lt;span&gt;QSPI_CONFIG_READOC&amp;nbsp;and&amp;nbsp;QSPI_CONFIG_WRITEOC, and the standard QSPI&amp;nbsp;&amp;nbsp;x-y-z format? It would really help me in understanding what is happening. I could not find this information in any of the Nordic documentation&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>