<?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 async read write</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/51780/qspi-async-read-write</link><description>Hi, 
 We are using a custom board based on nRF 52840, trying to transfer data to external QSPI flash(GD2QC). 
 Flash was successfully initialized and exchanged chunks of data. Our use case is mostly async read and write based on ble data. 
 But after</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 09 Sep 2019 08:16:36 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/51780/qspi-async-read-write" /><item><title>RE: QSPI async read write</title><link>https://devzone.nordicsemi.com/thread/208596?ContentTypeID=1</link><pubDate>Mon, 09 Sep 2019 08:16:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9ae122c9-fcc0-4375-b7cc-23ec18f782fa</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Do you have an engineering revision of your device? This is a very old device. Please provide markings on your device.&lt;/p&gt;
&lt;p&gt;&lt;br /&gt;Also, I see pasted the wrong function in my &lt;a href="https://devzone.nordicsemi.com/support-private/support/235484#permalink=492727"&gt;previous post&lt;/a&gt;, it should have been:&lt;br /&gt;&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt; err_code = nrf_drv_qspi_init(&amp;amp;config, qspi_handler, NULL);
    APP_ERROR_CHECK(err_code);
    NRF_LOG_INFO(&amp;quot;QSPI example started.&amp;quot;);&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Not that this should do any difference.&amp;nbsp;&lt;/p&gt;
&lt;hr /&gt;
&lt;p&gt;[quote][/quote]&lt;/p&gt;
&lt;p&gt;&lt;span&gt;On further debugging what I observed is qspi driver returns&amp;nbsp;NRFX_ERROR_BUSY from&amp;nbsp;qspi_task_perform&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;What task is failing?&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;/**
 * @brief QSPI tasks.
 */
