<?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>Flash erase fails on NRF52832CIAA (chip used in the Murata MBN52832 module)</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/51595/flash-erase-fails-on-nrf52832ciaa-chip-used-in-the-murata-mbn52832-module</link><description>Hi, 
 
 I have a custom implemented DFU that I used in many nRF52832 designs. 
 This one in particular fails when I am calling nrf_fstorage_erase. I am trying to erase 40 pages at once, starting at address 0x50000 
 The function returns success but it</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 04 Sep 2019 08:00:14 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/51595/flash-erase-fails-on-nrf52832ciaa-chip-used-in-the-murata-mbn52832-module" /><item><title>RE: Flash erase fails on NRF52832CIAA (chip used in the Murata MBN52832 module)</title><link>https://devzone.nordicsemi.com/thread/207813?ContentTypeID=1</link><pubDate>Wed, 04 Sep 2019 08:00:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:0094e59f-d0ac-4ac3-b055-f8fc1b380b91</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;HI Razan,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Happy to hear that you found the cause of the issue! Yes, if&amp;nbsp;&lt;a href="https://infocenter.nordicsemi.com/topic/com.nordic.infocenter.sdk5.v15.3.0/group__app__scheduler.html#gab725820c32a8d05379db4567cf30e862"&gt;app_sched_execute&lt;/a&gt;&lt;span&gt;&amp;nbsp;is prevented from running then the queued events will not be handled within reasonable time.&amp;nbsp;&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Bjørn&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash erase fails on NRF52832CIAA (chip used in the Murata MBN52832 module)</title><link>https://devzone.nordicsemi.com/thread/207724?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2019 14:47:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0be388a-1082-4591-85ee-5550ce0a9c68</guid><dc:creator>razvan1t</dc:creator><description>&lt;p&gt;Bjorn. I found the problem. Turns out I was blocking the main loop, waiting for an IO to finish and since I am using the scheduler that would not give enough time to the erase operation to continue in a reasonable time. (I take from this that the erase operation happens in the main loop too if I use the scheduler?).&lt;/p&gt;
