<?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>Pstorage with S210 softdevice</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/17791/pstorage-with-s210-softdevice</link><description>Hi Nordic! 
 Long time short, I want to do an ANT application (S210, nRF51422) that pairs two slaves to one master. I have configured everything such that it pairs only when the master is close to the slaves. Now, I want that, when I send a determined</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 21 Nov 2016 08:40:59 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/17791/pstorage-with-s210-softdevice" /><item><title>RE: Pstorage with S210 softdevice</title><link>https://devzone.nordicsemi.com/thread/68555?ContentTypeID=1</link><pubDate>Mon, 21 Nov 2016 08:40:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23f16bf2-49f2-413d-9fd2-08a2d46d5919</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;Great! If you are going to write to the same part of memory you need to erase the complete page first. This is how flash works. You can write to different parts of the page once, but if you want to write to a part more than once you need to erase the complete page.&lt;/p&gt;
&lt;p&gt;From our factory it will be 0xFF, but you can of course erase the complete flash before you flash it with your program. Or read the flash memory with the programmer and check the flash is actually 0xFF.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pstorage with S210 softdevice</title><link>https://devzone.nordicsemi.com/thread/68557?ContentTypeID=1</link><pubDate>Sat, 19 Nov 2016 13:28:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:07d8f3c7-b88b-429f-972b-65365cb0a110</guid><dc:creator>angel</dc:creator><description>&lt;p&gt;Ups, another detail that arised while going a bit further: when the microprocessor comes from the factory, what is the content of the flash memory, without doing nothing? Is it completely random? is it 0xFF? I need to know this value with 100% certainty, since I want to use one non-volatile byte to say that the device has been paired before, or that it hasn&amp;#39;t.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pstorage with S210 softdevice</title><link>https://devzone.nordicsemi.com/thread/68556?ContentTypeID=1</link><pubDate>Sat, 19 Nov 2016 12:35:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f9eb7991-ca29-41d9-90bc-b7026731b9f9</guid><dc:creator>angel</dc:creator><description>&lt;p&gt;Hi again Petter,&lt;/p&gt;
&lt;p&gt;I have been trying your example and it works like a charm! Thanks a lot! My question now is, is it always necessary to erase the memory before actually writing to it? From your example I infer that yes, it is. Can you confirm?&lt;/p&gt;
&lt;p&gt;Thanks again!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pstorage with S210 softdevice</title><link>https://devzone.nordicsemi.com/thread/68554?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2016 17:07:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a9dc9bda-0bad-48f2-ab19-ac3af3339e20</guid><dc:creator>angel</dc:creator><description>&lt;p&gt;Thank you a lot Petter for the time spent in making an example. Will totally save me a lot of development time. Will report with the results. Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pstorage with S210 softdevice</title><link>https://devzone.nordicsemi.com/thread/68553?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2016 15:52:32 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:7c709904-e278-42b2-a29f-ff728add1121</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/ant_5F00_broadcast_5F00_angel.rar"&gt;Here&lt;/a&gt; is the example, extract to examples\ant&lt;/p&gt;
&lt;p&gt;I used the broadcast_rx example as a starting point.&lt;/p&gt;
&lt;p&gt;I tried to put in //angel start and //angel start where I made changes.&lt;/p&gt;
&lt;p&gt;On boot (see boot()) it will read the byte stored at 0x3FC00 in flash, and increment it.&lt;/p&gt;
&lt;p&gt;It will then set an erase flag, and erase the 0x3FC00 page (the 255th (0xFF) page).&lt;/p&gt;
&lt;p&gt;If the erase is successful the NRF_EVT_FLASH_OPERATION_SUCCESS event will be received in sys_evt_dispatch(). Here the erase flag is cleared and the write operation is started.&lt;/p&gt;
&lt;p&gt;If the write is successful the NRF_EVT_FLASH_OPERATION_SUCCESS event will be received and the write flag will be cleared.&lt;/p&gt;
&lt;p&gt;If the NRF_EVT_FLASH_OPERATION_ERROR event is received the operations will be restarted.&lt;/p&gt;
&lt;p&gt;It shound&amp;#39;t be too hard to expand this to the functionality you want.&lt;/p&gt;
&lt;p&gt;This example is given as is, and is not well tested. And I have not tested together with the radio, but I dont&amp;#39; think it will be a problem as long as channel period isn&amp;#39;t too short, then you might see NRF_EVT_FLASH_OPERATION_ERROR events.&lt;/p&gt;
&lt;p&gt;You can check the memory address by using nrfjprog --memrd 0x0003FC00 (or memory view in Keil).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pstorage with S210 softdevice</title><link>https://devzone.nordicsemi.com/thread/68551?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2016 11:41:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5defa2b5-d6c6-4dd1-ab0d-1737ea875e3f</guid><dc:creator>angel</dc:creator><description>&lt;p&gt;Hi again! Thanks for fast reply!&lt;/p&gt;
&lt;p&gt;When I installed SDK v12.1, my keil had examples related to ant (if this behavior is not common, maybe I did something before, but I certainly dont think so). Nevermind, I will install SDK 10.0.&lt;/p&gt;
&lt;p&gt;It would be nice if you could put a minimal example of how to write to and read from non-volatile memory using this sd_flash_write(). Would really appreciate it.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pstorage with S210 softdevice</title><link>https://devzone.nordicsemi.com/thread/68552?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2016 11:17:36 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:3c087dd2-a772-455e-b954-50d753f4fb20</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;I&amp;#39;m not familiar with what you describe, but installing something in Keil wouldn&amp;#39;t add support for S210 in SDK 12.1.0. SDK 10.0.0 is the last SDK that supported S210, so if I were you, I would use that. And rather port parts of SDK 12.1.0, if there is a certain feature that you need. I can try to make an example using the sd_flash* API with SDK 10.0.0. if you want.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pstorage with S210 softdevice</title><link>https://devzone.nordicsemi.com/thread/68550?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2016 10:35:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:330abb60-306b-4bd7-8c9d-d3f03f639db1</guid><dc:creator>angel</dc:creator><description>&lt;p&gt;Hi Petter, thanks for replying!&lt;/p&gt;
&lt;p&gt;I know that SDK v12.1 does not support S210, but Keil took care of bringing it to the packages available. I just had to click &amp;quot;Install&amp;quot; on the softdevice. Is this normal?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pstorage with S210 softdevice</title><link>https://devzone.nordicsemi.com/thread/68549?ContentTypeID=1</link><pubDate>Fri, 18 Nov 2016 10:24:30 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:9165dc2d-2b82-4425-808c-6a9aead5d618</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;It does not have EEPROM, it has flash. You do not have to use pstorage, you could look into use sd_flash_write() and sd_flash_page_erase() directly.&lt;/p&gt;
&lt;p&gt;I think I have asked you this before, but are you sure you are using SDK v12.1? &lt;a href="http://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v12.0.0/index.html?cp=4_0_0"&gt;It doesn&amp;#39;t support S210...&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pstorage with S210 softdevice</title><link>https://devzone.nordicsemi.com/thread/68548?ContentTypeID=1</link><pubDate>Thu, 17 Nov 2016 17:30:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cd6a79b0-3f15-4742-9709-972b2289971e</guid><dc:creator>angel</dc:creator><description>&lt;p&gt;Do you know if there is another way of storing permanent data in the microprocessor? Like, does it have an internal EEPROM or something? I just ideally would need to store some bytes&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pstorage with S210 softdevice</title><link>https://devzone.nordicsemi.com/thread/68547?ContentTypeID=1</link><pubDate>Thu, 17 Nov 2016 16:17:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:67cac13c-acd6-4dd6-9966-161bfa377f8a</guid><dc:creator>angel</dc:creator><description>&lt;p&gt;I am using SDK 12.1 and v5.0.0&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Pstorage with S210 softdevice</title><link>https://devzone.nordicsemi.com/thread/68546?ContentTypeID=1</link><pubDate>Thu, 17 Nov 2016 07:16:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:53e6645c-5155-4145-ba38-33f2111ae200</guid><dc:creator>Petter Myhre</dc:creator><description>&lt;p&gt;What SDK and SoftDevice version are you using?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>