<?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>FStorage event handler interrupts not forwarded by soft device in bootloader</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/66061/fstorage-event-handler-interrupts-not-forwarded-by-soft-device-in-bootloader</link><description>I&amp;#39;ve developed a little test application on a nrf52832 chip to run fstorage in a bootloader memory address. I followed the nordic guidance to set up, build, and install a bootloader application which launches off the MBR. It has soft device working correctly</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 18 Sep 2020 16:06:18 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/66061/fstorage-event-handler-interrupts-not-forwarded-by-soft-device-in-bootloader" /><item><title>RE: FStorage event handler interrupts not forwarded by soft device in bootloader</title><link>https://devzone.nordicsemi.com/thread/270379?ContentTypeID=1</link><pubDate>Fri, 18 Sep 2020 16:06:18 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:82b40cdf-3bc4-4a7c-885e-fa0124934ad9</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
[quote user="rmcfadden"]Is it possible to get to the&amp;nbsp;nrf_fstorage_sys_evt_handler() call in&amp;nbsp;queue_process() without the soft device being initially enabled?[/quote]
&lt;p&gt;No, the SD backen cannot work without the SoftDevice being enabled. But you should have seen an error if this was the problem (unless you ignore return values). The SoftDevice must be enabled before you make any calls to the SoftDevice API (directly or indirectly).&lt;/p&gt;
[quote user="rmcfadden"]And regarding the waiting for interrupt, I dont block while waiting for the operation to complete, I come back and poll it on a tick based approach, which lets other operations occur. Is that what you are asking?[/quote]
&lt;p&gt;Yes, that was what I was asking about. That should not be the problem, then.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FStorage event handler interrupts not forwarded by soft device in bootloader</title><link>https://devzone.nordicsemi.com/thread/270358?ContentTypeID=1</link><pubDate>Fri, 18 Sep 2020 14:07:45 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:164d054e-ca1f-4d32-8c8b-123534b02eaa</guid><dc:creator>rsoc16</dc:creator><description>&lt;p&gt;Hi Einar,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Yes, I am using the nrf_fstorage_sd backend. I have been watching with breakpoints in the&amp;nbsp;&lt;span&gt;nrf_fstorage_sys_evt_handler() and never receive any events. My debugging process was first watching for the erase to execute in&amp;nbsp;queue_process() in the&amp;nbsp;&lt;/span&gt;&lt;span&gt;nrf_fstorage_sd.c file. I confirmed this happened, but I never get a breakpoint hit in the event handler. Nor do I get a breakpoint on the event handler function call, located in the queue_process() switch statement.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;One thing I noticed is the&amp;nbsp;nrf_fstorage_sys_evt_handler() call in&amp;nbsp;queue_process() is only triggered when the soft device is enabled, which makes sense. I assume this backend cant operate without that being enabled? Is it possible to get to the&amp;nbsp;nrf_fstorage_sys_evt_handler() call in&amp;nbsp;queue_process() without the soft device being initially enabled? Could that be an issue (some kind of race condition?).&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;And regarding the waiting for interrupt, I dont block while waiting for the operation to complete, I come back and poll it on a tick based approach, which lets other operations occur. Is that what you are asking?&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: FStorage event handler interrupts not forwarded by soft device in bootloader</title><link>https://devzone.nordicsemi.com/thread/270334?ContentTypeID=1</link><pubDate>Fri, 18 Sep 2020 12:48:56 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:fae65100-d8fe-420c-8603-f2abf07db4fc</guid><dc:creator>Einar Thorsrud</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;I assume you are using the nrf_fstorage_sd backend and not the nrf_fstorage_nvmc? Assuming so, this is event based, and the fstorage event handler is&amp;nbsp;nrf_fstorage_sys_evt_handler(), which is registered by the&amp;nbsp;NRF_SDH_SOC_OBSERVER macro in nrf_fstorage_sd.c. This makes the SoftDevice handler forward events to fstorage. Do you get any events in the event handler (checked with a breakpoint or similar)?&lt;/p&gt;
&lt;p&gt;I did not get a chance to look closely at your code today, but could it be a problem of interrupt priorities or similar? Do you wait for a fstorage event (or something completely different) in a interrupt priority, so that the thing you are waiting for doesn&amp;#39;t get CPU time to run, making a deadlock?&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>