<?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>LPCOMP in NCS-Zephyr on NRF52</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71737/lpcomp-in-ncs-zephyr-on-nrf52</link><description>I&amp;#39;m trying to get LPCOMP working on Zephyr - I have used the vanilla NCS sample as a baseline and have set up the event handler and the init function. 
 The problem is that this fatal fault occurs: 
 [00:00:00.006,225] &amp;lt;err&amp;gt; os: &amp;gt;&amp;gt;&amp;gt; ZEPHYR FATAL ERROR</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Fri, 19 Feb 2021 17:02:04 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71737/lpcomp-in-ncs-zephyr-on-nrf52" /><item><title>RE: LPCOMP in NCS-Zephyr on NRF52</title><link>https://devzone.nordicsemi.com/thread/295411?ContentTypeID=1</link><pubDate>Fri, 19 Feb 2021 17:02:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:d90bff2e-5311-415d-b08e-b868ea328b0f</guid><dc:creator>Christian Holland</dc:creator><description>&lt;p&gt;Thankyou Kenneth! It works perfectly. I did have to create my own&lt;/p&gt;
&lt;p class="p1"&gt;&lt;span class="s1"&gt;nrfx_lpcomp_config_t&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;config in order to change the reference voltage because it was too high.&lt;/p&gt;
&lt;p&gt;Appreciate your help.&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPCOMP in NCS-Zephyr on NRF52</title><link>https://devzone.nordicsemi.com/thread/295208?ContentTypeID=1</link><pubDate>Thu, 18 Feb 2021 18:13:49 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:cc821f43-8d8f-4ddb-843c-64ad4e0e7649</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;You may try this:&lt;/p&gt;
&lt;p&gt;&lt;a href="https://devzone.nordicsemi.com/cfs-file/__key/communityserver-discussions-components-files/4/lpcomp.zip"&gt;devzone.nordicsemi.com/.../lpcomp.zip&lt;/a&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPCOMP in NCS-Zephyr on NRF52</title><link>https://devzone.nordicsemi.com/thread/295021?ContentTypeID=1</link><pubDate>Thu, 18 Feb 2021 09:19:04 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:f7cd1fcc-4667-41b1-81ab-63c880ecd815</guid><dc:creator>Christian Holland</dc:creator><description>&lt;p&gt;Thanks for your help Kenneth,&lt;/p&gt;
&lt;p&gt;I decided which parameters to use just from looking at the documentation; it might have been incorrect. I tried to use&amp;nbsp;&lt;span&gt;IRQ_DIRECT_CONNECT(COMP_LPCOMP_IRQn,..). as you say, but it seems that simply adding this stops the program from starting at all for some reason. I have set&amp;nbsp;CONFIG_NRFX_LPCOMP=y in prj.conf already, and I&amp;#39;ve looked at that article but&amp;nbsp;I don&amp;#39;t really understand it much because their interrupt handler&amp;nbsp;nrfx_spim_1_irq_handler isn&amp;#39;t defined in the same C file so one would assume they&amp;#39;re using a default interrupt handler... either way I have tried what they suggested to no avail.&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;&lt;span&gt;Is it possible for you&amp;nbsp;to setup a simple LPCOMP sample in Zephyr? This doesn&amp;#39;t exist yet, and would be VERY useful for myself and the community to understand how to get it working as there&amp;#39;s nothing like it at the moment&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPCOMP in NCS-Zephyr on NRF52</title><link>https://devzone.nordicsemi.com/thread/294951?ContentTypeID=1</link><pubDate>Wed, 17 Feb 2021 18:01:31 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:48c0ea99-3fc9-433c-a1ab-9aae4694681b</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Where do you get those parameters that is passed to IRQ_DIRECT_CONNECT() from? I would think you should use IRQ_DIRECT_CONNECT(COMP_LPCOMP_IRQn,..).&lt;/p&gt;
&lt;p&gt;I haven&amp;#39;t used LPCOMP in zephyr, but you may find this useful:&lt;br /&gt;&lt;a href="https://devzone.nordicsemi.com/f/nordic-q-a/66488/using-spi-with-ppi-in-zephyr/272139#272139"&gt;https://devzone.nordicsemi.com/f/nordic-q-a/66488/using-spi-with-ppi-in-zephyr/272139#272139&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;You may also need to set&amp;nbsp;CONFIG_NRFX_LPCOMP=y in your prj.conf&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPCOMP in NCS-Zephyr on NRF52</title><link>https://devzone.nordicsemi.com/thread/294931?ContentTypeID=1</link><pubDate>Wed, 17 Feb 2021 16:06:14 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:2ef97494-531e-4023-bb8a-695ce3b33b2b</guid><dc:creator>Christian Holland</dc:creator><description>&lt;p&gt;Just tried it; same issue, still fatally crashes&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPCOMP in NCS-Zephyr on NRF52</title><link>https://devzone.nordicsemi.com/thread/294927?ContentTypeID=1</link><pubDate>Wed, 17 Feb 2021 16:01:05 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:b9258ffd-9469-4057-a9b5-c0fc06353983</guid><dc:creator>Kenneth</dc:creator><description>&lt;p&gt;Can you try to use IRQ_DIRECT_CONNECT().&lt;/p&gt;
&lt;p&gt;Kenneth&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: LPCOMP in NCS-Zephyr on NRF52</title><link>https://devzone.nordicsemi.com/thread/294919?ContentTypeID=1</link><pubDate>Wed, 17 Feb 2021 15:39:46 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:79241bce-3309-4436-bd2b-933c7fcddac7</guid><dc:creator>Christian Holland</dc:creator><description>&lt;p&gt;I have tried adding a IRQ_CONNECT call but the crash still occurs:&lt;/p&gt;
&lt;p class="p1"&gt;&lt;code&gt;&lt;span class="s1"&gt;&lt;span class="Apple-converted-space"&gt;&amp;nbsp; &amp;nbsp; &lt;/span&gt;IRQ_CONNECT(&lt;/span&gt;&lt;span class="s2"&gt;4&lt;/span&gt;&lt;span class="s1"&gt;, &lt;/span&gt;&lt;span class="s2"&gt;2&lt;/span&gt;&lt;span class="s1"&gt;, lpcomp_event_handler, &lt;/span&gt;&lt;span class="s2"&gt;NULL&lt;/span&gt;&lt;span class="s1"&gt;, &lt;/span&gt;&lt;span class="s2"&gt;0&lt;/span&gt;&lt;span class="s1"&gt;);&lt;/span&gt;&lt;/code&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>