<?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>CONFIG_ZERO_LATENCY_IRQS (ZLI) and MPSL - blocking IRQs not possible?</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/91827/config_zero_latency_irqs-zli-and-mpsl---blocking-irqs-not-possible</link><description>It appears that MPSL is using Zero Latency IRQs, and I&amp;#39;m not able to disable that. 
 
 I set the config param to &amp;#39;n&amp;#39; in my prj.conf file, but as noted, it isn&amp;#39;t taking effect. 
 
 
 Navigating to the Kconfig menu, I see it is not possible to uncheck this</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Tue, 13 Sep 2022 16:05:26 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/91827/config_zero_latency_irqs-zli-and-mpsl---blocking-irqs-not-possible" /><item><title>RE: CONFIG_ZERO_LATENCY_IRQS (ZLI) and MPSL - blocking IRQs not possible?</title><link>https://devzone.nordicsemi.com/thread/386044?ContentTypeID=1</link><pubDate>Tue, 13 Sep 2022 16:05:26 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:47bb21e0-e8a7-46a5-a650-4c52548d11b8</guid><dc:creator>douglas.malnati</dc:creator><description>&lt;p&gt;Hi, thank you for the reply.&lt;/p&gt;
&lt;p&gt;I think this is bad practice on the part of Nordic.&lt;/p&gt;
&lt;p&gt;The documentation about ZLI states &amp;quot;Zero-latency interrupts are expected to be used to manage hardware events directly.&amp;quot;&lt;/p&gt;
&lt;p&gt;Clearly MPSL isn&amp;#39;t a device driver, it&amp;#39;s going to interface with application code/logic and of course, state.&amp;nbsp; The state keeping is the agonizing part here, because ZLI trashes state.&lt;/p&gt;
&lt;p&gt;Even the example use case linked above, from Noridic, has to do gymnastics to escape the consequences of unblockable IRQs (ZLI).&amp;nbsp; But it only half escapes them.&lt;/p&gt;
&lt;p&gt;The irony is the Nordic example case simply offloads interacting with the application to a different blockable IRQ.&lt;/p&gt;
&lt;p&gt;I think MPSL should be modified to support using non-ZLI on a session-by-session basis (maybe at the expense of new interrupts having to be allocated by the application or whatever).&lt;/p&gt;
&lt;p&gt;I can understand some subsystems might want ZLI, but not all do, and by forcing ZLI on users you&amp;#39;re making application code a complete nightmare.&lt;/p&gt;
&lt;p&gt;Also the MPSL documentation should clearly state ZLI is being used, and how, and the consequences.&lt;/p&gt;
&lt;p&gt;Thanks.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CONFIG_ZERO_LATENCY_IRQS (ZLI) and MPSL - blocking IRQs not possible?</title><link>https://devzone.nordicsemi.com/thread/386041?ContentTypeID=1</link><pubDate>Tue, 13 Sep 2022 15:30:00 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:aebcae0c-1825-4767-910c-15661ca11893</guid><dc:creator>Sigurd</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;MPSL uses ZLI, and it&amp;#39;s not possible to disable that.&lt;/p&gt;
[quote user="douglas.malnati"]So I&amp;#39;m unclear on why an &lt;code&gt;irq_lock()&lt;/code&gt; isn&amp;#39;t preventing these signals from firing.[/quote]
&lt;p&gt;This is the expected behavior. See&amp;nbsp;&lt;a href="https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/hardware/arch/arm_cortex_m.html?highlight=config_zero_latency_irqs#zero-latency-interrupts"&gt;https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/hardware/arch/arm_cortex_m.html?highlight=config_zero_latency_irqs#zero-latency-interrupts&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CONFIG_ZERO_LATENCY_IRQS (ZLI) and MPSL - blocking IRQs not possible?</title><link>https://devzone.nordicsemi.com/thread/385610?ContentTypeID=1</link><pubDate>Sun, 11 Sep 2022 14:43:27 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:88207e5e-8b3c-4987-85ad-441ad3cccc23</guid><dc:creator>douglas.malnati</dc:creator><description>[quote userid="116823" url="~/f/nordic-q-a/91827/config_zero_latency_irqs-zli-and-mpsl---blocking-irqs-not-possible/385609"]&lt;span&gt;&lt;span&gt;I am, for example, able to block&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;code&gt;MPSL_TIMESLOT_SIGNAL_TIMER0&lt;/code&gt;.[/quote]
&lt;p&gt;Typo, I meant to say I am able to block&amp;nbsp;&lt;code&gt;MPSL_TIMESLOT_SIGNAL_RADIO&lt;/code&gt;.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: CONFIG_ZERO_LATENCY_IRQS (ZLI) and MPSL - blocking IRQs not possible?</title><link>https://devzone.nordicsemi.com/thread/385609?ContentTypeID=1</link><pubDate>Sun, 11 Sep 2022 14:37:43 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:c0541f8e-9dcb-479c-92ca-a2c0af8cad80</guid><dc:creator>douglas.malnati</dc:creator><description>&lt;p&gt;To add more detail here, specifically I am not able to block (using&amp;nbsp;&lt;code&gt;irq_lock()&lt;/code&gt;):&lt;/p&gt;
&lt;div&gt;&lt;span&gt;&lt;span&gt;&lt;code&gt;MPSL_TIMESLOT_SIGNAL_START&lt;/code&gt; and&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;code&gt;MPSL_TIMESLOT_SIGNAL_TIMER0&lt;/code&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;I am, for example, able to block&amp;nbsp;&lt;/span&gt;&lt;/span&gt;&lt;code&gt;MPSL_TIMESLOT_SIGNAL_TIMER0&lt;/code&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;At this point I have not experimented with the other signals so I don&amp;#39;t know if they can be blocked.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;The mpsl_timeslot.h explains the START and TIMER0 signals execute in the TIMER0 IRQ handler context.&lt;/span&gt;&lt;/div&gt;
&lt;blockquote&gt;
&lt;div&gt;
&lt;div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;MPSL_TIMESLOT_SIGNAL_START&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;= &lt;/span&gt;&lt;span&gt;0&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt; &amp;nbsp;/**&amp;lt; This signal indicates the start of the timeslot.&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; The signal will be executed in the same context as&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @ref MPSL_IRQ_TIMER0_Handler. */&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&gt;&lt;span&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;&lt;span&gt;MPSL_TIMESLOT_SIGNAL_TIMER0&lt;/span&gt;&lt;span&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; = &lt;/span&gt;&lt;span&gt;1&lt;/span&gt;&lt;span&gt;,&lt;/span&gt;&lt;span&gt; &amp;nbsp;/**&amp;lt; This signal indicates the TIMER0 interrupt.&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; The signal will be executed in the same context as&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;div&gt;&lt;code&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; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; @ref MPSL_IRQ_TIMER0_Handler. */&lt;/span&gt;&lt;/code&gt;&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/blockquote&gt;
&lt;div&gt;&lt;span&gt;I notice that the&amp;nbsp;&lt;code&gt;CONFIG_COUNTER_TIMER0_ZLI&lt;/code&gt; is set to n.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;So I&amp;#39;m unclear on why an &lt;code&gt;irq_lock()&lt;/code&gt; isn&amp;#39;t preventing these signals from firing.&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;&lt;/span&gt;&lt;/div&gt;
&lt;div&gt;&lt;span&gt;Please let me know how to lock these signals from firing.&lt;/span&gt;&lt;br /&gt;&lt;br /&gt;&lt;/div&gt;
&lt;div&gt;Thanks.&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;
&lt;/div&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>