<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://test-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>Writing fixed variables using nRF52820 BLE</title><link>https://test-devzone.nordicsemi.com/f/nordic-q-a/88890/writing-fixed-variables-using-nrf52820-ble</link><description>Hello. 
 I want to write 3 bytes of data using BLE in a memory area that will not disappear when the nRF52820 is powered off or reset. 
 
 Currently, when I create a program, I set a fixed variable to write to the nRF52820, and to change this variable</description><dc:language>en-US</dc:language><generator>Telligent Community 13 Non-Production</generator><lastBuildDate>Tue, 14 Jun 2022 11:34:35 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://test-devzone.nordicsemi.com/f/nordic-q-a/88890/writing-fixed-variables-using-nrf52820-ble" /><item><title>RE: Writing fixed variables using nRF52820 BLE</title><link>https://test-devzone.nordicsemi.com/thread/372358?ContentTypeID=1</link><pubDate>Tue, 14 Jun 2022 11:34:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b7ada1b2-0c1e-426d-9cc4-476e8f08a2e7</guid><dc:creator>user73165</dc:creator><description>&lt;p&gt;Hi there,&lt;/p&gt;
&lt;p&gt;Yes, it&amp;#39;s possible to do this. Typically you would make a BLE service that has an attribute that can be written to. For example an variable that can be updated by the central by writing to the service. This would require you to create a custom service. Luckily, we already have a guide on how to make a custom service &lt;a href="https://test-devzone.nordicsemi.com/guides/short-range-guides/b/bluetooth-low-energy/posts/bluetooth-smart-and-the-nordics-softdevices-part-1"&gt;here&lt;/a&gt;. Variables can be saved to non-volatile memory by using the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/lib_fds.html?cp=8_1_3_16"&gt;Flash data storage module&lt;/a&gt;. You can use the &lt;a href="https://infocenter.nordicsemi.com/topic/sdk_nrf5_v17.1.0/fds_example.html?cp=8_1_4_6_9"&gt;flash data storage example&lt;/a&gt; for reference on how to use the module.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>