<?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>nvmc writing hangs after enabling Softdevice</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/2696/nvmc-writing-hangs-after-enabling-softdevice</link><description>Dear nordic specialists, 
 We have our own custom nRF51822 boards. 
 These days we are migrating from QFAA C0 +SDK4.1.0+S110 5.0.0 to QFAA G0 +SDK5.2.0+S110 6.0.0. 
 We heard there was such problem: when writing flash during ble radio, it hangs. And</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 06 Jun 2014 02:08:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/2696/nvmc-writing-hangs-after-enabling-softdevice" /><item><title>RE: nvmc writing hangs after enabling Softdevice</title><link>https://devzone.nordicsemi.com/thread/10551?ContentTypeID=1</link><pubDate>Fri, 06 Jun 2014 02:08:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:98e43b6c-1015-4a53-a52d-33bf6dd9cfee</guid><dc:creator>Karl</dc:creator><description>&lt;p&gt;Sorry for my being careless reading s110 6.0.0 migration doc, the problem I met is written clearly in it.
Thanks for your help. It&amp;#39;s good to have you guys here :)&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: nvmc writing hangs after enabling Softdevice</title><link>https://devzone.nordicsemi.com/thread/10550?ContentTypeID=1</link><pubDate>Thu, 05 Jun 2014 13:20:52 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fdb266f6-987b-418d-ae84-010afa1acc2a</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Writing to flash has been moved into the softdevice from v6.0.0 and newer.
If you look at the file nrf_soc.h, you have functions for writing and erasing.&lt;/p&gt;
&lt;p&gt;To write into flash:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;...
err_code = sd_flash_write(dest_addr, buffer, sizeof(buffer));
...
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Then you will get a callback in the system event handler set in &amp;quot;softdevice_sys_evt_handler_set&amp;quot;.
Let&amp;#39;s call this callback function &amp;quot;sys_evt_dispatch&amp;quot; (as we do in our examples):&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;static void sys_evt_dispatch(uint32_t sys_evt)
{
 ...
/* Handle sys_evt cases NRF_EVT_FLASH_OPERATION_SUCCESS and  NRF_EVT_FLASH_OPERATION_ERROR */  
 ...
}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Remember that your buffer must either be global, or you have to set a flag in a while-loop to ensure that the buffer is still on the stack.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>