<?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>NCS internal flash communication with BLE</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/108697/ncs-internal-flash-communication-with-ble</link><description>Hello, 
 I am designing a custom log backend module by using nRF Connect SDK v2.5.2 and nRF52840 MCU. Currently, I am using nrfx nvmc functions directly to save logs inside ISR like Hardfault. It is working as expected (I am able to save all LOG_XXX output</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 04 Mar 2024 07:09:08 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/108697/ncs-internal-flash-communication-with-ble" /><item><title>RE: NCS internal flash communication with BLE</title><link>https://devzone.nordicsemi.com/thread/471940?ContentTypeID=1</link><pubDate>Mon, 04 Mar 2024 07:09:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c4628a40-edf4-429d-9124-6f8baa797d34</guid><dc:creator>Susheel Nuguru</dc:creator><description>[quote user="secondbest"]Also, I must be able to save log messages inside ISR like Hardfault[/quote]
&lt;p&gt;Sorry for coming back to you a bit late. I think hardfault is a bit special in where it does not matter to use flash API in the ISR context since we are already in the hardfault handler and there is mostly no recovery apart from resetting.&amp;nbsp;&lt;/p&gt;
&lt;p&gt;SDC SOC flash API is very limited in how you can use and there might be implications if it is not called in the right priority as this is MPSL API.&lt;/p&gt;
&lt;p&gt;I suggest you still use Settings with the backend of &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/services/storage/fcb/fcb.html"&gt;FCB &lt;/a&gt;by enabling &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/kconfig/index.html#CONFIG_SETTINGS_FCB"&gt;CONFIG_SETTINGS_FCB&lt;/a&gt;. This bodes well with your DFU feature as FCB usage of Settings can be configured in the&amp;nbsp;partition as &lt;a href="https://docs.zephyrproject.org/latest/services/settings/index.html#storage-location"&gt;mentioned here&lt;/a&gt;.&lt;/p&gt;
[quote user="secondbest"]One more addition, Can I use flash_erase, flash_write functions securely with BLE?[/quote]
&lt;p&gt;No, the low level API in the nRF cannot be used directly when using our softdevice. This is also discussed &lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/95687/using-zephyr-or-nrfxlib-to-manipulate-flash-area/405037"&gt;here&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS internal flash communication with BLE</title><link>https://devzone.nordicsemi.com/thread/471273?ContentTypeID=1</link><pubDate>Wed, 28 Feb 2024 12:07:08 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c5fd5fd6-c0b5-42ff-a808-96878c1857e5</guid><dc:creator>secondbest</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;Thanks for settings api suggestion. But, I am saving whole log messages inside internal flash. For this purpose, I am using circular buffer. Also, I must be able to save log messages inside ISR like Hardfault. Do you have any other suggestion for this use case? By the way, I will also have DFU feature so I must create partitions for internal flash.&amp;nbsp;&lt;br /&gt;&lt;br /&gt;Also, I found this topic:&amp;nbsp;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/95687/using-zephyr-or-nrfxlib-to-manipulate-flash-area"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/95687/using-zephyr-or-nrfxlib-to-manipulate-flash-area&lt;/a&gt;&amp;nbsp;However, I cannot find any meaningful usage example.&lt;br /&gt;&lt;br /&gt;One more addition, Can I use flash_erase, flash_write functions securely with BLE?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: NCS internal flash communication with BLE</title><link>https://devzone.nordicsemi.com/thread/471210?ContentTypeID=1</link><pubDate>Wed, 28 Feb 2024 08:49:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b26b4ac1-8327-48e8-8dcb-bd7ed8db6540</guid><dc:creator>Susheel Nuguru</dc:creator><description>&lt;p&gt;BLE is using &lt;a href="https://docs.zephyrproject.org/latest/services/settings/index.html"&gt;settings &lt;/a&gt;enabling the &lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/2.5.2/kconfig/index.html#CONFIG_BT_SETTINGS"&gt;CONFIG_BT_SETTINGS&lt;/a&gt;. If you want your flash access to be in sync with the operations of BLE, I recommend you to use settings (check the &lt;a href="https://github.com/zephyrproject-rtos/zephyr/tree/main/samples/subsys/settings"&gt;sample &lt;/a&gt;for reference).&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>