<?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 i write one or two bytes into flash memory using fds lib?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/40827/how-i-write-one-or-two-bytes-into-flash-memory-using-fds-lib</link><description>I am using nRF52840 with sdk 15.0 version. I am able to read OR write data into flash using fds library. But now i want to write one or two bytes into flash and read this bytes, how i know the length of that byte while reading data from flash. I know</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Sun, 30 Dec 2018 11:21:30 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/40827/how-i-write-one-or-two-bytes-into-flash-memory-using-fds-lib" /><item><title>RE: How i write one or two bytes into flash memory using fds lib?</title><link>https://devzone.nordicsemi.com/thread/163274?ContentTypeID=1</link><pubDate>Sun, 30 Dec 2018 11:21:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fe48c043-8fb1-49cc-b9f8-2cd8fa06f92d</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;New thread about writing large data here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/41995/how-store-large-amount-data-73kbytes-into-flash-using-fds"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/41995/how-store-large-amount-data-73kbytes-into-flash-using-fds&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Please verify the answer for this thread - to mark it as closed:&lt;/p&gt;
&lt;p&gt;&lt;img alt=" " src="https://devzone.nordicsemi.com/resized-image/__size/320x240/__key/communityserver-discussions-components-files/4/1256._5F00_Verify_2D00_answer_2D00_nordic.png" /&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How i write one or two bytes into flash memory using fds lib?</title><link>https://devzone.nordicsemi.com/thread/163158?ContentTypeID=1</link><pubDate>Fri, 28 Dec 2018 10:26:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:890262ef-6d78-46d0-a565-562dbe5b6c01</guid><dc:creator>vishal</dc:creator><description>&lt;p&gt;Ok sure Thanks for your supporting..!!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How i write one or two bytes into flash memory using fds lib?</title><link>https://devzone.nordicsemi.com/thread/163149?ContentTypeID=1</link><pubDate>Fri, 28 Dec 2018 10:16:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:18c24837-33f1-4a9c-8569-4e6193989906</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;The title of the thread is, &lt;em&gt;&amp;quot;How to write &lt;strong&gt;one or two&lt;/strong&gt; bytes&amp;quot; - &lt;/em&gt;and that was the initial question.&lt;/p&gt;
&lt;p&gt;That question has been answered, and you are now asking a &lt;em&gt;different&lt;/em&gt; question.&lt;/p&gt;
&lt;p&gt;You should edit the title of the thread so that people who might know the answer to the new question will know what you&amp;#39;re now asking.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;I don&amp;#39;t know.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How i write one or two bytes into flash memory using fds lib?</title><link>https://devzone.nordicsemi.com/thread/163145?ContentTypeID=1</link><pubDate>Fri, 28 Dec 2018 09:45:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ed1cdb54-25ba-491b-9c38-048d61028a82</guid><dc:creator>vishal</dc:creator><description>&lt;p&gt;Hello,&lt;/p&gt;
&lt;p&gt;I have read this above link document but still confused for configuration for storing 73KB data. Now I am getting this error&amp;nbsp;FDS_ERR_RECORD_TOO_LARGE. Currently i have set&amp;nbsp;&lt;/p&gt;
&lt;p&gt;FDS_VIRTUAL_PAGES 10&lt;/p&gt;
&lt;p&gt;FDS_VIRTUAL_PAGE_SIZE 2048&lt;/p&gt;
&lt;p&gt;in sdk_config.h will please guide me how i increase the record size foe storing 73KB data.&lt;/p&gt;
&lt;p&gt;Thanks......&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How i write one or two bytes into flash memory using fds lib?</title><link>https://devzone.nordicsemi.com/thread/163086?ContentTypeID=1</link><pubDate>Thu, 27 Dec 2018 16:34:39 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:869e66eb-7045-4565-891a-0a81e5f2531e</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/lib_fds_format.html#lib_fds_format_max_length"&gt;http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/lib_fds_format.html#lib_fds_format_max_length&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How i write one or two bytes into flash memory using fds lib?</title><link>https://devzone.nordicsemi.com/thread/163074?ContentTypeID=1</link><pubDate>Thu, 27 Dec 2018 13:57:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:af09f002-d66e-4d2c-88cd-7be37559a6f4</guid><dc:creator>vishal</dc:creator><description>&lt;p&gt;Thanks for fast reply....&lt;/p&gt;
&lt;p&gt;Here is below function that i am currently using:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="text"&gt;  ret_code_t ret = fds_write(FILE_ID, REC_KEY,data_to_store,length);
  if (ret == FDS_SUCCESS) {
    NRF_LOG_DEBUG(&amp;quot;FDS stored&amp;quot;);
  } else {
    NRF_LOG_DEBUG(&amp;quot;FDS failed error code:%d&amp;quot;, ret);
  }&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;Lets say&amp;nbsp;FILE_ID =&amp;nbsp;0x0003 &amp;amp; KEC_KEY =&amp;nbsp;0x1111&lt;/p&gt;
