<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://test-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>(Q)SPI cleanup when using mcuboot</title><link>https://test-devzone.nordicsemi.com/f/nordic-q-a/88487/q-spi-cleanup-when-using-mcuboot</link><description>Hi. 
 Is it possible to add SPI or QSPI cleanup once mcuboot is done? 
 I&amp;#39;ve checked nrf_cleanup.c , but it seems that (Q)SPI is not turned off, which increases the power consumption when the application starts if it does not use the external flash itself</description><dc:language>en-US</dc:language><generator>Telligent Community 13 Non-Production</generator><lastBuildDate>Thu, 02 Jun 2022 12:17:47 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://test-devzone.nordicsemi.com/f/nordic-q-a/88487/q-spi-cleanup-when-using-mcuboot" /><item><title>RE: (Q)SPI cleanup when using mcuboot</title><link>https://test-devzone.nordicsemi.com/thread/370688?ContentTypeID=1</link><pubDate>Thu, 02 Jun 2022 12:17:47 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9347aa8d-64ae-4e9d-9e0f-88071a27e5e6</guid><dc:creator>user16133</dc:creator><description>&lt;p&gt;No problem! Keep me in touch!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (Q)SPI cleanup when using mcuboot</title><link>https://test-devzone.nordicsemi.com/thread/370679?ContentTypeID=1</link><pubDate>Thu, 02 Jun 2022 11:47:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe25d750-7b79-4e07-8a28-aec67a896582</guid><dc:creator>user75734</dc:creator><description>&lt;p&gt;Hi Giuliano&lt;/p&gt;
&lt;p&gt;I&amp;#39;m not sure if the protected storage service will deinit the QSPI to be honest, and I&amp;#39;ll have to ask internally. I&amp;#39;ll also forward your suggestion as it might indeed be a good idea. Thanks!&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: (Q)SPI cleanup when using mcuboot</title><link>https://test-devzone.nordicsemi.com/thread/370470?ContentTypeID=1</link><pubDate>Wed, 01 Jun 2022 13:28:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc02a8d9-6c98-4360-843e-8ebe365f9e2c</guid><dc:creator>user16133</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;It was just a suggestion, as one could expect that mcuboot would shut down all the resources it uses before jumping to the main application.&lt;/p&gt;
&lt;p&gt;That would prevent some strange cases where some higher than expect current consumption can be observed when MCUBOOT is used in a sample that does not use QSPI itself. We&amp;#39;ve seen about a 2mA leakage because of that.&lt;/p&gt;
&lt;p&gt;Now that I&amp;#39;m writing this answer, one special use case comes to mind: what would happen if the QSPI is only used in the secure part of an application with for example:&lt;/p&gt;
&lt;p&gt;- TF-M using Protected Storage Service&lt;/p&gt;
&lt;p&gt;- MCUBOOT&lt;/p&gt;
&lt;p&gt;- Zephyr&lt;/p&gt;
&lt;p&gt;The QSPI will reside only in the secure part to store the new firmware. MCUBOOT would leave QSPI ON, and the main application will not be able to shut it down (as the application will reside in the NS part).&lt;/p&gt;
&lt;p&gt;Will the Protected Storage Service re-initialize the QSPI and put it to power down?&lt;/p&gt;
&lt;p&gt;Giuliano&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: (Q)SPI cleanup when using mcuboot</title><link>https://test-devzone.nordicsemi.com/thread/370460?ContentTypeID=1</link><pubDate>Wed, 01 Jun 2022 13:14:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a5bf31f3-0913-4c62-a7fb-01e238a9bde2</guid><dc:creator>user75734</dc:creator><description>&lt;p&gt;Hi Giuliano&lt;/p&gt;
&lt;p&gt;The QSPI cleanup is done in the QSPI Zephyr driver itself (&lt;strong&gt;...\ncs\vx.x.x\zephyr\drivers\flash\nrf_qspi_nor.c&lt;/strong&gt;) instead of in the cleanup file to deal with erratum 122 in the nRF52840 for example. Do you mean that it rather should be put directly into MCUboot, if so why?&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></channel></rss>