<?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>Exception handler and others in debug - VS code</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/105104/exception-handler-and-others-in-debug---vs-code</link><description>Hi, 
 I&amp;#39;m trying to understand debugging in VSCode. I have a simple application with 2 threads (Zephyr). Sometimes it happens that my application seems to stop running. In the call stack, I see among other things an Exception Handler as shown in the attached</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 27 Oct 2023 07:56:50 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/105104/exception-handler-and-others-in-debug---vs-code" /><item><title>RE: Exception handler and others in debug - VS code</title><link>https://devzone.nordicsemi.com/thread/452728?ContentTypeID=1</link><pubDate>Fri, 27 Oct 2023 07:56:50 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:6afe5a12-77c2-47eb-a9fd-dcc593d9262c</guid><dc:creator>H&amp;#229;kon Alseth</dc:creator><description>&lt;p&gt;Hi,&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;As you&amp;#39;ve noticed, the kernel will use exception handler, more specifically the PendSV, to change context (threads etc).&lt;/p&gt;
&lt;p&gt;More detailed information on this subject can be found here:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://docs.zephyrproject.org/latest/hardware/arch/arm_cortex_m.html#thread-context-switching"&gt;https://docs.zephyrproject.org/latest/hardware/arch/arm_cortex_m.html#thread-context-switching&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Kind regards,&lt;/p&gt;
&lt;p&gt;Håkon&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Exception handler and others in debug - VS code</title><link>https://devzone.nordicsemi.com/thread/452675?ContentTypeID=1</link><pubDate>Thu, 26 Oct 2023 20:14:58 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e1580fb7-bada-41b5-9f53-4bd043ad0425</guid><dc:creator>witc</dc:creator><description>&lt;p&gt;&lt;span&gt;Ah,&amp;nbsp; I&amp;#39;ve figured it out. First, the Exception Handler doesn&amp;#39;t necessarily mean that an error has occurred; it&amp;#39;s just handling some ISR. Second, the issue was that&amp;nbsp;I were using &lt;/span&gt;&lt;code&gt;while(k_msgq_put(&amp;amp;queuCoreHandle, &amp;amp;sd, K_FOREVER) != 0);&lt;/code&gt;&lt;span&gt; in the callback from a software timer as well as in an ISR function. The queue I were sending to was likely full, and the program couldn&amp;#39;t proceed further because it was waiting for the queue to become free.&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>