<?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>Problems with spi nor flash</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/107255/problems-with-spi-nor-flash</link><description>Hi, 
 
 I have a custom board using a NRF52832. together with a SPI NOR Flash. I am having problems with the initialisation of the flash. I already tested my board with the spi_example. 
 In the Sample when executing device_is_ready(), it is always return</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 12 Jan 2024 11:49:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/107255/problems-with-spi-nor-flash" /><item><title>RE: Problems with spi nor flash</title><link>https://devzone.nordicsemi.com/thread/463963?ContentTypeID=1</link><pubDate>Fri, 12 Jan 2024 11:49:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:86faa7d8-fe32-4395-a438-232df4645637</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Paul,&lt;/p&gt;
[quote user="Paul123"]Thanks a lot I added a code snipped in spi_nor_configure() in spi_nor.c to turn on the voltage before the jedec ID is checked and now everything works. Thanks a lot for your help and quick responses[/quote]
&lt;p&gt;It is great to know that your issue has been resolved.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with spi nor flash</title><link>https://devzone.nordicsemi.com/thread/463902?ContentTypeID=1</link><pubDate>Fri, 12 Jan 2024 07:13:13 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2def2832-47eb-4bd8-98ca-2f4ad012b655</guid><dc:creator>Paul123</dc:creator><description>&lt;p&gt;Hi Dejan,&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Thanks a lot I added a code snipped in spi_nor_configure() in spi_nor.c to turn on the voltage before the jedec ID is checked and now everything works. Thanks a lot for your help and quick responses&lt;/p&gt;
&lt;p&gt;Kind Regards Paul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with spi nor flash</title><link>https://devzone.nordicsemi.com/thread/463836?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2024 16:30:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82801629-78d0-47c7-8d6b-7134c7b60167</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Paul,&lt;br /&gt;&lt;br /&gt;You could perform modifications of the spi_nor driver located in the drivers\flash so that flash is powered on before you perform any operations on it. You would need to do this yourself. &lt;br /&gt;Another option would be to change default state of the switch by adding external pull-up to the GPIO power control signal.&lt;br /&gt;Regardless of which of 2 above-mentioned ways you choose, when you need to turn off the flash you would need to make sure that MOSI is not driven high. You could do that by switching down (uninitializing) SPI peripheral.&amp;nbsp;Otherwise, flash would not be turned off.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with spi nor flash</title><link>https://devzone.nordicsemi.com/thread/463717?ContentTypeID=1</link><pubDate>Thu, 11 Jan 2024 11:09:37 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:60ea7860-9327-44f2-aaf1-ccd91d466983</guid><dc:creator>Paul123</dc:creator><description>&lt;p&gt;Hi Dejan,&lt;/p&gt;
&lt;p&gt;I did some more digging on my problem:&lt;/p&gt;
&lt;p&gt;I fond &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/96898/spi-nor-flash-devicetree-error-int_res-16-ebusy/416204"&gt;this post&lt;/a&gt; stating, that zephyr does the initialisation of the nor flash before boot up according to the device tree. Is there any possibility to prevent zephyr from doing that because my switching voltage is off by default. &lt;/p&gt;
&lt;p&gt;Is there a possibility to set an initial level of a GPIO in the device tree file?&lt;/p&gt;
&lt;p&gt;I further found out that the SPI peripheral is also initialized before my main function is executed leading to the problem that my Flash is back sourced because Mosi is driven high.&lt;/p&gt;
&lt;p&gt;Is there generally the possibility to define the order of the initialisation process in the main function?&lt;/p&gt;
&lt;p&gt;Kind Regards&lt;/p&gt;
&lt;p&gt;Paul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with spi nor flash</title><link>https://devzone.nordicsemi.com/thread/463564?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2024 13:36:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e52a52e8-e1d0-4694-9493-49123ad14cdb</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi Paul,&lt;br /&gt;&lt;br /&gt;Device might not be ready at the time of checking. You could try to manage your power supply experimentally in a way that would ensure that your device is ready by giving the device enough time to become ready before checking its status.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with spi nor flash</title><link>https://devzone.nordicsemi.com/thread/463545?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2024 12:46:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:8b6e8c4e-0898-4c78-9d8f-5bb01ef877ce</guid><dc:creator>Paul123</dc:creator><description>&lt;p&gt;Hi Dejan,&lt;/p&gt;
&lt;p&gt;thanks for the quick response. Unfortunately a delay di not solve the problem. I added a delay of 5s but that had no effect on the outcome. The device was still not ready but the sample runs successfully&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Kind Regards&lt;/p&gt;
&lt;p&gt;Paul&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Problems with spi nor flash</title><link>https://devzone.nordicsemi.com/thread/463536?ContentTypeID=1</link><pubDate>Wed, 10 Jan 2024 12:36:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:72f83563-df27-4c36-ac65-dc061b508021</guid><dc:creator>dejans</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;As you are turning your power supply on/off, it might be that device is not powered when you check it, or the device might not have enough time to boot up before init functions are called. You could try to introduce some delay of few ms using wait function early in your application to check if this helps in fixing the problem.&lt;br /&gt;&lt;br /&gt;Best regards,&lt;br /&gt;Dejan&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>