<?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>nrf_fstorage_init() gives hard fault</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/59799/nrf_fstorage_init-gives-hard-fault</link><description>Hi! 
 Working on project based on nRF52810. Everything was fine until I began to work on part to save setting in flash memory. 
 I&amp;#39;ve used flash_fds example SDK 16.0 as starting point. I don&amp;#39;t use softdevice so I choosed nvmc option. 
 This is my code</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Thu, 02 Apr 2020 16:25:57 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/59799/nrf_fstorage_init-gives-hard-fault" /><item><title>RE: nrf_fstorage_init() gives hard fault</title><link>https://devzone.nordicsemi.com/thread/243251?ContentTypeID=1</link><pubDate>Thu, 02 Apr 2020 16:25:57 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:dd608aef-324c-4e19-90c5-a6fae70c6f43</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;I compared your flash_placements.xml file with the one in the fstorage example in the SDK. By removing the line you have under FLASH:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="xml"&gt;&amp;lt;ProgramSection alignment=&amp;quot;4&amp;quot; load=&amp;quot;Yes&amp;quot; name=&amp;quot;.fs_data&amp;quot; /&amp;gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;And replacing it with the line from the example, below&amp;nbsp;&amp;quot;.nrf_sections&amp;quot;:&lt;/p&gt;
&lt;p&gt;&lt;pre class="ui-code" data-mode="xml"&gt;&amp;lt;ProgramSection alignment=&amp;quot;4&amp;quot; keep=&amp;quot;Yes&amp;quot; load=&amp;quot;Yes&amp;quot; name=&amp;quot;.fs_data&amp;quot;  inputsections=&amp;quot;*(.fs_data*)&amp;quot; runin=&amp;quot;.fs_data_run&amp;quot;/&amp;gt;&lt;/pre&gt;&lt;/p&gt;
&lt;p&gt;I no longer get the hardfault. I do however get errors from the first call to nrf_fstorage_write, but this is caused by the address to be outside the fstorage address area that you defined in your application.&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_fstorage_init() gives hard fault</title><link>https://devzone.nordicsemi.com/thread/243204?ContentTypeID=1</link><pubDate>Thu, 02 Apr 2020 13:23:33 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48bea0d0-781e-4d7f-9784-063ca102b60d</guid><dc:creator>Rasul Kishov</dc:creator><description>&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/brdCstr_5F00_4.zip"&gt;devzone.nordicsemi.com/.../brdCstr_5F00_4.zip&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;strong&gt;J&amp;oslash;rgen&lt;/strong&gt;, here is the file, thank you very much! I worked on it inside&amp;nbsp;&lt;strong&gt;examples/proprietary_rf&lt;/strong&gt; folder.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;I removed everything non related to fstorage from project and observed the same behavior.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Hard fault happens inside&amp;nbsp;&lt;strong&gt;nrf_fstorage_init()&amp;nbsp;&lt;/strong&gt;at last line inside:&amp;nbsp;&lt;strong&gt;return (p_fs-&amp;gt;p_api)-&amp;gt;init(p_fs, p_param);&lt;/strong&gt;&lt;br /&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nrf_fstorage_init() gives hard fault</title><link>https://devzone.nordicsemi.com/thread/243169?ContentTypeID=1</link><pubDate>Thu, 02 Apr 2020 11:51:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:ce56882d-7f34-4478-94b1-d79ccae83144</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I cannot see any obvious mistakes in your code. Could you debug a bit more to determine exactly which function call in nrf_fstorage_init function that generates the hardfault?&lt;/p&gt;
&lt;p&gt;Could you also post the full project for us to reproduce and debug this?&lt;/p&gt;
&lt;p&gt;Best regards,&lt;br /&gt;Jørgen&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>