<?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 store data[20][20] in flash using FDS</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/16494/how-to-store-data-20-20-in-flash-using-fds</link><description>hi,
i am working on code which require to store data array of 20x20 to store in flash area using FDS or any other possibilities. 
 1)i confused with FDS concept. how i can write data to flash during progrinamming nrf51 chip which is present in file</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 30 Sep 2016 10:34:29 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/16494/how-to-store-data-20-20-in-flash-using-fds" /><item><title>RE: how to store data[20][20] in flash using FDS</title><link>https://devzone.nordicsemi.com/thread/63125?ContentTypeID=1</link><pubDate>Fri, 30 Sep 2016 10:34:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:16544672-2337-4c16-9779-d27bc5f4d6f6</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;Hi, I just commented so that other people could find out that the discussion was taken elsewhere.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to store data[20][20] in flash using FDS</title><link>https://devzone.nordicsemi.com/thread/63124?ContentTypeID=1</link><pubDate>Fri, 30 Sep 2016 09:45:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0dc77438-350f-45a3-9507-e7f3f3e10c2b</guid><dc:creator>saiteja</dc:creator><description>&lt;p&gt;hey sorry,
no one is answered to that question. that question posted by me just before 20 minutes.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to store data[20][20] in flash using FDS</title><link>https://devzone.nordicsemi.com/thread/63122?ContentTypeID=1</link><pubDate>Fri, 30 Sep 2016 09:23:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a720f74a-f553-4ebc-9a6c-b2d0b8a3ecdf</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;This will be answered in this question: &lt;a href="https://devzone.nordicsemi.com/question/96981/how-to-store-float-array-in-nrf51-using-fds/"&gt;devzone.nordicsemi.com/.../&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to store data[20][20] in flash using FDS</title><link>https://devzone.nordicsemi.com/thread/63123?ContentTypeID=1</link><pubDate>Thu, 29 Sep 2016 14:07:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:489bcef4-3e32-4b23-9f5d-ff385a8d4443</guid><dc:creator>saiteja</dc:creator><description>&lt;p&gt;hi
is it possible to store float array in fds. i am able to store int values but unable to store float values.
i am using example in this link :-
&lt;a href="https://github.com/hubuhubu/nRF52-fds-example"&gt;github.com/.../nRF52-fds-example&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;i am writing float m_deadbeef[20][3];    //////(LIKE this i need to store 5 arrays and i should retrieve it back)&lt;/p&gt;
&lt;p&gt;here is how i am reading back data from FDS&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;float *data;
		
uint32_t err_code;
		
		NRF_LOG_PRINTF(&amp;quot;Start searching... \r\n&amp;quot;);

		
// Loop until all records with the given key and file ID have been found.
		
while (fds_record_find(FILE_ID, REC_KEY, &amp;amp;record_desc, &amp;amp;ftok) == FDS_SUCCESS)
		
{
				
err_code = fds_record_open(&amp;amp;record_desc, &amp;amp;flash_record);
				
if ( err_code != FDS_SUCCESS)
				
{
					
return err_code;		
				
}
				
				
NRF_LOG_PRINTF(&amp;quot;Found Record ID = %d\r\n&amp;quot;,record_desc.record_id);
				
NRF_LOG_PRINTF(&amp;quot;Data = &amp;quot;);
				
data = (float *) flash_record.p_data;
				
for (uint8_t i=0;i&amp;lt;flash_record.p_header-&amp;gt;tl.length_words;i++)
				
{
					
NRF_LOG_PRINTF(&amp;quot;%f &amp;quot;,data[i]);
				
}
				
NRF_LOG_PRINTF(&amp;quot;\r\n&amp;quot;);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;i am getting emty data&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: how to store data[20][20] in flash using FDS</title><link>https://devzone.nordicsemi.com/thread/63121?ContentTypeID=1</link><pubDate>Tue, 20 Sep 2016 10:15:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4b3fc374-d1aa-4cf1-af7e-ede2134f5b95</guid><dc:creator>Ole Bauck</dc:creator><description>&lt;p&gt;&lt;a href="https://github.com/hubuhubu/nRF52-fds-example"&gt;Here&lt;/a&gt; is an example that shows how to use FDS.&lt;/p&gt;
&lt;p&gt;For storing 2 dimensional array just declare the data for example as:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static uint32_t m_data[2][2] = ...
...
record_chunk.p_data         = m_data;
record_chunk.length_words   = sizeof(m_data)/sizeof(uint32_t);
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The content will be stored sequentially (data[0][0], data[0][1] ... data[0][n], data[1][0], data[1][1] ...).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>