<?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>How to read from flash?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/2746/how-to-read-from-flash</link><description>In s210 there are functions sd_flash_page_erase, sd_flash_protect, and sd_flash_write. There is no sd_flash_read. 
 How do I read from flash? I can write to is using sd_flash_write, but how do I later read this data?</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 11 Jun 2014 14:04:40 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/2746/how-to-read-from-flash" /><item><title>RE: How to read from flash?</title><link>https://devzone.nordicsemi.com/thread/10644?ContentTypeID=1</link><pubDate>Wed, 11 Jun 2014 14:04:40 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd268867-7f6a-44f2-b4cd-2f62f11c8bf2</guid><dc:creator>John</dc:creator><description>&lt;p&gt;I can suggest a couple of things to try:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Check the error code from your call to sd_flash_write and make sure it is returning NRF_SUCCESS&lt;/li&gt;
&lt;li&gt;Make sure the stack has returned a NRF_EVT_FLASH_OPERATION_SUCCESS before reading the memory.&lt;/li&gt;
&lt;li&gt;If the S210 stack provides a pstorage API like the S110, use that as it hides all of the nit picky details for you.&lt;/li&gt;
&lt;/ol&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read from flash?</title><link>https://devzone.nordicsemi.com/thread/10643?ContentTypeID=1</link><pubDate>Tue, 10 Jun 2014 19:01:42 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:99fdc077-af3a-4ddc-8d9c-7e16434b90ee</guid><dc:creator>AndrewM</dc:creator><description>&lt;p&gt;I&amp;#39;ve found (using the Keil debugger) that my problem is writing to flash, not reading from.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m doing this:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;uint32_t pg_size = NRF_FICR-&amp;gt;CODEPAGESIZE;
uint32_t pg_num = NRF_FICR-&amp;gt;CODESIZE - 1;

uint32_t *addr;
addr = (uint32_t *)(pg_size * pg_num);

sd_flash_write(addr, flashList, 4);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Where flashList is an integer array of stuff I want to write to the flash. Those first few lines come from the flash example.&lt;/p&gt;
&lt;p&gt;However, when I check the location in memory pointed at by addr in the debugger, I get all FFs, which is probably why flash read is seeming not work (giving all Fs).&lt;/p&gt;
&lt;p&gt;Any ideas?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How to read from flash?</title><link>https://devzone.nordicsemi.com/thread/10642?ContentTypeID=1</link><pubDate>Tue, 10 Jun 2014 17:25:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a120e97d-8c04-4dde-bb21-33d54dda13df</guid><dc:creator>John</dc:creator><description>&lt;p&gt;The S110 stack provides a pstorage API that uses the sd_flash functions. I took a look at the function used to get data out of flash and it is merely using a memcpy call to get the data out of the program space. I&amp;#39;d guess you can do the same with the S210 stack.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>