&lt;p&gt;The timers were not executing either because of the blocked main loop and they were piling up until the list was full.&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;Moral: Don&amp;#39;t block the main loop when developing with the Nordic API if you are using the scheduler. &lt;span class="emoticon" data-url="https://devzone.nordicsemi.com/cfs-file/__key/system/emoji/1f642.svg" title="Slight smile"&gt;&amp;#x1f642;&lt;/span&gt;Thanks for looking into it too!&lt;/p&gt;
&lt;p&gt;Raz&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash erase fails on NRF52832CIAA (chip used in the Murata MBN52832 module)</title><link>https://devzone.nordicsemi.com/thread/207722?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2019 14:37:22 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cff32254-f02b-4977-bfdc-db52460abd64</guid><dc:creator>razvan1t</dc:creator><description>&lt;p&gt;Looking at the code now, it looks like there is nothing at line 445 that could throw that error so it means it&amp;#39;s coming from an interrupt. probably the RTC and it just happens the ionterrupt interrupted at line 445 in app_timer.c&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash erase fails on NRF52832CIAA (chip used in the Murata MBN52832 module)</title><link>https://devzone.nordicsemi.com/thread/207721?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2019 14:35:19 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:be00e352-05a8-4440-ac74-cdc25da9da45</guid><dc:creator>razvan1t</dc:creator><description>&lt;p&gt;the NO_MEM... error comes from app_timer.c at line 445&lt;/p&gt;
&lt;p&gt;I also just discovered that another project that is similar runs well... I will have to see what is different between them.&lt;/p&gt;
&lt;p&gt;It&amp;#39;s weird though that even the one that is not working it runs on the NRF52832-DK but not on the Murata module.&lt;/p&gt;
&lt;p&gt;Maybe the lack of RTC crystal? I am using SYNTH though.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash erase fails on NRF52832CIAA (chip used in the Murata MBN52832 module)</title><link>https://devzone.nordicsemi.com/thread/207717?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2019 14:09:15 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f8e5c6e2-cc84-427a-bb8d-817ddd7fc494</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Oh, so its not&amp;nbsp;&lt;span&gt;nrf_fstorage_erase that returns&lt;/span&gt;&amp;nbsp;&lt;span&gt;NRF_ERROR_NO_MEM, its another function. I see now that you stated this in the original question.&amp;nbsp; Which function is located at&amp;nbsp;0x0002E071?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash erase fails on NRF52832CIAA (chip used in the Murata MBN52832 module)</title><link>https://devzone.nordicsemi.com/thread/207714?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2019 13:58:59 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:4ea90e35-d49b-4567-8e6b-dc163463aca7</guid><dc:creator>razvan1t</dc:creator><description>&lt;p&gt;The call returns NRF_SUCCESS but hangs and after some time I get the error I attached at the beginning. I think because it&amp;#39;s blocking something internally.&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash erase fails on NRF52832CIAA (chip used in the Murata MBN52832 module)</title><link>https://devzone.nordicsemi.com/thread/207554?ContentTypeID=1</link><pubDate>Tue, 03 Sep 2019 07:16:35 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fda8435f-3111-4f1a-8500-5d45941cf507</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;The QFN and CSP packages have the same silicon die so there should not be any functional difference between the two package variants.&amp;nbsp;&lt;/p&gt;
[quote user="razvan1t"]Nope. It only works if count is 1.[/quote]
&lt;p&gt;&amp;nbsp;Ok, so calling&amp;nbsp;&lt;span&gt;nrf_fstorage_erase() with len &amp;gt; 1 results in&amp;nbsp;NRF_ERROR_NO_MEM being returned? Or does it just hang?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;What is&amp;nbsp;NRF_FSTORAGE_SD_QUEUE_SIZE defined to in sdk_config.h?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Bjørn&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash erase fails on NRF52832CIAA (chip used in the Murata MBN52832 module)</title><link>https://devzone.nordicsemi.com/thread/207477?ContentTypeID=1</link><pubDate>Mon, 02 Sep 2019 16:54:03 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:1e6561bc-2858-4f65-9612-388d338ecbbf</guid><dc:creator>razvan1t</dc:creator><description>&lt;p&gt;Is there any difference between the CIAA chip and the others?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash erase fails on NRF52832CIAA (chip used in the Murata MBN52832 module)</title><link>https://devzone.nordicsemi.com/thread/207476?ContentTypeID=1</link><pubDate>Mon, 02 Sep 2019 16:53:29 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d74b5f96-5033-465b-8b0d-38a9eea1e5d7</guid><dc:creator>razvan1t</dc:creator><description>&lt;p&gt;Nope. It only works if count is 1.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash erase fails on NRF52832CIAA (chip used in the Murata MBN52832 module)</title><link>https://devzone.nordicsemi.com/thread/207365?ContentTypeID=1</link><pubDate>Mon, 02 Sep 2019 11:04:38 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cba9a3b2-e455-4f24-9548-d756d46b28b8</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;The count variable passed to&amp;nbsp;&lt;span&gt;nrf_fstorage_erase in&amp;nbsp;swap_erase_page, is this 50? Do you see a difference if you divide the erase operation into smaller ones, i.e. two 25 page erases or five 10page erases?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Bjørn&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash erase fails on NRF52832CIAA (chip used in the Murata MBN52832 module)</title><link>https://devzone.nordicsemi.com/thread/207218?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2019 21:54:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:5513e178-041e-45a9-990a-e387a325a0b8</guid><dc:creator>razvan1t</dc:creator><description>&lt;div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;if&lt;/span&gt;&lt;span&gt; (&lt;/span&gt;&lt;span&gt;swap_erase_page&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;swap_get_page_count&lt;/span&gt;&lt;span&gt;(), swap_erase_callback) &lt;/span&gt;&lt;span&gt;==&lt;/span&gt;&lt;span&gt; NRF_SUCCESS)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;return&lt;/span&gt;&lt;span&gt;;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;//we do not send the response at this time&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;else&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;response_code &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; BLE_RSP_ERROR;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;It gets called in the main() loop since I am using the scheduler. I also give it a callback that gets called when nrf_erase finishes.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;
&lt;div&gt;&lt;br /&gt;
&lt;div&gt;&lt;span&gt;ret_code_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;swap_erase_page&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;uint32_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;page&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;uint32_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;count&lt;/span&gt;&lt;span&gt;, &lt;/span&gt;&lt;span&gt;swap_callback_t&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;callback&lt;/span&gt;&lt;span&gt;)&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;{&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;APP_ERROR_CHECK_BOOL&lt;/span&gt;&lt;span&gt;(callback &lt;/span&gt;&lt;span&gt;!=&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;APP_ERROR_CHECK_BOOL&lt;/span&gt;&lt;span&gt;(page &lt;/span&gt;&lt;span&gt;&amp;lt;&lt;/span&gt;&lt;span&gt; SWAP_PAGE_COUNT);&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;NRF_LOG_DEBUG&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;quot;SWAP ERASE: %u&amp;quot;&lt;/span&gt;&lt;span&gt;, count);&lt;/span&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;l_swap_callback &lt;/span&gt;&lt;span&gt;=&lt;/span&gt;&lt;span&gt; callback;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/span&gt;&lt;span&gt;return&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;nrf_fstorage_erase&lt;/span&gt;&lt;span&gt;(&lt;/span&gt;&lt;span&gt;&amp;amp;&lt;/span&gt;&lt;span&gt;swap_fstorage_instance, &lt;/span&gt;&lt;span&gt;swap_fstorage_instance&lt;/span&gt;&lt;span&gt;.&lt;/span&gt;&lt;span&gt;start_addr&lt;/span&gt;&lt;span&gt; &lt;/span&gt;&lt;span&gt;+&lt;/span&gt;&lt;span&gt; page &lt;/span&gt;&lt;span&gt;*&lt;/span&gt;&lt;span&gt; SWAP_PAGE_SIZE, count, &lt;/span&gt;&lt;span&gt;NULL&lt;/span&gt;&lt;span&gt;);&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;}&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;This code works in as few designs using the nrf52832 in the QFN package. It fails on CIAA&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash erase fails on NRF52832CIAA (chip used in the Murata MBN52832 module)</title><link>https://devzone.nordicsemi.com/thread/207013?ContentTypeID=1</link><pubDate>Fri, 30 Aug 2019 07:44:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e02ed826-a393-4b1f-9e75-fd878f2c5e1c</guid><dc:creator>bjorn-spockeli</dc:creator><description>&lt;p&gt;Hi Razvan,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;could you post the snippet where you call&amp;nbsp;&lt;span&gt;nrf_fstorage_erase()?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Are you waiting for the&amp;nbsp;&lt;em&gt;NRF_FSTORAGE_EVT_ERASE_RESULT &lt;/em&gt;before calling nrf_fstorage_erase on the next page or are you calling&amp;nbsp;nrf_fstorage_erase() in a loop?&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Best regards&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Bjørn&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>