typedef enum
{
    /*lint -save -e30*/
    NRF_QSPI_TASK_ACTIVATE   = offsetof(NRF_QSPI_Type, TASKS_ACTIVATE),   /**&amp;lt; Activate the QSPI interface. */
    NRF_QSPI_TASK_READSTART  = offsetof(NRF_QSPI_Type, TASKS_READSTART),  /**&amp;lt; Start transfer from external flash memory to internal RAM. */
    NRF_QSPI_TASK_WRITESTART = offsetof(NRF_QSPI_Type, TASKS_WRITESTART), /**&amp;lt; Start transfer from internal RAM to external flash memory. */
    NRF_QSPI_TASK_ERASESTART = offsetof(NRF_QSPI_Type, TASKS_ERASESTART), /**&amp;lt; Start external flash memory erase operation. */
    NRF_QSPI_TASK_DEACTIVATE = offsetof(NRF_QSPI_Type, TASKS_DEACTIVATE), /**&amp;lt; Deactivate the QSPI interface. */
    /*lint -restore*/
} nrf_qspi_task_t;&lt;/pre&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Have you verified that the m_finished flag is toggled during debugging? Are you certain that you have the correct commands for the GD25Q16C?&lt;br /&gt;&lt;br /&gt;-Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI async read write</title><link>https://devzone.nordicsemi.com/thread/208538?ContentTypeID=1</link><pubDate>Sat, 07 Sep 2019 02:50:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:25956bca-8986-4438-bba4-7351b92b6eed</guid><dc:creator>manoj v</dc:creator><description>&lt;p&gt;is this issue related to nRF52840 Engineering A Errata&lt;/p&gt;
&lt;p&gt;3.29 [121] QSPI: Second read and long read commands fail&lt;/p&gt;
&lt;p&gt;This anomaly applies to IC Rev. Engineering A, build codes QIAA-AA0. Symptoms&lt;/p&gt;
&lt;p&gt;&amp;bull; QSPI read command never gets sent.&lt;/p&gt;
&lt;p&gt;&amp;bull; QSPI read command of more than 0x20 characters fails. Conditions QSPI.IFCONFIG1 is different than 0xYY0404YY, where Y is any value. Consequences QSPI is not functional.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best Regards,&lt;/p&gt;
&lt;p&gt;Manoj&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI async read write</title><link>https://devzone.nordicsemi.com/thread/208478?ContentTypeID=1</link><pubDate>Fri, 06 Sep 2019 13:25:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82c9f335-9378-46b5-a4ce-58088b1d20cb</guid><dc:creator>manoj v</dc:creator><description>&lt;p&gt;Yes. I do have the irq callback.&lt;/p&gt;
&lt;p&gt;On further debugging what I observed is qspi driver returns&amp;nbsp;NRFX_ERROR_BUSY from&amp;nbsp;qspi_task_perform&lt;/p&gt;
&lt;p&gt;static nrfx_err_t qspi_task_perform(nrf_qspi_task_t task)&lt;br /&gt;{&lt;br /&gt; // Wait for peripheral&lt;br /&gt; if (m_cb.is_busy)&lt;br /&gt; {&lt;br /&gt; return NRFX_ERROR_BUSY;&lt;br /&gt; }&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Manoj&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI async read write</title><link>https://devzone.nordicsemi.com/thread/208402?ContentTypeID=1</link><pubDate>Fri, 06 Sep 2019 08:15:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c06dd680-729c-4dec-96a9-a2cd4ffaa194</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hi Manoj,&lt;br /&gt;&lt;br /&gt;Thanks for clearing that up!&lt;br /&gt;&lt;br /&gt;Did you also add the following&amp;nbsp;callback&lt;br /&gt;&lt;pre class="ui-code" data-mode="text"&gt;static void qspi_handler(nrf_drv_qspi_evt_t event, void * p_context)
{
    UNUSED_PARAMETER(event);
    UNUSED_PARAMETER(p_context);
    m_finished = true;
}&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;which is called by&lt;br /&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;err_code = nrf_drv_qspi_erase(NRF_QSPI_ERASE_LEN_64KB, 0);
    APP_ERROR_CHECK(err_code);
    WAIT_FOR_PERIPH();
    NRF_LOG_INFO(&amp;quot;Process of erasing first block start&amp;quot;);&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI async read write</title><link>https://devzone.nordicsemi.com/thread/208346?ContentTypeID=1</link><pubDate>Thu, 05 Sep 2019 21:37:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:340bfbee-9207-49dd-a1d6-baf22a60e8f7</guid><dc:creator>manoj v</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Thank you for the quick response.&lt;/p&gt;
&lt;p&gt;Here is the link to data sheet of the external flash.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://www.elm-tech.com/en/products/spi-flash-memory/gd25q16/gd25q16.pdf"&gt;http://www.elm-tech.com/en/products/spi-flash-memory/gd25q16/gd25q16.pdf&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I followed QSPI example pointed in your answer. I have my wait_4 peripheral as in the example.&lt;/p&gt;
&lt;p&gt;#define wait_4_peripheral() do { \&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; while (!m_finished) {\&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;} \&lt;br /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;m_finished = false;&amp;nbsp;&amp;nbsp;&amp;nbsp; \&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; } while (0)&lt;/p&gt;
&lt;p&gt;After issuing a nrf_drv_qspi_read, the mcu waits for the peripheral ever. The error code was NRF_ERROR_BUSY&lt;/p&gt;
&lt;p&gt;By 17.2&amp;nbsp; I meant qspi driver version available here - &lt;a href="https://github.com/NordicSemiconductor/nrfx/tree/v1.7.2"&gt;https://github.com/NordicSemiconductor/nrfx/tree/v1.7.2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I was referring this issue in the forum - &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/50290/qspi-interrupt-hangs-caused-by-power-consumption-problems/201095#201095"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/50290/qspi-interrupt-hangs-caused-by-power-consumption-problems/201095#201095&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Regards,&lt;/p&gt;
&lt;p&gt;Manoj&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: QSPI async read write</title><link>https://devzone.nordicsemi.com/thread/208139?ContentTypeID=1</link><pubDate>Thu, 05 Sep 2019 08:42:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e7d05a30-c24d-43ed-b688-85a32ba552f8</guid><dc:creator>&amp;#216;yvind</dc:creator><description>&lt;p&gt;Hello,&amp;nbsp;&lt;/p&gt;
[quote user=""]trying to transfer data to external QSPI&amp;nbsp; flash(GD2QC).[/quote]
&lt;p&gt;Could you please provide a link to this device?&amp;nbsp;&lt;/p&gt;
[quote user=""]But after some time qspi stops responding&amp;nbsp; with NRF_BUSY after initialization.[/quote]
&lt;p&gt;What is the error you get? NRF_BUSY is not a valid error message&lt;/p&gt;
[quote user=""]After referring sdk 15.2 interrupt clear issue, we cherry picked qspi driver files from sdk ver 17.2, but issue still exists.[/quote]
&lt;p&gt;&amp;nbsp;There are currently no versions above SDK v15.3, can you please elaborate? Have you read the &lt;a href="https://infocenter.nordicsemi.com/topic/ps_nrf52840/qspi.html?resultof=%22%71%73%70%69%22%20"&gt;QSPI chapter in the nRF52840 Product Specification&lt;/a&gt;? And the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/group__nrf__qspi.html?resultof=%22%73%64%6b%22%20%22%76%31%35%2e%32%22%20%22%71%73%70%69%22%20"&gt;QSPI library documentation&lt;/a&gt;? Did you look at the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/qspi_example.html?resultof=%22%73%64%6b%22%20%22%76%31%35%2e%32%22%20%22%71%73%70%69%22%20"&gt;QSPI example&lt;/a&gt; that is available?&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Kind regards,&lt;br /&gt;Øyvind&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>