<?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>Loop after fs_store freeze the code</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/63390/loop-after-fs_store-freeze-the-code</link><description>I&amp;#39;m using 51822 QFAC, SDK11 S130 2.0.0. 
 I&amp;#39;m able to write to flash using fstorage_write() below. But the problem is whenever I put a for loop after I call fstorage_write(), the code will totally freeze. If I put the for loop before fstorage_write()</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 06 Jul 2020 01:18:24 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/63390/loop-after-fs_store-freeze-the-code" /><item><title>RE: Loop after fs_store freeze the code</title><link>https://devzone.nordicsemi.com/thread/258489?ContentTypeID=1</link><pubDate>Mon, 06 Jul 2020 01:18:24 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:74f4e99a-b3ba-416b-a211-0dc0040b9db7</guid><dc:creator>sonnyz</dc:creator><description>&lt;p&gt;Thank you Jorgen for the reply!&lt;/p&gt;
&lt;p&gt;It&amp;#39;s a hardfault, later I found that it may be related to UART. Since I use UART to print out the values, if I remove printf after&amp;nbsp;fstorage_write(), it looks like working for now. If I put printf&amp;nbsp;with a&amp;nbsp;loop (no matter inside or outside), it just get stuck before the loop.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Loop after fs_store freeze the code</title><link>https://devzone.nordicsemi.com/thread/258483?ContentTypeID=1</link><pubDate>Sun, 05 Jul 2020 21:03:25 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:eb5040a1-d560-4381-bb4c-8e0dce21ed16</guid><dc:creator>J&amp;#248;rgen Holmefjord</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;What do you mean that the code freezes? Will it get stuck in the loop, or is there a hardfault, etc?&lt;/p&gt;
&lt;p&gt;How are the&amp;nbsp;myData, size variables declared?&amp;nbsp; What are their values when the loop is executed?&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>