<?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>Using Zephyr Flash library rather than NVS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91921/using-zephyr-flash-library-rather-than-nvs</link><description>Hi, 
 I am currently using the NVS library with the nRF9160 and an external SPI-NOR flash device (MX25R6435F). I am getting concerned with the NVS library causing issues, and generally being quite slow, so I am exploring directly using the zephyr flash</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 14 Sep 2022 11:24:56 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91921/using-zephyr-flash-library-rather-than-nvs" /><item><title>RE: Using Zephyr Flash library rather than NVS</title><link>https://devzone.nordicsemi.com/thread/386145?ContentTypeID=1</link><pubDate>Wed, 14 Sep 2022 11:24:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6127a2d5-0249-478c-9900-a7d1ad6bf042</guid><dc:creator>DamoL</dc:creator><description>&lt;p&gt;Ohhh this is embarrassing ...&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I think I must have been tired yesterday - I totally forgot the fact that in my old code, before I initialised the NVS library I also pulled up the write protect pin.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;I just tried pulling that pin up and it worked straight away.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Sorry to waste your time - and thank you for your answer Simon!&lt;/p&gt;
&lt;p&gt;Thanks,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Damien&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Using Zephyr Flash library rather than NVS</title><link>https://devzone.nordicsemi.com/thread/386138?ContentTypeID=1</link><pubDate>Wed, 14 Sep 2022 10:58:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:00098241-4890-4d2b-8cf5-67cdcc9c6364</guid><dc:creator>Simon</dc:creator><description>&lt;p&gt;I just tested the sample spi_flash with the board selection nrf9160dk_nrf9160_ns v0.14.0 (that revision will enable external flash) and NCS v2.0.0.&lt;/p&gt;
&lt;p&gt;&lt;img style="max-height:240px;max-width:320px;" src="https://devzone.nordicsemi.com/resized-image/__size/640x480/__key/communityserver-discussions-components-files/4/0537.pastedimage1663152549618v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;I used the board nRF9160 DK v1.0.1&lt;/p&gt;
&lt;p&gt;I also created a file&amp;nbsp;&lt;em&gt;\zephyr\samples\drivers\spi_flash\boards\nrf9160dk_nrf9160_ns.conf&amp;nbsp;&lt;/em&gt;and added&amp;nbsp;&lt;span&gt;CONFIG_SPI_NOR&lt;/span&gt;&lt;span&gt;=y.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I got the following output:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="text"&gt;*** Booting Zephyr OS build v3.0.99-ncs1  ***

JEDEC SPI-NOR SPI flash testing
==========================

Test 1: Flash erase
Flash erase succeeded!

Test 2: Flash write
Attempting to write zu bytes
Data read matches data written. Good!!&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Which means that I&amp;#39;m successfully able to read and write to external flash using the API &lt;em&gt;zephyr/drivers/flash.h&lt;/em&gt;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I see now that you&amp;#39;re using NCS v1.6.0. Let me know if the above works on that version too.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards,&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Simon&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>