<?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>where to save NON-volatile device parameters?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/82368/where-to-save-non-volatile-device-parameters</link><description>Dear Nordic, 
 we need to save few bites (product serial number, few settings). we use BLE with bonding on a FreeRTOS based FW. PM is already using FDS, at it is not clear how to use the FDS without conflict while BLE is running. 
 What is the best method</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 10 Dec 2021 07:35:34 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/82368/where-to-save-non-volatile-device-parameters" /><item><title>RE: where to save NON-volatile device parameters?</title><link>https://devzone.nordicsemi.com/thread/342822?ContentTypeID=1</link><pubDate>Fri, 10 Dec 2021 07:35:34 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:23dae984-d1b8-4b9f-ab59-4ea7fffc6db0</guid><dc:creator>mrono</dc:creator><description>[quote userid="87195" url="~/f/nordic-q-a/82368/where-to-save-non-volatile-device-parameters/342682#342682"]Please could you give me some hint? the documentation is not so clear and I cannot understand how to make this check[/quote]
&lt;p&gt;Here is a link to the FDS usage documentation. (&lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.0.2/lib_fds_usage.html"&gt;FDS usage&lt;/a&gt;) Notice that the event handler gets a pointer to an fds_evt_t as an argument. That FDS event structure tells you which file id was written. So use that to tell if the file id is one you defined yourself, or if it is within the range used by the peer manager.&lt;/p&gt;
[quote userid="87195" url="~/f/nordic-q-a/82368/where-to-save-non-volatile-device-parameters/342682#342682"]I cant figure out how to register a new FDS user[/quote]
&lt;p&gt;If you have a callback that is getting called when FDS events occur then you must have registered it. Anyhow, it is simply fds_register(name_of_callback).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: where to save NON-volatile device parameters?</title><link>https://devzone.nordicsemi.com/thread/342682?ContentTypeID=1</link><pubDate>Thu, 09 Dec 2021 11:19:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cf7a8a63-494b-430e-a68d-5fcb73860ca7</guid><dc:creator>StefXinet</dc:creator><description>[quote userid="14028" url="~/f/nordic-q-a/82368/where-to-save-non-volatile-device-parameters/342655#342655"]Your FDS handler will be called for all FDS events, even those coming from the peer manager.[/quote]
&lt;p&gt;yes, I understood&lt;/p&gt;
[quote userid="14028" url="~/f/nordic-q-a/82368/where-to-save-non-volatile-device-parameters/342655#342655"]In your handler you need to check if this event is from your own code or from the peer manager.[/quote]
&lt;p&gt;Please could you give me some hint? the documentation is not so clear and I cannot understand how to make this check&lt;/p&gt;
[quote userid="14028" url="~/f/nordic-q-a/82368/where-to-save-non-volatile-device-parameters/342655#342655"]The peer manager uses a specific range of file id:s and record keys. Those can be used to check if the event is from the peer manager.[/quote]
&lt;p&gt;I walked over the library and I can see that this check is made inte the pm routines, but I cant figure out how to register a new FDS user, and how to filter the events in my own FDS code.&lt;/p&gt;
&lt;p&gt;Thanks!&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: where to save NON-volatile device parameters?</title><link>https://devzone.nordicsemi.com/thread/342655?ContentTypeID=1</link><pubDate>Thu, 09 Dec 2021 09:32:07 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:15583f8f-642b-4b7a-81f8-cb74d3dc2e8e</guid><dc:creator>mrono</dc:creator><description>&lt;p&gt;I think trying to get FDS to work would be your best option. Otherwise you&amp;#39;d need to implement something entirely custom, and that sounds like more work than troubleshooting the FDS part of your application.&lt;/p&gt;
&lt;p&gt;For the specific issue you linked to: Your FDS handler will be called for all FDS events, even those coming from the peer manager. That is simply how the observer implementation is designed. In your handler you need to check if this event is from your own code or from the peer manager. The peer manager uses a specific range of file id:s and record keys. Those can be used to check if the event is from the peer manager.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: where to save NON-volatile device parameters?</title><link>https://devzone.nordicsemi.com/thread/342642?ContentTypeID=1</link><pubDate>Thu, 09 Dec 2021 08:52:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:39d46e38-7d49-4f0a-8a90-1c647039b29b</guid><dc:creator>StefXinet</dc:creator><description>[quote userid="14028" url="~/f/nordic-q-a/82368/where-to-save-non-volatile-device-parameters/342639#342639"]You can use FDS while BLE is on, that is not a problem.[/quote]
&lt;p&gt;Thanks. we already tried to use FDS while using BLE, but unfortunatly its not working.&lt;/p&gt;
&lt;p&gt;We opened few threads months ago (&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/77187/use-fds-with-peer-manager"&gt;this is a public one&lt;/a&gt;), but there were no way to read and write data with FDS + BLE + SD + FreeRTOS without hardfault handler.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: where to save NON-volatile device parameters?</title><link>https://devzone.nordicsemi.com/thread/342639?ContentTypeID=1</link><pubDate>Thu, 09 Dec 2021 08:33:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eab9040f-a7ba-478f-bb38-e383cb563905</guid><dc:creator>mrono</dc:creator><description>[quote userid="87195" url="~/f/nordic-q-a/82368/where-to-save-non-volatile-device-parameters/342635#342635"]If it is not suggested to use FDS while BLE is running, and UICR at runtime, where should I save my few data?[/quote]
&lt;p&gt;You can use FDS while BLE is on, that is not a problem. The BLE peer manager uses FDS to save some data, but you can also use the same FDS to save your data. The FDS library handles that easily.&lt;/p&gt;
&lt;p&gt;So for things that are written during production and never change, use UICR. For anything else nonvolatile, use FDS.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: where to save NON-volatile device parameters?</title><link>https://devzone.nordicsemi.com/thread/342635?ContentTypeID=1</link><pubDate>Thu, 09 Dec 2021 08:16:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5f15ac49-1827-4960-a24b-fbd8cc159d71</guid><dc:creator>StefXinet</dc:creator><description>&lt;p&gt;This is clear, but what if I need to write something on&amp;nbsp;&lt;span&gt;CUSTOMER[x] UICR at runtime?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;If it is not suggested to use FDS while BLE is running, and UICR at runtime, where should I save my few data?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: where to save NON-volatile device parameters?</title><link>https://devzone.nordicsemi.com/thread/342561?ContentTypeID=1</link><pubDate>Wed, 08 Dec 2021 14:19:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:111d2284-6a24-475d-af1c-36fc9be78101</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi again,&lt;/p&gt;
&lt;p&gt;Usually you will write data that will not need to be updated in runtime e.g. product serial number just needs to be written once.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: where to save NON-volatile device parameters?</title><link>https://devzone.nordicsemi.com/thread/341896?ContentTypeID=1</link><pubDate>Fri, 03 Dec 2021 13:20:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f40f5d10-e7c4-43f4-858d-171301ad1c0e</guid><dc:creator>StefXinet</dc:creator><description>&lt;p&gt;Thanks,&lt;/p&gt;
&lt;p&gt;I supposed to do something like that. Is it possible to read and write UICR while the SD is running?&lt;br /&gt;&lt;br /&gt;I can&amp;#39;t find the SD API to read and write the CUSTOMER[x] UICR.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: where to save NON-volatile device parameters?</title><link>https://devzone.nordicsemi.com/thread/341858?ContentTypeID=1</link><pubDate>Fri, 03 Dec 2021 11:57:10 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:70ea8610-d98d-456d-8fa4-99065ddb6706</guid><dc:creator>Marjeris Romero</dc:creator><description>&lt;p&gt;Hi,&lt;br /&gt;&lt;br /&gt;For only a few bites you can write directly to the &lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.nrf52832.ps.v1.1/uicr.html?cp=4_2_0_13#concept_rnp_grp_xr"&gt;UICR&lt;/a&gt; of the chip.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;/p&gt;
&lt;p&gt;Marjeris&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>