<?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>52820 COMP problem</title><link>https://devzone.nordicsemi.com/f/nordic-q-a/71347/52820-comp-problem</link><description>Dear sir, 
 I have a light sensor connected to P0.04/AIN2 on 52820. How can i get the change of voltage? 
 I use the COMP, and has enabled COMP_ENABLED in sdk_config.h, compiled successfully and can run on board, but comp_event_handler does not be called</description><dc:language>en-US</dc:language><generator>Telligent Community 13</generator><lastBuildDate>Mon, 08 Feb 2021 09:49:21 GMT</lastBuildDate><atom:link rel="self" type="application/rss+xml" href="https://devzone.nordicsemi.com/f/nordic-q-a/71347/52820-comp-problem" /><item><title>RE: 52820 COMP problem</title><link>https://devzone.nordicsemi.com/thread/293268?ContentTypeID=1</link><pubDate>Mon, 08 Feb 2021 09:49:21 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:e017344b-b085-4692-bb22-bcd02473db41</guid><dc:creator>Jared</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp;&lt;/p&gt;
&lt;p&gt;Are you using your a custom board or a development kit? If you&amp;#39;re using a custom board, have you included a custom board file? What pin are you measuring on?&lt;/p&gt;
&lt;p&gt;regards&lt;/p&gt;
&lt;p&gt;Jared&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: 52820 COMP problem</title><link>https://devzone.nordicsemi.com/thread/293115?ContentTypeID=1</link><pubDate>Fri, 05 Feb 2021 13:51:09 GMT</pubDate><guid isPermaLink="false">137ad170-7792-4731-bb38-c0d22fbe4515:a47e1099-0f76-4bee-b402-04d9a84ebc01</guid><dc:creator>logan.xu</dc:creator><description>&lt;p&gt;The defines in sdk_config.h&amp;nbsp;is：&lt;/p&gt;
&lt;p&gt;#define NRFX_COMP_ENABLED 1&lt;/p&gt;
&lt;p&gt;#define NRFX_COMP_CONFIG_REF 4&amp;nbsp;// &amp;lt;4=&amp;gt; VDD 3.3v&lt;/p&gt;
&lt;p&gt;#define NRFX_COMP_CONFIG_MAIN_MODE 0 // &amp;lt;0=&amp;gt; Single ended&amp;nbsp;&lt;/p&gt;
&lt;p&gt;#define NRFX_COMP_CONFIG_INPUT 2&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;And I also modify the&amp;nbsp;&lt;span&gt;hreshold default configuration:&lt;/span&gt;&lt;/p&gt;
&lt;p&gt;/** @brief COMP threshold default configuration. */&lt;br /&gt;#define NRFX_COMP_CONFIG_TH \&lt;br /&gt;{ \&lt;br /&gt; .th_down = NRFX_VOLTAGE_THRESHOLD_TO_INT(1.0, 3.3), \&lt;br /&gt; .th_up = NRFX_VOLTAGE_THRESHOLD_TO_INT(2.0, 3.3) \&lt;br /&gt;}&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;But when the&amp;nbsp;vol&lt;span&gt;tage down&amp;nbsp;to 0.3V from&amp;nbsp;2.5V , the&amp;nbsp;comp_event_handler didn&amp;#39;t be called?&amp;nbsp;&lt;/span&gt;&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>