<?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>Writing and reading from flash on nRF52832, read always returns erased memory value</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/83862/writing-and-reading-from-flash-on-nrf52832-read-always-returns-erased-memory-value</link><description>Hi, 
 I am working at a project that was abandoned by a guy that worked on my position. I have to fix some issues and add some features. I&amp;#39;m using SDK 17.0.2, my IDE is VSCodium (VSCode) under Linux. In sdk_config.h I have the NRF_FSTORAGE_ENABLED set</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 20 Jan 2022 14:32:03 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/83862/writing-and-reading-from-flash-on-nrf52832-read-always-returns-erased-memory-value" /><item><title>RE: Writing and reading from flash on nRF52832, read always returns erased memory value</title><link>https://devzone.nordicsemi.com/thread/348752?ContentTypeID=1</link><pubDate>Thu, 20 Jan 2022 14:32:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c586be9f-829f-40c0-b396-c82b47436b6a</guid><dc:creator>Edvin</dc:creator><description>&lt;p&gt;That is correct. Also, I see that you added a line to wait (sd_app_evt_wait()) but this call will just wait for any event, and not necessarily the &amp;quot;flash write done&amp;quot; event.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;From the flash_fstorage example in SDK\examples\peripheral\flash_fstorage, see how&amp;nbsp;wait_for_flash_ready(&amp;amp;fstorage); is used to wait for write and erase calls.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Edvin&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Writing and reading from flash on nRF52832, read always returns erased memory value</title><link>https://devzone.nordicsemi.com/thread/348699?ContentTypeID=1</link><pubDate>Thu, 20 Jan 2022 12:46:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5b60d984-67ba-4d25-a9da-8d65d953c480</guid><dc:creator>Turbo J</dc:creator><description>&lt;p&gt;When using softdevice, all write ops are buffered and will be executed by the SD later (when it does not have radio stuff scheduled). Your read call will be executed &lt;em&gt;before&lt;/em&gt; that can happen.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>