<?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 Peripheral Latency Explanation</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/37118/qspi-peripheral-latency-explanation</link><description>Hello, 
 I am using nRF52840 with nRF5_SDK_15.0.0_a53641a. 
 I am looking at the QSPI example which I have slightly modified so that after the write of 256 bytes, it enters into a loop reading continiously 64 bytes from the external Flash. 
 To read 64</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 14 Aug 2018 07:17:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/37118/qspi-peripheral-latency-explanation" /><item><title>RE: QSPI Peripheral Latency Explanation</title><link>https://devzone.nordicsemi.com/thread/144075?ContentTypeID=1</link><pubDate>Tue, 14 Aug 2018 07:17:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ab28d0ee-274d-448b-88fa-6239cb1e212d</guid><dc:creator>Sebastian</dc:creator><description>&lt;p&gt;Hello Jorgen,&lt;/p&gt;
&lt;p&gt;Thanks for the answer, however the observed problem does not appear to fit any Engineering rev A chip errata. Nevertheless this is indeed an engineering lot chip so lets close the issue for the moment. I need to repeat the test with a production chip.&lt;/p&gt;
&lt;p&gt;Thank you.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI Peripheral Latency Explanation</title><link>https://devzone.nordicsemi.com/thread/144070?ContentTypeID=1</link><pubDate>Tue, 14 Aug 2018 07:06:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:acedd260-60d7-4607-bf33-6584d7cfa8f4</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;PCA10056 v0.9.2 has a &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52/dita/nrf52/compatibility_matrix/nRF52840_ic_rev_comp_with_dev_hw.html?cp=2_0_2_3"&gt;Engineering A revision chip&lt;/a&gt;. You should get yourself a Revision 1 board, to make sure you have&amp;nbsp;hardware with fixes for &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52840.EngA.errata/err_840_new.html?cp=2_0_1_3_1"&gt;QSPI erratas&lt;/a&gt;, etc. PCA10056 v1.0.0 is the nRF52840 Development Kit, which replaces the Preview Development Kits.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI Peripheral Latency Explanation</title><link>https://devzone.nordicsemi.com/thread/143287?ContentTypeID=1</link><pubDate>Wed, 08 Aug 2018 04:45:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f25a3d8c-4609-4b33-9700-95be4569917a</guid><dc:creator>Sebastian</dc:creator><description>&lt;p&gt;Hi Jorgen,&lt;/p&gt;
&lt;p&gt;I have pc10056 v0.9.2&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI Peripheral Latency Explanation</title><link>https://devzone.nordicsemi.com/thread/143222?ContentTypeID=1</link><pubDate>Tue, 07 Aug 2018 12:35:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a0b87cde-e8cb-4996-bb61-626dca823a5b</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Sorry, my capture was with default 256 bytes and 2 MHz, this one is with 64 bytes and 32 MHz. As you can see, only the total duration of the transfer is decreased, not the duration of the driver/example functions.&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-12f565d289d34f37b9e0083116cf51f6/QSPI2.png" alt=" " /&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Which version of the DK are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI Peripheral Latency Explanation</title><link>https://devzone.nordicsemi.com/thread/143187?ContentTypeID=1</link><pubDate>Tue, 07 Aug 2018 10:24:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ae19f2e4-f84f-4400-a26f-32881c4f3911</guid><dc:creator>Sebastian</dc:creator><description>&lt;p&gt;Hello Jorgen,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Sorry for the late reply. The timescale of the whole tranasaction seems too long. How many bytes are you transferring and at what speed?&lt;/p&gt;
&lt;p&gt;Can you do a transaction with 64 bytes only and 32MHz clock rate for the QSPI clock?&lt;/p&gt;
&lt;p&gt;Unfortunately, I am out of office and cannot send further scope captures but the one I uploaded was as i describe above.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thank you.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI Peripheral Latency Explanation</title><link>https://devzone.nordicsemi.com/thread/143029?ContentTypeID=1</link><pubDate>Mon, 06 Aug 2018 12:53:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe49b495-5292-449a-9410-3ae3a4f75870</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;The read operation is not completed until the&amp;nbsp;READY event is generated by the QSPI peripheral. I do not have the exact details on what the peripheral is doing in the ~2.5 µs from CSN line goes low until the event is generated, but most likely there is still some DMA operations ongoing etc. After that the time is spent in the code on context switching, GPIO control, and to start the next read operation.&lt;/p&gt;
&lt;p&gt;I checked the code with some GPIO debugging:&lt;/p&gt;
&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/support-attachments/beef5d1b77644c448dabff31668f3a47-12f565d289d34f37b9e0083116cf51f6/QSPI.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;0 is set high before read function is called, and set low after event is received.&lt;/p&gt;
&lt;p&gt;1 shows the time spent inside read function (nrfx_qspi_read)&lt;/p&gt;
&lt;p&gt;2 is set high before WAIT_FOR_PERIPHERAL macro is entered, and set low after.&lt;/p&gt;
&lt;p&gt;3 shows the CSN line of QSPI peripheral.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;In my test, there is 0.9 µs from event is received until next time read function is called.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI Peripheral Latency Explanation</title><link>https://devzone.nordicsemi.com/thread/142907?ContentTypeID=1</link><pubDate>Sat, 04 Aug 2018 14:56:48 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:54350178-d679-4ac2-b9eb-01d1b1c807e3</guid><dc:creator>Sebastian</dc:creator><description>&lt;p&gt;Hi Jorgen,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Since we are discussing QSPI being you can light another aspect.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I disconnected the flash memory on board the dev kit and the driver will not initialize the QSPI module but rather will return with&amp;nbsp;&lt;span&gt;NRFX_ERROR_TIMEOUT.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Can you explain what exactly is the driver trying to do during initialization that makes it timeout when the memory is disconnected?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Thank you.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;EDIT: My bad I just saw it in the documentation:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&amp;#39;During the activation process, the internal clocks are started and the QSPI peripheral tries to read the status byte to read the busy bit. Reading the status byte is done in a simple poll and wait mechanism. If the busy bit is 1, this indicates issues with the external memory device. As a result,&amp;nbsp;&lt;a class="el" href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.0.0/group__nrfx__qspi.html#gae619b2eaf2d9691f03b20c6b204e9f28"&gt;nrfx_qspi_init&lt;/a&gt;returns NRFX_ERROR_TIMEOUT&amp;#39;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;So at initialization the driver actually tries to read the peripheral memory. Strange thing though, I cannot see the command 0x05 being send from the MCU QSPI in order to read the memory status register. CS goes low but no clock or data on the lines when the memory is disconnected.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI Peripheral Latency Explanation</title><link>https://devzone.nordicsemi.com/thread/142836?ContentTypeID=1</link><pubDate>Fri, 03 Aug 2018 13:08:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:78622295-8c8c-474d-9e1a-83c5f675ed13</guid><dc:creator>Sebastian</dc:creator><description>&lt;p&gt;&lt;img src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/MAP002_5F00_QSPI_5F00_Nordic.jpg" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Hello Jorgen,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Check above the transaction for 64 bytes @32MHz. The code that is running is the following:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;while(1){&lt;br /&gt; nrfx_err=nrfx_qspi_read(m_buffer16_rx, 64, 0);&lt;br /&gt; WAIT_FOR_PERIPH();&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Any comments are welcome.&lt;/p&gt;
&lt;p&gt;Note: I am using nrf52840 dev kit, reading the on board Flash&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI Peripheral Latency Explanation</title><link>https://devzone.nordicsemi.com/thread/142834?ContentTypeID=1</link><pubDate>Fri, 03 Aug 2018 12:56:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:448d4070-acc2-4f7c-8e99-928277d87dc0</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Thank you for the update.&lt;/p&gt;
&lt;p&gt;Scope captures would be helpful!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI Peripheral Latency Explanation</title><link>https://devzone.nordicsemi.com/thread/142831?ContentTypeID=1</link><pubDate>Fri, 03 Aug 2018 12:50:12 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:87c42f08-d715-496e-8173-905b2e2c0f9b</guid><dc:creator>Sebastian</dc:creator><description>&lt;p&gt;Hello Jorgen&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks for coming back.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;No the CS goes high after the transfer finishes and this is the strange thing.&lt;/p&gt;
&lt;p&gt;The latency delay is fixed at 4.3usec for blocking mode and at about 6usec when the event handler is used.&amp;nbsp;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I can provide oscilloscope captures if you&amp;#39;d like.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI Peripheral Latency Explanation</title><link>https://devzone.nordicsemi.com/thread/142828?ContentTypeID=1</link><pubDate>Fri, 03 Aug 2018 12:42:11 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60d7cd35-5702-4e03-80f8-3e03d50d7160</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I would expect a short delay to handle the events and start the next read operation, but it is hard to say exactly why you get this long delay. Have you tried setting some GPIOs in your application to see when the delay happens?&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Do the CSN pin stay low during this delay?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>