<?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>Writing to flash within timer</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/81538/writing-to-flash-within-timer</link><description>I have developed my own flash management module that has been working fine for a long time. 
 Today, for the first time, I&amp;#39;m trying to write to flash from within a timer, and I&amp;#39;m not getting completion events. 
 Early on, I add a SOC event observer with</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 10 Nov 2021 10:07:02 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/81538/writing-to-flash-within-timer" /><item><title>RE: Writing to flash within timer</title><link>https://devzone.nordicsemi.com/thread/338335?ContentTypeID=1</link><pubDate>Wed, 10 Nov 2021 10:07:02 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d9c47466-3e21-4fba-b61b-7ba685db1851</guid><dc:creator>Kenneth</dc:creator><description>[quote user=""]Now, when using a timer from the APP_TIMER library, everything goes fine, call to sd_flash_write succeeds, but then the event is never received.[/quote]
&lt;p&gt;In general it is not a good idea to wait for softdevice events in interrupt context, since it likely will block handling of other events that may be required to handle before the current one will success. Also, flash operation may take quite some time to schedule and execute by the softdevice. So I recommend to look into how you have implemented this, there is no problem to call the flash operation from the interrupt context, just don&amp;#39;t wait for it.&lt;/p&gt;
&lt;p&gt;All that said, can you check if you have the same problem as this case:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/81503/can-not-erase-flash-by-nrf_fstorage_sd-backend/338060#338060"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/81503/can-not-erase-flash-by-nrf_fstorage_sd-backend/338060#338060&lt;/a&gt;&amp;nbsp;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>