&lt;p&gt;data_to_store[length]; &amp;amp; length = 73KB.&lt;/p&gt;
&lt;p&gt;Ques:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;Is it possible to store 73KB data in one request of fds_write(..); with above &lt;span&gt;FILE_ID&amp;nbsp;&amp;amp;&amp;nbsp;KEC_KEY&amp;nbsp;&lt;/span&gt;?&amp;nbsp;&lt;/li&gt;
&lt;li&gt;How use&amp;nbsp;FDS_VIRTUAL_PAGES &amp;amp;&amp;nbsp;FDS_VIRTUAL_PAGE_SIZE in available in sdk_config.h for storing 73KB data.&lt;/li&gt;
&lt;/ol&gt;
&lt;p&gt;Thanks..!!!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How i write one or two bytes into flash memory using fds lib?</title><link>https://devzone.nordicsemi.com/thread/163066?ContentTypeID=1</link><pubDate>Thu, 27 Dec 2018 12:02:53 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1cfb2b0d-794d-426e-b1fc-d992404bc632</guid><dc:creator>awneil</dc:creator><description>[quote userid="25768" url="~/f/nordic-q-a/40827/how-i-write-one-or-two-bytes-into-flash-memory-using-fds-lib/163064"] i am able to stored some small about of data into flash using FDS[/quote]
&lt;p&gt;So what&amp;#39;s your problem in extending that to a large amount of data?&lt;/p&gt;
&lt;p&gt;what have you tried?&lt;/p&gt;
&lt;p&gt;where are you stuck?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How i write one or two bytes into flash memory using fds lib?</title><link>https://devzone.nordicsemi.com/thread/163064?ContentTypeID=1</link><pubDate>Thu, 27 Dec 2018 11:19:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:30cb37d2-7a68-4934-8318-6dd4c5452ed1</guid><dc:creator>vishal</dc:creator><description>[quote userid="6462" url="~/f/nordic-q-a/40827/how-i-write-one-or-two-bytes-into-flash-memory-using-fds-lib/163055"]Have you studied that documentation, and looked at that example?[/quote]
&lt;p&gt;Yes, and also i am able to stored some small about of data into flash using FDS.&lt;/p&gt;
[quote userid="6462" url="~/f/nordic-q-a/40827/how-i-write-one-or-two-bytes-into-flash-memory-using-fds-lib/163055"]Do you actually have that much Flash space available?[/quote]
&lt;p&gt;Yes, We are using nRF52840 chip and having 1Mb flash&amp;nbsp;memory, currently the application program occupy near about 215KB. Remaining flash size is available to store 73KB data.&lt;/p&gt;
&lt;p&gt;Will you please guide me the way for how i can store this data?&lt;/p&gt;
&lt;p&gt;Thanks...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How i write one or two bytes into flash memory using fds lib?</title><link>https://devzone.nordicsemi.com/thread/163055?ContentTypeID=1</link><pubDate>Thu, 27 Dec 2018 10:39:23 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9b9c937d-8a6b-4776-8e78-e0cfcb71a518</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Did you actually read my previous reply?&lt;/p&gt;
&lt;p&gt;Have you studied that documentation, and looked at that example?&lt;/p&gt;
[quote userid="25768" url="~/f/nordic-q-a/40827/how-i-write-one-or-two-bytes-into-flash-memory-using-fds-lib/163053"]Tha data size is 73Kbytes[/quote]
&lt;p&gt;Do you actually have that much Flash space available?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How i write one or two bytes into flash memory using fds lib?</title><link>https://devzone.nordicsemi.com/thread/163053?ContentTypeID=1</link><pubDate>Thu, 27 Dec 2018 10:30:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3a8b8742-e93b-46fd-8360-1ff78c0cb586</guid><dc:creator>vishal</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;Sorry for late response..&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Will you please help me how i can store large amount of data in flash using FDS lib. Tha data size is 73Kbytes.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Can you provide program snippet for the same how i manage file ID rec Key for saving this large data.&lt;/p&gt;
&lt;p&gt;Thanks...&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: How i write one or two bytes into flash memory using fds lib?</title><link>https://devzone.nordicsemi.com/thread/158722?ContentTypeID=1</link><pubDate>Thu, 22 Nov 2018 17:19:55 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e5724b41-9977-447a-979f-02972f7134a3</guid><dc:creator>awneil</dc:creator><description>&lt;p&gt;Have you studied the FDS &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/lib_fds.html?cp=4_0_0_3_55" rel="noopener noreferrer" target="_blank"&gt;&lt;strong&gt;documentation&lt;/strong&gt;&lt;/a&gt;?&lt;/p&gt;
&lt;p&gt;It tells you that FDS works with &lt;em&gt;Records&lt;/em&gt; - not individual bytes.&lt;/p&gt;
&lt;p&gt;So you create a Record, and store your data into that Record.&lt;/p&gt;
&lt;p&gt;Then you can read the Record, and update the Record.&lt;/p&gt;
&lt;p&gt;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/lib_fds_functionality.html?cp=4_0_0_3_55_1"&gt;infocenter.nordicsemi.com/.../lib_fds_functionality.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;See also:&amp;nbsp;&lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/lib_fds_usage.html?cp=4_0_0_3_55_3"&gt;infocenter.nordicsemi.com/.../lib_fds_usage.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Have you looked at the FDS &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.2.0/fds_example.html?cp=4_0_0_4_5_8" rel="noopener noreferrer" target="_blank"&gt;example&lt;/a&gt;?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>