<?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>NRF52840/FreeRTOS unable to sleep after using QSPI peripheral</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/55476/nrf52840-freertos-unable-to-sleep-after-using-qspi-peripheral</link><description>I have found what I believe to be a bug with the nrfx_qspi driver on NRF52840. After using the QPSI peripheral, I have found that in some cases the NVIC&amp;#39;s IRQ#41 (QSPI Interrupt) PENDING bit is left set. Checking the QSPI&amp;#39;s registers: INTEN and EVENTS_READY</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 16 Dec 2019 14:19:53 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/55476/nrf52840-freertos-unable-to-sleep-after-using-qspi-peripheral" /><item><title>RE: NRF52840/FreeRTOS unable to sleep after using QSPI peripheral</title><link>https://devzone.nordicsemi.com/thread/225691?ContentTypeID=1</link><pubDate>Mon, 16 Dec 2019 14:19:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82b5c58d-3a70-4c5f-abca-4c5e932d63d2</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I was hoping to get your stripped project, since I suspect&amp;nbsp;&lt;span&gt;read_flash() activity is the one that mainly contributes to exercise this bug. Can you provide me a stripped project when you have time?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840/FreeRTOS unable to sleep after using QSPI peripheral</title><link>https://devzone.nordicsemi.com/thread/225686?ContentTypeID=1</link><pubDate>Mon, 16 Dec 2019 14:14:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6f4e926c-9ad1-453c-a35b-874d15a1eebb</guid><dc:creator>Jon</dc:creator><description>&lt;p&gt;Understood. If there&amp;#39;s more that I can provide (e.g. SPI traces, etc. please let me know)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840/FreeRTOS unable to sleep after using QSPI peripheral</title><link>https://devzone.nordicsemi.com/thread/225668?ContentTypeID=1</link><pubDate>Mon, 16 Dec 2019 13:46:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30111e28-49ed-4d79-8ace-87b144b8b127</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;I used your code snippet to replicate the bug, but I could not, so it must be&amp;nbsp;the transaction on QSPI that matters and influences the behavior.&lt;/p&gt;
&lt;p&gt;To create an internal ticket, I need to reproduce this bug, so that I give the developers enough information to reproduce it.&lt;/p&gt;
&lt;p&gt;On the other side, it seems that you have a workaround to continue on your work.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840/FreeRTOS unable to sleep after using QSPI peripheral</title><link>https://devzone.nordicsemi.com/thread/224944?ContentTypeID=1</link><pubDate>Wed, 11 Dec 2019 14:18:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d0938ca4-3f8e-4f0e-9b97-fe8408b05841</guid><dc:creator>Jon</dc:creator><description>&lt;p&gt;Also note that even after calling uninit the isr is still pending, so I am currently calling uninit and then following the uninit call with the NVIC-clearpendingirq call.&lt;/p&gt;
&lt;p&gt;Also, I found that this stick interrupt send to depend on whether I make a call to&amp;nbsp;&lt;span&gt;nrfx_qspi_mem_busy_check(). I tried different the qspi driver code but was a bit confused at some of the places it was enabling interrupts.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Jon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NRF52840/FreeRTOS unable to sleep after using QSPI peripheral</title><link>https://devzone.nordicsemi.com/thread/224902?ContentTypeID=1</link><pubDate>Wed, 11 Dec 2019 12:00:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2b99abd8-8de6-4111-8692-b03634340ecd</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;That sounds like a bug in QSPI driver.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Normally you do not need to call&amp;nbsp;&lt;span&gt;nrfx_qspi_uninit to have the pending bit cleared, the driver should have first handled the interrupt before disabling it.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Your workaround to clear the pending bit of NVIC for QSPI&amp;nbsp; just before going sleep sounds promising, but I am still a bit worried as to why the QSPI driver became idle by disabling the NVIC-&amp;gt;QSPI related interrupt and not disabled the event generation of this interrupt.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>