<?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>Assign a PWM event handler gives me &amp;quot;Unhandled interrupt on CPU 0&amp;quot;</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/80862/assign-a-pwm-event-handler-gives-me-unhandled-interrupt-on-cpu-0</link><description>Hi guys, 
 I am trying to get the PWM rocking. Everything works, but as soon as I define a nrfx_pwm_handler_t in the nrfx_pwm_init, my system crashes with the following error: 
 
 What am I missing? Here is the full code:</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Wed, 20 Oct 2021 08:02:46 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/80862/assign-a-pwm-event-handler-gives-me-unhandled-interrupt-on-cpu-0" /><item><title>RE: Assign a PWM event handler gives me "Unhandled interrupt on CPU 0"</title><link>https://devzone.nordicsemi.com/thread/335001?ContentTypeID=1</link><pubDate>Wed, 20 Oct 2021 08:02:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2dc0ea7e-6d67-4b0a-9e34-b614f286b792</guid><dc:creator>Felix41382</dc:creator><description>&lt;p&gt;I should have search before hand. I have found the answer in this thread:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/80862/assign-a-pwm-event-handler-gives-me-unhandled-interrupt-on-cpu-0/Fatal%20error%20unhandled%20interrupt%20when%20using%20callback%20with%20nrfx_pwm_init"&gt;Fatal error unhandled interrupt when using callback with nrfx_pwm_init&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;After adding the following line before&amp;nbsp;&lt;span&gt;nrfx_pwm_init, it works:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;&lt;pre class="ui-code" data-mode="c_cpp"&gt;IRQ_DIRECT_CONNECT(PWM0_IRQn, 0, nrfx_pwm_0_irq_handler, 0);&lt;/pre&gt;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>